ttimes.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:2k
源码类别:
Web服务器
开发平台:
PHP
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <?php
- $sql_report=mysql_query("select * from report where sign='2' order by time desc",$conn);
- $report_content=mysql_result($sql_report,0,"report_content");
- $sqlop=mysql_query("select * from ptime where now_sign='1'",$conn);
- $ntime=mysql_result($sqlop,0,"tnum_close_time"); //tnum
- $tms=substr($ntime,8,2);
- $times=substr($ntime,11);
- $ts=split(":",$times);
- $nowdate = date("Y")."/".date("m")."/".date("d")." ".date("H:i:s");
- $sqlps=mysql_query("select * from online where user_account='$user' and vmsg='1'",$conn);
- if(mysql_num_rows($sqlps)<>0)
- {
- mysql_query("update online set vmsg='0' where user_account='$user'",$conn);
- echo "<script language='javascript'>alert('".mysql_result($sqlps,0,"content")."')</script>";
- }
- ?>
- <table width="274" height="23" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="274"><div id="jtime"></div></td>
- </tr>
- </table>
- <script language=javascript>
- function tnum_time(liveclock){
- var jDate=<?=$tms?>;
- var jHour=<?=$ts[0]?>;
- var jMinute=<?=$ts[1]?>;
- var jSecond=<?=$ts[2]?>;
- var s='';
- var d=liveclock!=null?new Date(liveclock):new Date();
- with(d){
- NowDate=showtm(getDate());
- NowHour=showtm(getHours());
- NowMinute=showtm(getMinutes());
- NowSecond=showtm(getSeconds());
- tmtNowDate=jDate-NowDate;
- tmtHourleft = jHour - NowHour;
- tmtMinuteleft = jMinute - NowMinute;
- tmtSecondleft = jSecond - NowSecond;
- if (tmtSecondleft<0)
- {
- tmtSecondleft=60+tmtSecondleft;
- tmtMinuteleft=tmtMinuteleft-1;
- }
- if (tmtMinuteleft<0)
- {
- tmtMinuteleft=60+tmtMinuteleft;
- tmtHourleft=tmtHourleft-1;
- }if(tmtNowDate>0) tmtHourleft=(tmtNowDate*24)+tmtHourleft;
- if(tmtHourleft<0) window.location.href='close_plate.php';
- if(tmtMinuteleft<0) window.location.href='close_plate.php';
- if(tmtHourleft==0)
- {
- if(tmtMinuteleft==0)
- {
- if(tmtSecondleft==0)
- {
- window.location.href='close_plate.php';
- }
- }
- }
- stp=' <font color=#ffffff>距离截止下注时间还有 <b> '+tmtHourleft+' </b>时<b> '+tmtMinuteleft+' </b>分<b> '+tmtSecondleft+' </b>秒</font>';
- }
- return(stp);
- }
- function showtm(num){
- return num<10?'0'+num:num;
- }
- var tnumsgdd=new Date("<?=$nowdate?>");
- var ss=setInterval("tnumsgdd.setSeconds(tnumsgdd.getSeconds()+1);jtime.innerHTML=tnum_time(tnumsgdd)",1000)
- </script>