<?php 

@session_start();


	if($_SESSION['SECEXP'] !=''){

	}else{
		echo "Go And Fuck Your Self";die;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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">


</head>

<body>
	<div class="container">
		<div class="row inline">
			<div class="navstyle">
				

				
			</div>
			<div class="menus">
			<ul>
				  <?php echo innerAdminMenu()?>
			</ul>
		</div>

		</div>
        
        <div class="row">
        	<p align="center">
            	Date: &nbsp; <?php echo date('d-m-Y')?> &nbsp; Time: <?php echo date('h:i')?> &nbsp; :: &nbsp; 
            	<b style="font-size:27px; color:red; float:right; margin-right:50px;">
                <?php
                  $sqlB1 = 'SELECT balance FROM '.$DB->pre.'balance WHERE userCode="'.$_REQUEST['id'].'" ORDER BY balanceID DESC LIMIT 0,1';
                  $B1 = $DB->dbRow($sqlB1);
                    echo ($B1['balance']==''?'0000.00':$B1['balance']);
                ?> &emsp;&emsp;&emsp;&emsp; This Round 901</b>
            </p>
        </div>

 

        
        <div class="row">
            <div class="bz" style="width: 100%; background-color: rgb(255, 255, 255);">
                <div class="bz_01" style="width:967px; float: left; background-color: rgb(153, 252, 87);">
                    <div class="first-row">
                        
                        <a id="t1">User </a>
                        <a id="t2">Win </a>
                        <a id="t3">Play Box </a>
                        <a id="t4">User </a>
                        <a id="t2">Win </a>
                        <a id="t3">Play Box </a>
                        <a id="t4">User </a>
                        <a id="t2">Win </a>
                        <a id="t3">Play Box </a>
                    </div>
                    <div class="second_row">
						<?php
                                $drawTime = drawTime();
                              //  $drawTime = '5:15';
                               $sql = 'SELECT L.* FROM '.$DB->pre.'lottary as L
								LEFT JOIN mx_users as U on L.uID = U.id 
								 WHERE (U.underHead="'.$_REQUEST['id'].'" OR U.upperHead="'.$_REQUEST['id'].'") AND  L.lottime="'.$drawTime.'" AND lotDate="'.date('Y-m-d').'" AND isAdvance="1"';
                                $D = $DB->dbRows($sql);
                            
                                foreach($D as $D){
                                                $sqlU = 'SELECT userCode,winrate FROM '.$DB->pre.'users WHERE id="'.$D['uID'].'"';
                                                $U = $DB->dbRow($sqlU);
                                                


                         ?>
                        <div class="three_in_one">
                            <div class="p1"><p style="margin-left:2px;"><?php echo $U['userCode'];?>[<?php echo $D['point']?>] ADV</p></div>
                            <div class="p2"><p style="margin-left:2px;"><?php echo ($U['winrate']*$D['point']).'x'.$D['cv']?></p></div>
                            <div class="p3"><p><button type="button">
                            
                            <?php 
                                                    $cell = '';
                                                    if(strlen($D['cellID']) == 1){

                                                            echo "000".$D['cellID'];

                                                    }
                                                    if(strlen($D['cellID']) == 2){

                                                            echo "00".$D['cellID'];

                                                    }   
                                                    if(strlen($D['cellID']) == 3){

                                                            echo "0".$D['cellID'];

                                                    }
                                                    if(strlen($D['cellID']) == 4){

                                                            echo $D['cellID'];

                                                    }
                                                        ?>
                            </button></p></div>
                        </div>
                        <?php } ?>

                        

                    </div>
                </div>

                <div class="bz_02" style="width:365px; float: right; background-color: rgb(240, 243, 236);">
                    <div id="table02" style="width:360px; float:right;">    <!--  <div id="table02" style="width:360px; float:right;">  -->
                        <table>
                            <tr>
                                <th>Total </th>
                                <th>6016.50 </th>
                            </tr>
                            <tr>
                                <th>User Id</th>
                                <th>Ticket Amount</th>
                            </tr>
                            <tr>
                                <td>AB 65346 </td>
                                <td>125.00 </td>
                            </tr>
                            
                            <tr>
                                <td>AB 65346 </td>
                                <td>125.00 </td>
                            </tr>
                            
                            <tr>
                                <td>AB 65346 </td>
                                <td>125.00 </td>
                            </tr>
                            
                            <tr>
                                <td>AB 65346 </td>
                                <td>125.00 </td>
                            </tr>
                            
                            <tr>
                                <td>AB 65346 </td>
                                <td>125.00 </td>
                            </tr>
                            
                            <tr>
                                <td>AB 65346 </td>
                                <td>125.00 </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>




	</div>

</body>
</html>
