include("../config/conn.php"); include("../config/function.php"); if($_SESSION["SHOPUSER"]!=""){php_toheader("../user/");} //修改要同步修改tem/tclogin.php //登录验证开始 if($_GET[control]=="login1"){ zwzr(); include("../tem/uc/login.php"); $uid=sqlzhuru($_POST[t1]); $pwd=sqlzhuru($_POST[t2]); include("../reg/login_tem.php"); php_toheader(returnjgdw($_SESSION["tzURL"],"","../user/")); }elseif($_GET[control]=="login2"){ zwzr(); $mot=sqlzhuru($_POST[mot]); while1("*","yjcode_yzm where tit='".$mot."' and yzm='".sqlzhuru($_POST[yzm])."' and admin=2");if(!$row1=mysqli_fetch_array($res1)){Audit_alert("短信验证码输入有误,返回重试","index.php");} deletetable("yjcode_yzm where tit='".$mot."'"); $sj=getsj(); $uip=getuip(); while1("*","yjcode_user where mot='".$mot."' and ifmot=1");if($row1=mysqli_fetch_array($res1)){ if(0==$row1[zt]){Audit_alert("您的帐号已被禁用,请联系网站客服处理","./");} $uid=$row1[uid]; $pwd1=$row1[pwd]; $userid=$row1[id]; }else{ $bh=time(); $uid="mot".$bh.rnd_num(300); $pwd="123456"; $ifmot=1; $nc=$mot; if($rowcontrol["ifuc"]==1){ $email=$uid."@qq.com"; } include("reg_tem.php"); $pwd1=sha1($pwd); } intotable("yjcode_loginlog","admin,userid,sj,uip","1,".$userid.",'".$sj."','".$uip."'"); $_SESSION["SHOPUSER"]=$uid; $_SESSION["SHOPUSERPWD"]=$pwd1; php_toheader(returnjgdw($_SESSION["tzURL"],"","../user/")); } //登录验证结束 ?>