mobchk.php 1.4 KB

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