<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->$session['userInfo']='用户中心';
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><?php
if(($_POST['admin_user']!="")&&($_POST['admin_pass']!=""))
{
require_once("image/conn.php");
$number=(get_magic_quotes_gpc())?trim($_POST['admin_user']):addslashes(trim($_POST['admin_user']));
$pass=(get_magic_quotes_gpc())?trim($_POST['admin_pass']):addslashes(trim($_POST['admin_pass']));
$q=$m->query("select authority from setting_user where number='".$number."' and password='".$pass."'");
$r=$q->fetch_array(MYSQLI_USE_RESULT);
(int)$authority=$r['authority'];//权限分配
if($q->num_rows>0){
//分配显示名
$qShow=$m->query("select * from setting_display where user='".$number."' order by id desc limit 1");
$rShow=$qShow->fetch_array(MYSQLI_USE_RESULT);{
$_SESSION['receiving']=$rShow['receiving']?$rShow['receiving']:NULL;
$_SESSION['po']=$rShow['po']?$rShow['po']:NULL;
// 很多session 在这里
if($_POST['remeberMe']){
setcookie("u",$number,time()+3600);
setcookie("p",$pass,time()+3600);
}
}
$_SESSION['auth']=$number;
switch($authority){
case 1:echo "<script>window.location.href='main.php?o=show';</script>";$_SESSION['admin']=1;break;
default:echo "<script>window.location.href='main.php?o=show';</script>";$_SESSION['admin']=NULL;break;
}
}
else{
echo "<script language=javascript>alert('用户名或密码输入错误!');</script>";
}
}
?>
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><?php session_set_cookie_params('3600');session_start(); ?>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号