sms_sell.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. sesCheck();
  5. $userid=returnuserid($_SESSION["SHOPUSER"]);
  6. ?>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. <head>
  10. <meta http-equiv="x-ua-compatible" content="ie=7" />
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  12. <title>用户管理面板 - <?=webname?></title>
  13. <? include("cssjs.html");?>
  14. </head>
  15. <body>
  16. <div class="smsmain">
  17. <span class="s1">您有订单数据正在同步中</span>
  18. <span id="s2">0%</span>
  19. <span class="s3">(请不要刷新或关闭页面)</span>
  20. </div>
  21. <? $i=1;while1("*","yjcode_smsmail where userid=".$userid." and tyid=1 order by id asc");while($row1=mysql_fetch_array($res1)){?>
  22. <span id="smsid<?=$i?>" style="display:none"><?=$row1[id]?></span>
  23. <? $i++;}?>
  24. </body>
  25. <script language="javascript">
  26. var nowsms=1; //当前执行的顺序号
  27. var allsms; //最大的SMS顺序号
  28. allsms=<?=$i-1?>;
  29. if(allsms<=0){
  30. timeset();
  31. }else{
  32. userChecksms();
  33. }
  34. //SMSMAIL系统
  35. function timeset(){
  36. //parent.location.href="order.php";
  37. parent.layer.closeAll();
  38. }
  39. function userChecksms(){
  40. url1 = "sms_sell_chk.php";
  41. $.get(url1,{id:document.getElementById("smsid"+nowsms).innerHTML},function(result){
  42. if(result!=""){
  43. a=parseInt(nowsms/allsms*100);
  44. document.getElementById("s2").innerHTML=a+"%";
  45. if(allsms>nowsms){nowsms=nowsms+1;setTimeout("userChecksms()",4000);}else{timeset();}
  46. }
  47. });
  48. }
  49. </script>
  50. </html>