mobreg.php 1.3 KB

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