From 0fbacf2608bafbb78bec376b4ebd0a52d631576e Mon Sep 17 00:00:00 2001
From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com>
Date: Wed, 1 Jan 2020 13:57:48 +0800
Subject: [PATCH] Update index.php
---
index.php | 429 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 427 insertions(+), 2 deletions(-)
diff --git a/index.php b/index.php
index 93c3b6f..84046e2 100644
--- a/index.php
+++ b/index.php
@@ -129,7 +129,7 @@ function main()
if ($_SERVER['ishidden']<4) return output('', 302, [ 'Location' => $files['@microsoft.graph.downloadUrl'] ]);
}
if ( isset($files['folder']) || isset($files['file']) ) {
- return render_list($path, $files);
+ //return render_list($path, $files);
} else {
return output('
' . $files['error']['message'] . '
', 404);
}
@@ -155,4 +155,429 @@ function list_files($path)
} else return '';
}
}
-?>
+
+function adminform($name = '', $pass = '', $path = '')
+{
+ global $constStr;
+ $statusCode = 401;
+ $html = ''.$constStr['AdminLogin'][$constStr['language']].'';
+ if ($name!=''&&$pass!='') {
+ $html .= ''.$constStr['LoginSuccess'][$constStr['language']].'';
+ $statusCode = 302;
+ date_default_timezone_set('UTC');
+ $header = [
+ 'Set-Cookie' => $name.'='.$pass.'; path=/; expires='.date(DATE_COOKIE,strtotime('+1hour')),
+ 'Location' => $path,
+ 'Content-Type' => 'text/html'
+ ];
+ return output($html,$statusCode,$header);
+ }
+ $html .= '
+
+
+
'.$constStr['InputPassword'][$constStr['language']].'
+
+
+
+';
+ $html .= '