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

Web服务器

开发平台:

PHP

  1. <?php 
  2. session_start();
  3. set_time_limit(1800);
  4. include("../inc/conn.php");
  5. $user=$_SESSION["user"];
  6. function ball($arr)
  7. {
  8.  $red="01,02,07,08,12,13,18,19,23,24,29,30,34,35,40,45,46";
  9.  $green="05,06,11,16,17,21,22,27,28,32,33,38,39,43,44,49";
  10.  $blue="03,04,09,10,14,15,20,25,26,31,36,37,41,42,47,48";
  11.  if(strstr($red,$arr))
  12.  { 
  13.   return "red";
  14.  }elseif(strstr($green,$arr))
  15.  {
  16.   return  "green";
  17.  }elseif(strstr($blue,$arr))
  18.   {
  19.   return  "blue";
  20.   }
  21. }
  22. function animal($num)
  23. {
  24. $a=array("鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪");
  25. $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");
  26. for($i=0;$i<=11;$i++)
  27.  {
  28.   if(strstr($b[$i],$num))
  29.   {
  30.    return $a[$i];
  31.    exit;
  32.   }
  33.  }
  34. }
  35. function week($d)
  36. {
  37. $ds=strftime("%w",strtotime($d));
  38.  switch($ds)
  39.  {
  40.   case "0":
  41.   return "日";
  42.   break;
  43.   case "1":
  44.   return "一";
  45.   break;
  46.   case "2":
  47.   return "二";
  48.   break;
  49.   case "3":
  50.   return "三";
  51.   break;
  52.   case "4":
  53.   return "四";
  54.   break;
  55.   case "5":
  56.   return "五";
  57.   break;
  58.   case "6":
  59.   return "六";
  60.   break;
  61.  }
  62. }
  63. $sqlc=mysql_query("select * from now_open where ID='1'",$conn);
  64.  $nrow=mysql_fetch_array($sqlc);
  65.  $pnum1=$nrow["num1"];
  66.      $pnum2=$nrow["num2"];
  67.  $pnum3=$nrow["num3"];
  68.  $pnum4=$nrow["num4"];
  69.      $pnum5=$nrow["num5"];
  70.  $pnum6=$nrow["num6"];
  71.  $pnum7=$nrow["num7"];
  72. ?><style type="text/css">
  73. <!--
  74. body {
  75. background-color: #4BA5DB;
  76. }
  77. -->
  78. </style>
  79. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  80. <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
  81. <table border="0" align=center cellpadding="0" cellspacing="0" class="tmove">
  82.     <tr>
  83.       <td height="45">
  84. <table border="0" align="center" cellpadding="0" cellspacing="1" class="t12">
  85. <tr class="t11"><td height="18" colspan="7"><div align="center" class="fw12"><strong>即时开奖</strong></div></td>
  86. </tr>
  87. <tr align="center" class="t11">
  88.   <td height="18" class="fw12">一</td>
  89.   <td height="18" class="fw12">二</td>
  90.   <td height="18" class="fw12">三</td>
  91.   <td height="18" class="fw12">四</td>
  92.   <td height="18" class="fw12">五</td>
  93.   <td height="18" class="fw12">六</td>
  94.   <td height="18" class="fw12">特码</td>
  95. </tr>
  96.   <tr class="t15">
  97.     <td><div align="center">
  98.         <table width="25" height="25"  border="0" align="center" cellpadding="0" cellspacing="0">
  99.           <tr>
  100.             <td background="../img/<?=ball($pnum1)?>.gif" class="style4"><div align="center" class="fbback">
  101.                 <?=$pnum1?>
  102.             </div></td>
  103.           </tr>
  104.         </table>
  105.     </div></td>
  106.     <td><div align="center">
  107.         <table width="25" height="25"  border="0" align="center" cellpadding="0" cellspacing="0">
  108.           <tr>
  109.             <td background="../img/<?=ball($pnum2)?>.gif" class="style4"><div align="center" class="fbback">
  110.                 <?=$pnum2?>
  111.             </div></td>
  112.           </tr>
  113.         </table>
  114.     </div></td>
  115.     <td><div align="center">
  116.         <table width="25" height="25"  border="0" align="center" cellpadding="0" cellspacing="0">
  117.           <tr>
  118.             <td background="../img/<?=ball($pnum3)?>.gif" class="style4"><div align="center" class="fbback">
  119.                 <?=$pnum3?>
  120.             </div></td>
  121.           </tr>
  122.         </table>
  123.     </div></td>
  124.     <td><div align="center">
  125.         <table width="25" height="25"  border="0" align="center" cellpadding="0" cellspacing="0">
  126.           <tr>
  127.             <td background="../img/<?=ball($pnum4)?>.gif" class="style4"><div align="center" class="fbback">
  128.                 <?=$pnum4?>
  129.             </div></td>
  130.           </tr>
  131.         </table>
  132.     </div></td>
  133.     <td><div align="center">
  134.         <table width="25" height="25"  border="0" align="center" cellpadding="0" cellspacing="0">
  135.           <tr>
  136.             <td background="../img/<?=ball($pnum5)?>.gif" class="style4"><div align="center" class="fbback">
  137.                 <?=$pnum5?>
  138.             </div></td>
  139.           </tr>
  140.         </table>
  141.     </div></td>
  142.     <td><div align="center">
  143.         <table width="25" height="25"  border="0" align="center" cellpadding="0" cellspacing="0">
  144.           <tr>
  145.             <td background="../img/<?=ball($pnum6)?>.gif" class="style4"><div align="center" class="fbback">
  146.                 <?=$pnum6?>
  147.             </div></td>
  148.           </tr>
  149.         </table>
  150.     </div></td>
  151.     <td><div align="center">
  152.         <table width="25" height="25"  border="0" align="center" cellpadding="0" cellspacing="0">
  153.           <tr>
  154.             <td background="../img/<?=ball($pnum7)?>.gif" class="style4"><div align="center" class="fbback">
  155.                 <?=$pnum7?>
  156.             </div></td>
  157.           </tr>
  158.         </table>
  159.     </div></td>
  160.   </tr>
  161. </table></td>
  162.     </tr>
  163.   </table>