try resolve login not jump

pull/128/head
qkqpttgf 2020-08-24 09:13:27 +08:00 committed by GitHub
parent 3842fb7952
commit 05bbb1b861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 9 deletions

View File

@ -1035,19 +1035,19 @@ function bigfileupload($path)
function adminform($name = '', $pass = '', $path = '') function adminform($name = '', $pass = '', $path = '')
{ {
$statusCode = 401;
$html = '<html><head><title>' . getconstStr('AdminLogin') . '</title><meta charset=utf-8></head>'; $html = '<html><head><title>' . getconstStr('AdminLogin') . '</title><meta charset=utf-8></head>';
if ($name!=''&&$pass!='') { if ($name!=''&&$pass!='') {
$html .= '<body>'.getconstStr('LoginSuccess').'</body></html>'; $html .= '<meta http-equiv="refresh" content="3;URL=' . $path . '"><body>' . getconstStr('LoginSuccess') . '</body></html>';
$statusCode = 302; $statusCode = 302;
date_default_timezone_set('UTC'); date_default_timezone_set('UTC');
$header = [ $header = [
'Set-Cookie' => $name . '=' . $pass . '; path=/; expires=' . date(DATE_COOKIE, strtotime('+1hour')), 'Set-Cookie' => $name . '=' . $pass . '; path=/; expires=' . date(DATE_COOKIE, strtotime('+1hour')),
'Location' => $path, //'Location' => $path,
'Content-Type' => 'text/html' 'Content-Type' => 'text/html'
]; ];
return output($html, $statusCode, $header); return output($html, $statusCode, $header);
} }
$statusCode = 401;
$html .= ' $html .= '
<body> <body>
<div> <div>