请问admincp.php中的getpassport函数(标红的字体)在哪个文件里可以找到啊?谢谢
switch ($cpaccess) {
case '1'://可以登录
if(submitcheck('dologin', 1)) {
if(!$passport = getpassport($_SGLOBAL['supe_username'], $_POST['admin_password'])) {
$_SGLOBAL['db']->query("UPDATE ".tname('adminsession')." SET errorcount=errorcount+1 WHERE uid='$_SGLOBAL[supe_uid]'");
showmessage('enter_the_password_is_incorrect', 'admincp.php');
} else {
$_SGLOBAL['db']->query("UPDATE ".tname('adminsession')." SET errorcount='-1' WHERE uid='$_SGLOBAL[supe_uid]'");
$refer = empty($_SCOOKIE['_refer'])?$_SGLOBAL['refer']:rawurldecode($_SCOOKIE['_refer']);
if(empty($refer) || preg_match("/(login)/i", $refer)) {
$refer = 'admincp.php';
}
showmessage('login_success', $refer, 0);
}
} else {
if($_SERVER['REQUEST_METHOD'] == 'GET') {
ssetcookie('_refer', rawurlencode($_SERVER['REQUEST_URI']));
} else {
ssetcookie('_refer', rawurlencode('admincp.php?ac='.$_GET['ac']));
}
include_once template('admin/tpl/login.htm', 1);
exit();
}
break;
case '2'://登录成功
break;
default://尝试次数太多禁止登录
showmessage('excessive_number_of_attempts_to_sign');
break;
}
|