case "login": $nick = str_replace(' ', '', trim($_POST['nick'])); $pwd = str_replace(' ', '', trim($_POST['pwd'])); $validate = trim($_POST["validate"]); if ($_SESSION['usnamese'] != "") { $arry['id'] = 121; $arry['msg'] = "错误操作,你已经是登录状态"; echo json_encode($arry); exit; } if ($_SESSION['usimga'] != $validate) { $arry['id'] = 122; $arry['msg'] = "验证码错误"; } else { if (Getuname($nick) > 0) { $usxx = uslogin($nick, $pwd); if ($usxx['count'] == 1) { Zbkinsert('user_login_log', array('name' => $nick, 'ip' => $_SERVER['REMOTE_ADDR'], 'logintime' => time())); $_SESSION['usnamese'] = $nick; $_SESSION['usidse'] = $usxx['id']; $_SESSION['shua'] = $usxx['shua']; $_SESSION['us_type'] = $usxx['us_type']; $arry['id'] = 111; $arry['msg'] = "登录成功!"; $arry['info'] = 1; } else { if ($usxx['count'] == -1) { $Pingbi = date('Y-m-d', $usxx['Pingbi']); $arry['id'] = 0; $arry['msg'] = "可能由于您的帐号存在安全问题,帐号被屏蔽到" . $Pingbi . "日"; } else {
<?php require_once "../../include/conn.php"; require_once "../../include/myfunction.php"; session_start(); $do = $_GET['do']; if ($do == 'qqconnect') { $name = trim($_POST['name']); $pwd = trim($_POST['pwd']); if (empty($name) || empty($pwd)) { $arry['id'] = 0; $arry['msg'] = "用启名和密码均不能为空"; echo json_encode($arry); exit; } else { $usxx = uslogin($name, $pwd); if ($usxx['count'] == 1) { $sql = "update user set qq_ua='{$qqid}' where name='{$name}'"; mysql_query($sql); Zbkinsert('user_login_log', array('name' => $name, 'ip' => $_SERVER['REMOTE_ADDR'], 'logintime' => time())); if (!empty($_SESSION['usnamese'])) { unset($_SESSION['usnamese']); unset($_SESSION['usidse']); unset($_SESSION['shua']); unset($_SESSION['us_type']); } $_SESSION['usnamese'] = $name; $_SESSION['usidse'] = $usxx['id']; $_SESSION['shua'] = 1; $_SESSION['us_type'] = $usxx['us_type']; $arry['id'] = 111;