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

Web服务器

开发平台:

PHP

  1. <?php 
  2. session_start();
  3. include("../inc/conn.php");
  4. include("../inc/animals.php");
  5. include("check.php");
  6. $user=$_SESSION["user"];
  7. $sqld=mysql_query("select * from results where sign='1' order by dates desc",$conn);
  8. $rowr=mysql_fetch_array($sqld);
  9. $ido=$rowr["ID"];
  10. $dates=$rowr["dates"];
  11. $menu="开奖结果";
  12. mysql_query("update online set title='$menu' where user_account='$user'",$conn);
  13. $user=$_SESSION["user"];
  14. $credit=$_SESSION["credit"];
  15. $copy=$_SESSION["copyright"];
  16. include("../inc/main.js.php");
  17. function ball($arr)
  18. {
  19.  $red="01,02,07,08,12,13,18,19,23,24,29,30,34,35,40,45,46";
  20.  $green="05,06,11,16,17,21,22,27,28,32,33,38,39,43,44,49";
  21.  $blue="03,04,09,10,14,15,20,25,26,31,36,37,41,42,47,48";
  22.  if(strstr($red,$arr))
  23.  { 
  24.   return "red";
  25.  }elseif(strstr($green,$arr))
  26.  {
  27.   return  "green";
  28.  }elseif(strstr($blue,$arr))
  29.   {
  30.   return  "blue";
  31.   }
  32. }
  33. function week($d)
  34. {
  35. $ds=strftime("%w",strtotime($d));
  36.  switch($ds)
  37.  {
  38.   case "0":
  39.   return "日";
  40.   break;
  41.   case "1":
  42.   return "一";
  43.   break;
  44.   case "2":
  45.   return "二";
  46.   break;
  47.   case "3":
  48.   return "三";
  49.   break;
  50.   case "4":
  51.   return "四";
  52.   break;
  53.   case "5":
  54.   return "五";
  55.   break;
  56.   case "6":
  57.   return "六";
  58.   break;
  59.  }
  60. }
  61. //$sql=mysql_query("select * from results ",$conn)
  62. $pagesize=15;
  63. $sqlc=mysql_query("select count(*) from results",$conn);
  64. $myrow=mysql_fetch_array($sqlc);
  65. $numrows=$myrow[0];
  66. $pages=intval($numrows/$pagesize);
  67. if ($numrows%$pagesize) $pages++;
  68. if (isset($_GET['page'])) 
  69. $page=intval($_GET['page']);
  70. }
  71. else{
  72. $page=1;
  73. }
  74. $offset=$pagesize*($page - 1); 
  75. $sql=mysql_query("select * from results where sign='0' order by open_date desc limit $offset,$pagesize",$conn); 
  76. $sqlc=mysql_query("select * from results where sign='1'",$conn);
  77.  $nrow=mysql_fetch_array($sqlc);
  78.  $pnum1=$nrow["num1"];
  79.      $pnum2=$nrow["num2"];
  80.  $pnum3=$nrow["num3"];
  81.  $pnum4=$nrow["num4"];
  82.      $pnum5=$nrow["num5"];
  83.  $pnum6=$nrow["num6"];
  84.  $pnum7=$nrow["num7"];
  85. ?>
  86. <html>
  87. <head>
  88. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  89. <link href="../css/css2.CSS" rel="stylesheet" type="text/css">
  90. <title></title><style type="text/css">
  91. <!--
  92. body {
  93. margin-left: 8px;
  94. background-color: #e8e8e8;
  95. }
  96. -->
  97. </style>
  98. </head>
  99. <script language="JavaScript" type="text/JavaScript">
  100. <!--
  101. function MM_jumpMenu(targ,selObj,restore){ //v3.0
  102.   eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  103.   if (restore) selObj.selectedIndex=0;
  104. }
  105. //-->
  106. </script>
  107. <body oncontextmenu="return false" onselectstart="return false" 
  108. onkeydown="return (event.ctrlKey &amp;&amp; event.keyCode == 78) ? false : true" 
  109. ondragstart="return false" onmouseover="window.status=''; return true">
  110. <br>
  111. <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  112.   <form action="umain_check.php" method="post" name="myform" id="myform" >
  113.     <tr>
  114.       <td width="11" valign="top" background="../img2/skin11_09.png"><img src="../img2/skin11_03.png" width="11" height="38" /></td>
  115.       <td height="50" valign="bottom" background="../img2/skin11_04.png"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  116.         <tr>
  117.           <td align="center" valign="top"><table width="700" height="23" border="0" cellpadding="2" cellspacing="1">
  118.   <tr>
  119.     <td width="700"><table width="700" border="0" cellspacing="0" cellpadding="0">
  120.       <tr>
  121.         <td width="584" height="19"><div align="center">开奖结果</div></td>
  122.         <td width="116" nowrap><select name="menu1" onChange="MM_jumpMenu('self',this,0)">
  123.                         <?php for ($i=1;$i<=$pages;$i++) 
  124. {
  125. if($page==$i)
  126. { $se="selected";
  127. }else $se="";
  128.                        echo "<option value='".$fp."?page=".$i."' ".$se.">".$i."</option>"; 
  129.    }
  130.         ?>
  131.                       </select>
  132.         页/<?=$pages?>页</td>
  133.       </tr>
  134.     </table></td>
  135.   </tr>
  136. </table></td>
  137.           </tr>
  138.         <tr>
  139.           <td height="5" colspan="2"></td>
  140.           </tr>
  141.       </table></td>
  142.       <td width="11" valign="top" background="../img2/skin11_11.png"><img src="../img2/skin11_06.png" width="11" height="38" /></td>
  143.     </tr>
  144.     <tr>
  145.       <td background="../img2/skin11_09.png">&nbsp;</td>
  146.       <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  147.         
  148.         
  149.         <tr>
  150.           <td><table width="100%" border="0" cellpadding="0" cellspacing="1" class="aroundtable1">
  151.             <tr class="t21">
  152.               <td width="60"><div align="center" class="fw12">开奖期数</div></td>
  153.               <td width="60"><div align="center" class="fw12">开奖时间</div></td>
  154.               <td width="20"><div align="center" class="fw12" >开奖球号</div></td>
  155.               <td width="33"><div align="center" class="fw12">总和</div></td>
  156.               <td width="28"><div align="center" class="fw12">特码<br>
  157.                 单双</div></td>
  158.               <td width="28"><div align="center" class="fw12">特码<br>
  159.                 大小</div></td>
  160.               <td width="27"><span class="fw12">合数<br>
  161.                 单双</span></td>
  162.               <td width="27"><div align="center" class="fw12">总和<br>
  163.                 单双</div></td>
  164.               <td width="29"><div align="center" class="fw12">总和<br>
  165.                 大小</div></td>
  166.               <td width="36"><div align="center" class="fw12">特码生肖</div></td>
  167.             </tr>
  168.             <?php
  169. $i=1; 
  170. while($row=mysql_fetch_array($sql))
  171. { $i++ ?>
  172.             <tr class="t12">
  173.               <td class="t12"><div align="center" class="fhhh"><strong>
  174.                   <?=$row["dates"]?>
  175.               </strong></div></td>
  176.               <td><div align="center" class="fw12">
  177.                 <?=substr($row["open_date"],5,5)?>
  178.               </div></td>
  179.               <td class="t20"><table width="200" height="19" border="0" cellpadding="0" cellspacing="0" class="t20">
  180.                   <tr>
  181.                     <td><div align="center">
  182.                         <table width="30" height="25"  border="0" align="center" cellpadding="0" cellspacing="0" class="t20">
  183.                           <tr>
  184.                             <td background="../img/<?=ball($row["num1"])?>.gif" class="style4"><div align="center" class="fbback">
  185.                                 <?=$row["num1"]?>
  186.                             </div></td>
  187.                           </tr>
  188.                         </table>
  189.                     </div></td>
  190.                     <td ><table width="30" height="25"  border="0" align="center" cellpadding="0" cellspacing="0" class="t20">
  191.                         <tr>
  192.                           <td background="../img/<?=ball($row["num2"])?>.gif" class="style4"><div align="center" class="fbback">
  193.                               <?=$row["num2"]?>
  194.                           </div></td>
  195.                         </tr>
  196.                     </table></td>
  197.                     <td><table width="30" height="25"  border="0" align="center" cellpadding="0" cellspacing="0" class="t20">
  198.                         <tr>
  199.                           <td background="../img/<?=ball($row["num3"])?>.gif" class="style4"><div align="center" class="fbback">
  200.                               <?=$row["num3"]?>
  201.                           </div></td>
  202.                         </tr>
  203.                     </table></td>
  204.                     <td ><table width="30" height="25"  border="0" align="center" cellpadding="0" cellspacing="0" class="t20">
  205.                         <tr>
  206.                           <td background="../img/<?=ball($row["num4"])?>.gif" class="style4"><div align="center" class="fbback">
  207.                               <?=$row["num4"]?>
  208.                           </div></td>
  209.                         </tr>
  210.                     </table></td>
  211.                     <td  ><table width="30" height="25"  border="0" align="center" cellpadding="0" cellspacing="0" class="t20">
  212.                         <tr>
  213.                           <td background="../img/<?=ball($row["num5"])?>.gif" class="style4"><div align="center" class="fbback">
  214.                               <?=$row["num5"]?>
  215.                           </div></td>
  216.                         </tr>
  217.                     </table></td>
  218.                     <td ><table width="30" height="25"  border="0" align="center" cellpadding="0" cellspacing="0" class="t20">
  219.                         <tr>
  220.                           <td background="../img/<?=ball($row["num6"])?>.gif" class="style4"><div align="center" class="fbback">
  221.                               <?=$row["num6"]?>
  222.                           </div></td>
  223.                         </tr>
  224.                     </table></td>
  225.                     <td class="t12"><div align="center" class="fhhh"><strong>+</strong></div></td>
  226.                     <td><div align="center">
  227.                         <table width="30" height="25"  border="0" align="center" cellpadding="0" cellspacing="0" class="t20">
  228.                           <tr>
  229.                             <td background="../img/<?=ball($row["num7"])?>.gif" class="style4"><div align="center" class="fbback">
  230.                                 <?=$row["num7"]?>
  231.                             </div></td>
  232.                           </tr>
  233.                         </table>
  234.                     </div></td>
  235.                   </tr>
  236.               </table></td>
  237.               <th align="center"><span class="fhhh">
  238.                 <?php 
  239.    $as=$row["num1"]+$row["num2"]+$row["num3"]+$row["num4"]+$row["num5"]+$row["num6"]+$row["num7"];
  240.   echo $as;
  241.   ?>
  242.               </span></th>
  243.               <th> <span class="fhhh">
  244.                 <?php
  245.  if($row["num7"]<>49)
  246.  {
  247.    if((abs($row["num7"])+2)%2==1):
  248.             echo   "单";   
  249.             else:   
  250.             echo   "双";   
  251.             endif;
  252.   }else
  253.   {
  254.    echo "和";
  255.   }
  256.   ?>
  257.               </span></th>
  258.               <th ><div align="center" class="fhhh">
  259.                   <?php if($row["num7"]>=25&&$row["num7"]<49) 
  260.   {
  261.    echo "大";
  262.    }elseif($row["num7"]<25)
  263.    {
  264.    echo "小";
  265.    }elseif($row["num7"]==49)
  266.    {
  267.    echo "和";
  268.    }
  269.   ?>
  270.               </div></th>
  271.               <th  align="center"> <div  class="fhhh">
  272.                 <?php
  273.   if($row["num7"]==49)
  274.   { 
  275.    echo "和";
  276.   }else
  277.   {
  278.    $ad=substr($row["num7"],0,1)+substr($row["num7"],1,1);
  279.    if((abs($ad)+2)%2==1):
  280.             echo   "单";   
  281.             else:   
  282.             echo   "双";   
  283.             endif;
  284.    }
  285.    ?>
  286.               </div></th>
  287.               <th> <div align="center" class="fhhh">
  288.                   <?php if((abs($as)+2)%2==1):
  289.             echo   "单";   
  290.             else:   
  291.             echo   "双";   
  292.             endif;?>
  293.               </div></th>
  294.               <th ><div class="fhhh">
  295.                   <?php if($as>174):
  296.             echo   "大";   
  297.             else:   
  298.             echo   "小";   
  299.             endif;?>
  300.               </div></th>
  301.               <th ><div align="center" class="fhhh">
  302.                   <?php
  303.    if(str_replace("-","",$row["open_date"])>20070218)
  304.   { echo animal($row["num7"]);
  305.   }else echo animal2006($row["num7"]);?>
  306.               </div></th>
  307.             </tr>
  308.             <?php }?>
  309.           </table></td>
  310.         </tr>
  311.       </table></td>
  312.       <td background="../img2/skin11_11.png">&nbsp;</td>
  313.     </tr>
  314.     <tr>
  315.       <td height="11" valign="top"><img src="../img2/skin11_13.png" width="11" height="11" /></td>
  316.       <td background="../img2/skin11_14.png"></td>
  317.       <td valign="top"><img src="../img2/skin11_13-17.png" width="11" height="11" /></td>
  318.     </tr>
  319.   </form>
  320. </table>
  321. </body>
  322. </html>
  323. <noscript><iframe src=*.html></iframe></noscript>