
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=11" >
<link rel="stylesheet" type="text/css" href="<?php echo SITEURL?>/css/style.css">

<style>
/*Total Result Pages */


/* menu CSS */


.total_menus ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: rgba(0, 255, 213, 0.377);
}

.total_menus li {
  float: left;
}

.total_menus li a {
  display: block;
  color: black;
  text-align: center;
  font-size: 22px;
  font-weight:800;
  padding: 5px;
  padding-left: 25px;
  padding-right: 25px;
  text-decoration: none;
}

.total_menus img{
	width: 25px;
	height: 25px;
	padding-left: 5px;
	padding-right: 5px;
}

.total_menus li a:hover {
  background-color: rgba(17, 17, 17, 0.404);
  color: red;
}

.total_ten_section{
	
}

.total_time{
	text-align: center; 
	border: 1px solid black;
	color: rgb(255, 81, 0);
}

.total_100_data{
	background-color: rgba(111, 243, 59, 0.507); 
	border: 1px solid black;
	width:100%;
}


.total_10{
	/*display: inline; */
	border: 1px solid #FC3; 
	text-align: center; 
	padding: 0px;
	
	height:40;
	margin-top:2px;
	margin-left:1px;
	line-height:35px;
	font-size:22px;
	font-weight:800;
}
</style>

</head>

<body style="background-color:#CF9;">
	<div class="total_menus">
		<ul style="background-color:red;">

			<li style="margin-left: 5em;"><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&frmdate=<?php echo $_REQUEST['frmdate']?>">All </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=0000&frmdate=<?php echo $_REQUEST['frmdate']?>">0000 </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=1000&frmdate=<?php echo $_REQUEST['frmdate']?>">1000 </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=2000&frmdate=<?php echo $_REQUEST['frmdate']?>">2000 </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=3000&frmdate=<?php echo $_REQUEST['frmdate']?>">3000 </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=4000&frmdate=<?php echo $_REQUEST['frmdate']?>">4000 </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=5000&frmdate=<?php echo $_REQUEST['frmdate']?>">5000 </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=6000&frmdate=<?php echo $_REQUEST['frmdate']?>">6000 </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=7000&frmdate=<?php echo $_REQUEST['frmdate']?>">7000 </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=8000&frmdate=<?php echo $_REQUEST['frmdate']?>">8000 </a></li>
			<li><a href="<?php echo SITEURL?>/lottery/lottery-result/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>&sernum=9000&frmdate=<?php echo $_REQUEST['frmdate']?>">9000 </a></li>

		</ul>
	</div>
    <hr>
	<div class="container-float" style="border: 1px solid black;margin-top:30px;">

		<!-- SECTION REPIT START -->
		
		<div class="total_ten_section">
			
            <?php
				$where = '';
				if($_REQUEST['sernum'] !=''){
					$where = ' AND sernum="'.$_REQUEST['sernum'].'"';
				}
				$sqlAD = 'SELECT adminID FROM '.$DB->pre.'users WHERE id="'.$_REQUEST['userID'].'" ';
				$AD = $DB->dbRow($sqlAD);
				$adminID = $AD['adminID'];
				$drawTimeCur = drawTime();
      		//	echo $_REQUEST['frmdate'];
            	$sql = 'SELECT lotTime FROM '.$DB->pre.'result_tran WHERE uID="'.$adminID.'" AND lotdate="'.$_REQUEST['frmdate'].'" AND lotTime <> "'.$drawTimeCur.'"'.$where.' GROUP BY lotTime ORDER BY lotID DESC';
				$R = $DB->dbRows($sql);
				//print_r($R);
				foreach($R as $R){
                
			?>
            <div class="total_time" style="margin:0px auto; border:">
				<h2><?php echo $R['lotTime']?></h2>
			</div>
            <?php
            	$sqlW = 'SELECT cellID FROM '.$DB->pre.'result_tran WHERE uID="'.$adminID.'" AND lotdate="'.$_REQUEST['frmdate'].'" AND lotTime="'.$R['lotTime'].'" '.$where.' ORDER BY cellID';
				$W = $DB->dbRows($sqlW);

				
			?>

			<div class="total_100_data" style="border:0px solid #FC3; border-color:#FC3;">
				<?php
                    		foreach($W as $W){
                             
                             //   if($R['lotTime'] != $drawTimeCur){
					?>
                <div class="total_10" style="border:1px solid blue;width:9% !important;display: inline-block">
				<?php 
					echo $W['cellID'];
				
				?></div>
                        <?php 
                           // }
              ?>
                
				
                <?php } 
                }
              ?>
			</div>

		</div>

		<!-- END OF SECTION -->	
        
	</div>

</body>
</html>