utop_ref.php
资源名称:Nsix.rar [点击查看]
上传用户:m68239277
上传日期:2014-10-12
资源大小:824k
文件大小:3k
源码类别:
Web服务器
开发平台:
PHP
- <?php
- session_start();
- set_time_limit(1800);
- include("../inc/conn.php");
- function ball($arr)
- {
- $red="01,02,07,08,12,13,18,19,23,24,29,30,34,35,40,45,46";
- $green="05,06,11,16,17,21,22,27,28,32,33,38,39,43,44,49";
- $blue="03,04,09,10,14,15,20,25,26,31,36,37,41,42,47,48";
- if(strstr($red,$arr))
- {
- return "red";
- }elseif(strstr($green,$arr))
- {
- return "green";
- }elseif(strstr($blue,$arr))
- {
- return "blue";
- }
- }
- function animal($num)
- {
- $a=array("鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪");
- $b=array("11.23.35.47","10.22.34.46","09.21.33.45","08.20.32.44","07.19.31.43","06.18.30.42","05.17.29.41","04.16.28.40","03.15.27.39","02.14.26.38","01.13.25.37.49","12.24.36.48");
- for($i=0;$i<=11;$i++)
- {
- if(strstr($b[$i],$num))
- {
- return $a[$i];
- exit;
- }
- }
- }
- function week($d)
- {
- $ds=strftime("%w",strtotime($d));
- switch($ds)
- {
- case "0":
- return "日";
- break;
- case "1":
- return "一";
- break;
- case "2":
- return "二";
- break;
- case "3":
- return "三";
- break;
- case "4":
- return "四";
- break;
- case "5":
- return "五";
- break;
- case "6":
- return "六";
- break;
- }
- }
- $sqlc=mysql_query("select * from now_open where ID='1'",$conn);
- $nrow=mysql_fetch_array($sqlc);
- $dates=$nrow["dates"];
- if(strlen($dates)==1) $dates="00".$dates;
- if(strlen($dates)==2) $dates="0".$dates;
- $num1=$nrow["num1"];
- if($num1=="") $num1=0;
- $num2=$nrow["num2"];
- if($num2=="") $num2=0;
- $num3=$nrow["num3"];
- if($num3=="") $num3=0;
- $num4=$nrow["num4"];
- if($num4=="") $num4=0;
- $num5=$nrow["num5"];
- if($num5=="") $num5=0;
- $num6=$nrow["num6"];
- if($num6=="") $num6=0;
- $num7=$nrow["num7"];
- if($num7=="") $num7=0;
- ?>
- <script language="javascript">
- parent.dates.innerText="<?=$dates?>";
- parent.ball01.background="../img/<?=ball($num1)?>.gif";
- parent.num01.innerText="<?=$num1?>";
- parent.ball02.background="../img/<?=ball($num2)?>.gif";
- parent.num02.innerText="<?=$num2?>";
- parent.ball03.background="../img/<?=ball($num3)?>.gif";
- parent.num03.innerText="<?=$num3?>";
- parent.ball04.background="../img/<?=ball($num4)?>.gif";
- parent.num04.innerText="<?=$num4?>";
- parent.ball05.background="../img/<?=ball($num5)?>.gif";
- parent.num05.innerText="<?=$num5?>";
- parent.ball06.background="../img/<?=ball($num6)?>.gif";
- parent.num06.innerText="<?=$num6?>";
- parent.ball07.background="../img/<?=ball($num7)?>.gif";
- parent.num07.innerText="<?=$num7?>";
- </script>
- <meta http-equiv="refresh" content="20">