close_plate.php
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:2k
源码类别:

Web服务器

开发平台:

PHP

  1. <?php 
  2. include("../inc/conn.php");
  3. session_start();
  4. include("check.php");
  5. $user=$_SESSION["user"];
  6. $sqlp=mysql_query("select * from ptime where sign='4'",$conn); 
  7. $opstate=mysql_result($sqlp,0,"opstate"); 
  8. $hand=mysql_result($sqlp,0,"hand");
  9. if($hand==0)
  10. {
  11. $sqlop=mysql_query("select * from ptime where now_sign='1'",$conn); 
  12. $open_time=mysql_result($sqlop,0,"open_time"); 
  13. $tnum_time=mysql_result($sqlop,0,"tnum_close_time"); 
  14. if($opstate==1)
  15. {
  16. $ltime=split(" ",$open_time);
  17. $ymd=split("-",$ltime[0]);
  18. $hms=split(":",$ltime[1]);
  19. $open_times=mktime($hms[0],$hms[1],$hms[2],$ymd[1],$ymd[2],$ymd[0]);  
  20. $limit_time=$open_times-time();
  21. $ttime=split(" ",$tnum_time);
  22. $tymd=split("-",$ttime[0]);
  23. $thms=split(":",$ttime[1]);
  24. $topen_times=mktime($thms[0],$thms[1],$thms[2],$tymd[1],$tymd[2],$tymd[0]);  
  25. $tlimit_time=time()-$topen_times;
  26.   if($limit_time<=0&&$tlimit_time<=0)
  27.   {
  28.    //mysql_query("update num set bnum='0'",$conn);  //更新倍数
  29.    $sqls=mysql_query("update ptime set opstate='0',tnum='0',other='0' where sign='4'",$conn);
  30.    if($sqls) echo "<meta http-equiv='refresh' content='20;URL=umain.php'>";
  31.   }
  32.  }
  33. }
  34. ?>
  35. <head>
  36. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  37. <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
  38. <style type="text/css">
  39. <!--
  40. body {
  41. margin-left: 10px;
  42. }
  43. -->
  44. </style></head>
  45. <body>
  46. <br>
  47. <table width="67%" height="81"  border="0" cellpadding="10" cellspacing="1" bgcolor="#FF0000">
  48.   <tr>
  49.     <td bgcolor="#417dec" ><div align="left"><img src="../img/message.gif" width="20" height="20"> 目前非下单时段!</div></td>
  50.   </tr>
  51. </table>
  52. </body>