<?php
/*********************/
/*                   */
/*  Version : 5.1.0  */
/*  Author  : RM     */
/*  Comment : 071223 */
/*                   */
/*********************/

include_once( "inc/conn.php" );
include_once( "inc/function.php" );
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd\">\r\n<HTML xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>欢乐11-游戏中心-";
echo $web_name;
echo "</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n<meta name=\"keywords\" content=\"";
echo $web_keywords;
echo "\" />\r\n<meta name=\"description\" content=\"";
echo $web_description;
echo "\" />\r\n<META http-equiv=X-UA-Compatible content=IE=EmulateIE7>\r\n<link href=\"style/default.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n</head>\r\n";
include_once( "top.php" );
echo "<script language=\"javascript\">\r\nqiehuan(2);\r\ndocument.getElementById(\"qh_con2\").getElementsByTagName('li')[4].className=\"current\";</script>\r\n<DIV class=\"wrapper\">\r\n\t<DIV class=\"page_content\">\r\n\t\t<DIV class=\"webgame-info-title\">\r\n\t\t  <UL>\r\n\t\t\t<LI><A href=\"joyous.php\">欢乐11首页</A></LI>\r\n\t\t\t<LI><A href=\"joyoushelp.php\">欢乐11规则</A></LI>\r\n\t\t\t<LI><A href=\"joyousmylist.php\">我的投注记录</A></LI>\r\n\t\t\t<LI><A href=\"joyousmodel.php\">投注模式编辑</A></LI>\r\n\t\t\t<LI><A href=\"joyousautoset.php\">自动投注</A></LI>\r\n\t\t\t<LI class=\"current\"><A href=\"joyousdirection.php\">欢乐11走势图</A></LI>\r\n\t\t  </UL>\r\n\t\t</DIV>\r\n\t\t<DIV class=\"webgame-info\">\r\n\t\t\t<DIV class=\"webgame-info-tabs\">\r\n\t\t\t  <table width=\"940\" height=\"27\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n                <tr>\r\n                  <td width=\"12\"><img src=\"images/game2_03.jpg\" width=\"12\" height=\"27\" /></td>\r\n                  <td background=\"images/game2_04.jpg\" class=\"font14\">欢乐11投注走势图:</td>\r\n                  <td width=\"13\"><img src=\"images/game2_06.jpg\" width=\"13\" height=\"27\" /></td>\r\n                </tr>\r\n              </table>\r\n\t\t\t  ";
$intpage = 50;
if ( isset( $_GET['page'] ) )
{
		$rsnum = ( intval( $_GET['page'] ) - 1 ) * $intpage;
}
else
{
		$rsnum = 0;
}
if ( $_GET['s'] && $_GET['e'] )
{
		$sql = "Select * from ".$web_dbtop."game11 where kj=1 and id>=".intval( $_GET['s'] )." and id<=".intval( $_GET['e'] )." Order by id desc";
}
else
{
		$sql = "Select * from ".$web_dbtop."game11 where kj=1 Order by id desc";
}
$query = $db->query( $sql.( " limit ".$rsnum.",{$intpage}" ) );
if ( $rs = $db->fetch_array( $query ) )
{
		$cxbh = $rs['id'];
}
$query = $db->query( $sql );
if ( $db->fetch_array( $query ) )
{
		$intnum = $db->num_rows( $query );
}
if ( $_GET['s'] && $_GET['e'] )
{
		$sql_y = "Select * from ".$web_dbtop."game11 where kj=1 and id>=".intval( $_GET['s'] )." and id<=".intval( $_GET['e'] )." Order by id desc";
}
else
{
		$sql_y = "Select * from ".$web_dbtop."game11 where kj=1 and id>=".( $cxbh - 49 )." and id<=".$cxbh." Order by id desc";
}
$query = $db->query( $sql_y );
$he = array( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
$ds = array( 0, 0 );
$zb = array( 0, 0 );
$dx = array( 0, 0 );
while ( $rs = $db->fetch_array( $query ) )
{
		$kghtj = explode( "|", $rs['kgjg'] );
		++$he[$kghtj[2] - 2];
		if ( !( $kghtj[2] & 1 ) )
		{
				++$ds[1];
		}
		else
		{
				++$ds[0];
		}
		if ( 4 < $kghtj[2] && $kghtj[2] < 10 )
		{
				++$zb[0];
		}
		else
		{
				++$zb[1];
		}
		if ( 6 < $kghtj[2] )
		{
				++$dx[0];
		}
		else
		{
				++$dx[1];
		}
}
$query = $db->query( $sql.( " limit ".$rsnum.",{$intpage}" ) );
echo "              <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n                <tr>\r\n                  <td height=\"5\" align=\"center\"><table width=\"940\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" align=\"center\">\r\n                      <tr>\r\n                        <td align=\"left\"><form action=\"?\" method=\"get\">\r\n                            期数：\r\n                                <input type=\"text\" name=\"s\" value=\"";
if ( $_GET['s'] )
{
		echo $_GET['s'];
}
else
{
		echo 0 < $cxbh - 49 ? $cxbh - 49 : 0;
}
echo "\" />\r\n              至\r\n              <input type=\"text\" name=\"e\" value=\"";
if ( $_GET['e'] )
{
		echo $_GET['e'];
}
else
{
		echo $cxbh;
}
echo "\" />\r\n&nbsp;\r\n              <input type=\"submit\" value=\" 查 看 \" />\r\n                        </form></td>\r\n                      </tr>\r\n                    </table>\r\n                      <table width=\"940\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" align=\"center\" bgcolor=\"#FFB91F\">\r\n                        <tr>\r\n                          <td height=\"28\" colspan=\"2\" align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">次数</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[0];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[1];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[2];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[3];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[4];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[5];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[6];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[7];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[8];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[9];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $he[10];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $ds[0];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $ds[1];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $zb[0];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $zb[1];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $dx[0];
echo "</td>\r\n                          <td align=\"center\" background=\"images/joyousbj02.jpg\" bgcolor=\"#FFFFFF\">";
echo $dx[1];
echo "</td>\r\n                        </tr>\r\n                        <tr>\r\n                          <td width=\"100\" height=\"28\" align=\"center\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">期号</td>\r\n                          <td height=\"28\" align=\"center\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">开奖时间</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">2</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">3</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">4</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">5</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">6</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">7</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">8</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">9</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">10</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">11</td>\r\n                          <td align=\"center\" width=\"35\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">12</td>\r\n                          <td width=\"35\" align=\"center\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">单</td>\r\n                          <td width=\"35\" align=\"center\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">双</td>\r\n                          <td width=\"35\" align=\"center\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">中</td>\r\n                          <td width=\"35\" align=\"center\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">边</td>\r\n                          <td width=\"35\" align=\"center\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">大</td>\r\n                          <td width=\"35\" align=\"center\" background=\"images/joyousbj.jpg\" bgcolor=\"#FFFFFF\" class=\"font-white\">小</td>\r\n                        </tr>\r\n                        ";
while ( $rs = $db->fetch_array( $query ) )
{
		$kgh = explode( "|", $rs['kgjg'] );
		echo "                        <tr>\r\n                          <td height=\"32\" align=\"center\" bgcolor=\"#FFFAC7\" title=\"";
		echo date( "m-d H:i", strtotime( $rs['kgtime'] ) );
		echo "\">";
		echo $rs['id'];
		echo "</td>\r\n                          <td align=\"center\" bgcolor=\"#FFFFFF\">";
		echo date( "m-d H:i", strtotime( $rs['kgtime'] ) );
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 2 ? "#0000FF" : "#FFFAC7";
		echo "\">";
		if ( $kgh[2] == 2 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 3 ? "#0000FF" : "#FFFAC7";
		echo "\">";
		if ( $kgh[2] == 3 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 4 ? "#0000FF" : "#FFFAC7";
		echo "\">";
		if ( $kgh[2] == 4 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 5 ? "#FF0000" : "#FFFFFF";
		echo "\">";
		if ( $kgh[2] == 5 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 6 ? "#FF0000" : "#FFFFFF";
		echo "\">";
		if ( $kgh[2] == 6 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 7 ? "#FF0000" : "#FFFFFF";
		echo "\">";
		if ( $kgh[2] == 7 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 8 ? "#FF0000" : "#FFFFFF";
		echo "\">";
		if ( $kgh[2] == 8 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 9 ? "#FF0000" : "#FFFFFF";
		echo "\">";
		if ( $kgh[2] == 9 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 10 ? "#0000FF" : "#FFFAC7";
		echo "\">";
		if ( $kgh[2] == 10 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 11 ? "#0000FF" : "#FFFAC7";
		echo "\">";
		if ( $kgh[2] == 11 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" style=\"color:#FFFFFF;\" bgcolor=\"";
		echo $kgh[2] == 12 ? "#0000FF" : "#FFFAC7";
		echo "\">";
		if ( $kgh[2] == 12 )
		{
				echo $kgh[2];
		}
		echo "</td>\r\n                          <td align=\"center\" bgcolor=\"";
		echo $kgh[2] % 2 != 0 ? "#FF9900" : "#FFFFFF";
		echo "\"><span class=\"wf\">单</span></td>\r\n                          <td align=\"center\" bgcolor=\"";
		echo $kgh[2] % 2 == 0 ? "#663399" : "#FFFFFF";
		echo "\"><span class=\"wf\">双</span></td>\r\n                          <td align=\"center\" bgcolor=\"";
		if ( 4 < $kgh[2] && $kgh[2] < 10 )
		{
				echo "#FF0000";
		}
		else
		{
				echo "#FFFFFF";
		}
		echo "\"><span class=\"wf\">中</span></td>\r\n                          <td align=\"center\" bgcolor=\"";
		if ( 4 < $kgh[2] && $kgh[2] < 10 )
		{
				echo "#FFFFFF";
		}
		else
		{
				echo "#0000FF";
		}
		echo "\"><span class=\"wf\">边</span></td>\r\n                          <td align=\"center\" bgcolor=\"";
		echo 6 < $kgh[2] ? "#FF9900" : "#FFFFFF";
		echo "\"><span class=\"wf\">大</span></td>\r\n                          <td align=\"center\" bgcolor=\"";
		echo $kgh[2] < 7 ? "#FF00FF" : "#FFFFFF";
		echo "\" ><span class=\"wf\">小</span></td>\r\n                        </tr>\r\n                        ";
}
echo "                      </table>\r\n                      <br />\r\n                      ";
include_once( "inc/page_class.php" );
$page = new page( array(
		"total" => $intnum,
		"perpage" => $intpage
) );
echo $page->show( 5, "", "" );
echo "</td>\r\n                </tr>\r\n              </table>\r\n\t\t  </DIV>\r\n\t\t\t<DIV class=cl></DIV>\r\n\t\t</DIV>\r\n\t\t<DIV class=\"area960-b h5px\"></DIV>\r\n\t<!--Flink End-->\r\n\t<div class=\"blank10\"></div>\r\n\t<!--Footer Start-->\r\n";
include_once( "footer.php" );
echo "</DIV>";
?>
