dheader("index.php"); } //如果已经登录直接跳转到首页 if (!empty($commit)) { //处理登录操作 include INC_PATH . "/code/securimage.php"; $img = new Securimage(); $valid = $img->check($code); if ($valid != true) { print "<script language='javascript'>alert('验证码错误');history.go(-1);</script>"; exit; } include INC_PATH . "/member.class.php"; $m = new memberclass(); if (!empty($RememberMe)) { $m->setcookietime(14 * 24 * 3600); } $msg = $m->login($userName, $password); if ($msg == "OK") { //登录成功自动跳转到首页 checkauth(); //检查用户登录 if ($_USERS['state'] == 0) { dheader(url("user.php?action=useractive")); //php跳转页面 } $gotourl = get_cookie('_refer'); $gotourl = empty($_GET['refer']) ? rawurldecode($gotourl) : $_GET['refer']; $gotourl = remove_xss($gotourl); //过滤xss攻击 if (empty($gotourl)) {