mobchk.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. if(empty($_SESSION["SHOPUSER"])){echo "ok";exit;}
  5. $mob=$_GET[mob];
  6. if(empty($mob)){echo "True";exit;}
  7. if(panduan("uid,mot,ifmot","yjcode_user where mot='".$_GET[mob]."' and ifmot=1")==1){echo "True";exit;}
  8. if(strtolower($_SESSION["authnum_session"])!=strtolower($_GET[yzm])){echo "err1";exit;}
  9. if(!empty($rowcontrol[smsbig])){
  10. $sj1=strtotime(date("Y-m-d H:i:s",strtotime("-1 day")));
  11. $sj2=strtotime(getsj());
  12. if(returncount("yjcode_smsmaillog where uip='".getuip()."' and admin=2 and sj>".$sj1." and sj<".$sj2."")>=$rowcontrol[smsbig]){echo "errbig";exit;}
  13. }
  14. intotable("yjcode_smsmaillog","admin,fa,userid,txt,sj,uip","2,'".$mob."',".returnuserid($_SESSION["SHOPUSER"]).",'手机绑定',".strtotime(getsj()).",'".getuip()."'");
  15. while1("*","yjcode_smsmb where mybh='003'");
  16. if($row1=mysql_fetch_array($res1)){$txt=$row1[txt];}else{$txt="验证码:${yzm},您正在进行手机绑定,如果不是本人操作,请忽略此信息。";}
  17. $yz=MakePass(6);
  18. if(empty($rowcontrol[smsmode])){
  19. include("../config/mobphp/mysendsms.php");
  20. $str=str_replace("\${yzm}",$yz,$txt);
  21. yjsendsms($mob,$str);
  22. }else{
  23. if(1==$rowcontrol[smsmode]){$sms_txt="{yzm:'".$yz."'}";}else{$sms_txt="{\"yzm\":\"".$yz."\"}";}
  24. $sms_mot=$mob;
  25. $sms_id=$row1[mbid];
  26. @include("../config/mobphp/mysendsms.php");
  27. }
  28. updatetable("yjcode_control","smskc=smskc-1");
  29. updatetable("yjcode_user","bdmot='".$yz."',mot='".$_GET[mob]."' where uid='".$_SESSION[SHOPUSER]."'");echo "ok";exit;
  30. ?>