#[会员登录页]
require_once("global.php");
$navid="my";
$langs["msg_emptyid"]=$langs["msg_emptyid".$bi];
if(USER_STATUS){
//已登录跳转至 my.php?act=home
$url='http://'.$_SERVER['SERVER_NAME'].'/my.php?act=home';
header("location:$url");
}
if($act == "loginok")
{
$username = SafeHtml($username);
$password = SafeHtml($password);
$langs["msg_emptyid"]=$langs["msg_emptyid".$bi];
if(!$username)
{
$langs["tip"]=$langs["tip".$bi];
Error($langs["empty_user".$bi],"login.php");
}
if(!$password)
{
$langs["tip"]=$langs["tip".$bi];
Error($langs["empty_pass".$bi],"login.php");
}
$rs = $DB->qgGetOne("SELECT * FROM ".$prefix."user WHERE user='".$username."' and state ='1' AND pass='".md5($password)."'");
//$rs = $DB->qgGetOne("SELECT id,user,pass,email,state,levelid,hangye_id,company FROM ".$prefix."user WHERE user='".$username."' and state ='1' ");
if(!$rs)
{
Error($langs["notuser".$bi],"login.php");
}
$_SESSION["qg_sys_user"] = $rs;
unset($rs);
//echo $_SESSION["qg_sys_user"]["user"];
$langs["msg_emptyid"]=$langs["msg_emptyid".$bi];
Error($langs["userloginok".$bi],"my.php");
}
elseif($act == "logout")
{
$_SESSION["qg_sys_user"] = "";
$langs["msg_emptyid"]=$langs["msg_emptyid".$bi];
Error($langs["userlogoutok".$bi],"my.php");
qgheader();
}
else
{
#[标题头]
$sitetitle = $langs["logintitle".$bi]." - ".$system["sitename".$bi];
#[向导栏]
$lead_menu[0]["url"] = $siteurl."login.php";
$lead_menu[0]["name"] = $langs["logintitle".$bi];
$langs["logintitle"]=$langs["logintitle".$bi];
$langs["reg_emptyuser"] = $langs["reg_emptyuser".$bi];
$langs["reg_emptypass"] = $langs["reg_emptypass".$bi];
FOOT("login");
}
?>
一键复制
编辑
Web IDE
原始数据
按行查看
历史