From 4c59698c750925dc7e7e52e308816bb4e4a2c502 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 5 Jan 2020 18:29:18 +0800 Subject: [PATCH] Update 1.php --- theme/1.php | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/theme/1.php b/theme/1.php index da94ae6..2e54d53 100644 --- a/theme/1.php +++ b/theme/1.php @@ -636,22 +636,14 @@ textarea{
- - + if (getConfig('admin')!='') if (!$_SERVER['admin'] && !$_SERVER['user']) { + if (getConfig('adminloginpage')=='') { ?> - + @@ -672,7 +664,7 @@ textarea{ -
  • href="setup" onclick="alert('');"> +
  • href="setup" onclick="alert('');">
  • @@ -683,7 +675,14 @@ textarea{
    - + @@ -837,7 +836,7 @@ textarea{ foreach ($files['children'] as $file) { // Files if (isset($file['file'])) { - if ($_SERVER['admin'] or (substr($file['name'],0,1) !== '.' and $file['name'] !== getenv('passfile') ) ) { + if ($_SERVER['admin'] or (substr($file['name'],0,1) !== '.' and $file['name'] !== getConfig('passfile') ) ) { if (strtolower($file['name']) === 'readme.md') $readme = $file; if (strtolower($file['name']) === 'index.html') { $html = curl_request(fetch_files(spurlencode(path_format($path . '/' .$file['name']),'/'))['@microsoft.graph.downloadUrl']); @@ -1031,7 +1030,7 @@ textarea{
    - +
    @@ -1113,7 +1112,7 @@ textarea{ + if (getConfig('admin')!='') if (getConfig('adminloginpage')=='') { ?>
    @@ -1377,7 +1376,7 @@ textarea{ document.getElementById('nextpageform').submit(); } + if (getConfig('admin')!='') { // close div. 有登录或操作,需要关闭DIV时 ?> function operatediv_close(operate) { document.getElementById(operate+'_div').style.display='none'; } @@ -1727,17 +1726,17 @@ function binupfile(file,url,tdnum){ return queryComponents.join('&'); } + } else if (getConfig('admin')!='') if (getConfig('adminloginpage')=='') { ?> function login() { this.openDisLog('login_div'); document.getElementById('login_input').focus(); } - + function userLoginOut() { document.cookie = "=; path=/"; location.href = location.href; } - + function addelement(html) { var tr1=document.createElement('tr'); tr1.setAttribute('data-to',1);