include("../../config/conn.php"); include("../../config/function.php"); sesCheck_m(); $qzmotweb=1; if($_GET[control]=="bd"){ zwzr(); if(panduan("uid,mot,ifmot","yjcode_user where mot='".$_GET[mob]."' and ifmot=1")==1){Audit_alert("绑定失败,该号码已经被绑定过","mobbd.php");} if(empty($_GET[yz])){Audit_alert("验证码有误!","mobbd.php");} if(panduan("uid,mot,ifmot,bdmot","yjcode_user where mot='".$_GET[mob]."' and bdmot='".$_GET[yz]."' and uid='".$_SESSION[SHOPUSER]."'")==0){ Audit_alert("验证码输入有误,请重新绑定","mobbd.php"); } updatetable("yjcode_user","mot='".$_GET[mob]."',ifmot=1,bdmot='' where uid='".$_SESSION[SHOPUSER]."'"); php_toheader("mobbd.php?t=suc"); }elseif($_GET[control]=="delbd"){ if(panduan("uid,bdmot","yjcode_user where bdmot='".$_GET[yz]."' and uid='".$_SESSION[SHOPUSER]."'")==0){ Audit_alert("验证码输入有误,请重新提交","mobbd.php"); } $sqluser="select id,mot from yjcode_user where uid='".$_SESSION[SHOPUSER]."'";mysql_query("SET NAMES 'GBK'");$resuser=mysql_query($sqluser); $rowuser=mysql_fetch_array($resuser); updatetable("yjcode_user","jbmot='".$rowuser[mot]."',mot='',ifmot=0,bdmot='' where id=".$rowuser[id]); php_toheader("mobbd.php"); } $sqluser="select uid,mot,ifmot from yjcode_user where uid='".$_SESSION[SHOPUSER]."'";mysql_query("SET NAMES 'GBK'");$resuser=mysql_query($sqluser); if(!$rowuser=mysql_fetch_array($resuser)){php_toheader("un.php");} ?>