try resolve login not jump
parent
3842fb7952
commit
05bbb1b861
18
common.php
18
common.php
|
@ -1035,34 +1035,34 @@ 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>
|
||||||
<center><h4>'.getconstStr('InputPassword').'</h4>
|
<center><h4>' . getconstStr('InputPassword') . '</h4>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<div>
|
<div>
|
||||||
<input name="password1" type="password"/>
|
<input name="password1" type="password"/>
|
||||||
<input type="submit" value="'.getconstStr('Login').'">
|
<input type="submit" value="' . getconstStr('Login') . '">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
';
|
';
|
||||||
$html .= '</body></html>';
|
$html .= '</body></html>';
|
||||||
return output($html,$statusCode);
|
return output($html, $statusCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
function adminoperate($path)
|
function adminoperate($path)
|
||||||
|
|
Loading…
Reference in New Issue