
<DOCTYPE html>
<html lang="en">
<head>

<link href="<?php echo SITEURL?>/css/styles.css" rel="stylesheet" />

<meta http-equiv="X-UA-Compatible" content="IE=10" >
<!--<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">-->


</head>
<body id="page-top" style="background-color:rgba(189, 247, 87, 0.51);" >

<!-- Navigation--> 

<!--nav class="navbar navbar-expand-lg navbar-dark fixed-top" id="mainNav"-->
<span id="cls-hide">
<div class="container-fluid">
	<table width="100%" style="text-align:center;font-size:22px;font-weight:bold;" cellpadding="5">
    	<tr id="resultTr">
            <td style="width:60px;">
                <img src="<?php echo SITEURL?>/images/002.png" style="width:150px;"/> 
            </td>
            
            <?php
                $sqlA = 'SELECT underHead FROM '.$DB->pre.'users WHERE id="'.$_REQUEST['userID'].'"';
                $A = $DB->dbRow($sqlA);

                $sqlM = 'SELECT underHead FROM '.$DB->pre.'users WHERE id="'.$A['underHead'].'"';
                $M = $DB->dbRow($sqlM);

                $lotTime = date("h:i", strtotime("-15 minutes", strtotime(drawTime())));
                $lotTime = '06:45';
                //$M['underHead']
                $userAdminID = getRetailerAdmin($_REQUEST['userID']);
                   $sqlR = 'SELECT cellID,lotnum FROM '.$DB->pre.'result_tran WHERE lotdate="'.date('Y-m-d').'" AND lotTime="'.$lotTime.'" AND uID="'.$userAdminID.'" AND sernum="0000" ORDER BY lotnum';
                $R = $DB->dbRows($sqlR);
                //print_r($R);
                if(count($R) > 0){


                foreach($R as $j=>$R){
                    $k[0] = 'width:100%;border:1px solid black;background-color:#f9a98e;';
                    $k[1] = 'width:100%;border:1px solid black;background-color:#71f4c3;';
                    $k[2] = 'width:100%;border:1px solid black;background-color:#ffda6c;';
                    $k[3] = 'width:100%;border:1px solid black;background-color:#a7daf9;';
                    $k[4] = 'width:100%;border:1px solid black;background-color:#9afb8d;';
                    $k[5] = 'width:100%;border:1px solid black;background-color:#eeb3ff;';
                    $k[6] = 'width:100%;border:1px solid black;background-color:#dddbdd;';
                    $k[7] = 'width:100%;border:1px solid black;background-color:#7bbed9;';
                    $k[8] = 'width:100%;border:1px solid black;background-color:#f7de5d;';
                    $k[9] = 'width:100%;border:1px solid black;background-color:#fba769;';
                    ?>
                    <td><div style="<?php echo $k[$j]?>">
                        <?php
                            $val = '';
                            if(strlen($R['cellID'])==1){
                                $val = $R['lotnum'].'0'.$R['cellID'];
                            }else{
                                $val = $R['lotnum'].$R['cellID'];
                            }
                            
                            echo $val;
                        ?>

                    </div></td>
                    <?php

                }
            }else{
                ?>

            
            <td><div style="width:100%;border:1px solid black;background-color:#f9a98e;">----</div></td>
            <td><div style="width:100%;border:1px solid black;background-color:#71f4c3;">----</div></td>
            <td><div style="width:100%;border:1px solid black;background-color:#ffda6c;">----</div></td>
            <td><div style="width:100%;border:1px solid black;background-color:#a7daf9;">----</div></td>
            <td><div style="width:100%;border:1px solid black;background-color:#9afb8d;">----</div></td>
            <td><div style="width:100%;border:1px solid black;background-color:#eeb3ff;">----</div></td>
            <td><div style="width:100%;border:1px solid black;background-color:#dddbdd;">----</div></td>
            <td><div style="width:100%;border:1px solid black;background-color:#7bbed9;">----</div></td>
            <td><div style="width:100%;border:1px solid black;background-color:#f7de5d;">----</div></td>
            <td><div style="width:100%;border:1px solid black;background-color:#fba769;">----</div></td>
                            
           
            
        
                <?php
            }

            ?>
            
           
        
        </tr>
    </table>
    
</div>
<div class="container-fluid">
	<table width="100%" cellpadding="5" style="font-size:18px;text-align:center;">
	    <tr>
        	<td style="width:19%;">
            	<div style="background-color:rgba(255,204,102,1);padding:5px;height:30px;line-height:20px;">V.200</div>
            </td>
            <td style="width:27%;">
            	<div style="background-color:rgba(255,204,102,1);padding:5px;height:30px;line-height:20px;">
                	<div style="width:50%;float:left;">Date : <b><?php date_default_timezone_set('Asia/Kolkata'); echo date('d-m-Y')?></b></div>
                    <div style="width:50%;float:right;">Time : <b><?php date_default_timezone_set('Asia/Kolkata');echo date('H:i')?></b></div>
                </div>
            </td>
            <td style="width:32%;">
            	<div style="background-color:rgba(255,204,102,1);padding:5px;height:30px;line-height:20px;">
                	<div style="width:53%;float:left;">Current Dr. : <b id="curDraw"></b></div>
                    <div style="width:47%;float:right;">Left Time : <b id="time"></b> 
                    <input type="hidden" value="" id="hideLotteryTime" name="hideLotteryTime"> 
                     <input id="hideUserID" name="hideUserID" type="hidden" value="<?php echo $_REQUEST['userID']?>">   
                     <input id="hideUserCode" name="hideUserCode" type="hidden" value="<?php echo $_REQUEST['u']?>">    
                    </div>
                </div>

            </td>
            <td style="width:22%;text-align:left !important;">
                <?php
                    $sqlB = 'SELECT balance FROM '.$DB->pre.'balance WHERE userCode="'.$_REQUEST['u'].'" ORDER BY balanceID DESC limit 0,1';
                    $B = $DB->dbRow($sqlB);
                ?>
            	<div style="background-color:rgba(255,204,102,1);padding:5px;height:30px;line-height:20px;">Point : <b><?php echo $B['balance']?></b></div>
            </td>
            
        </tr>
    </table>
</div>
<!--<div class="container-fluid">
	<div class="row">
    	<table width="100%;" style="text-align:center;">
        	<tr>
            	<td style="width:15%;">
                	<div style="width:95%;height:70px;margin:0px 5px;border:1px solid black;padding:2px;background-color:rgba(255,204,153,1);line-height:20px;"><input type="checkbox" style="float:left;" /> Point <input type="checkbox" style="float:right;" /><br>
                    `	&nbsp;
                        <input type="radio" id="rdoUserPoint2" name="rdoUserPoint" value="1" style="margin-left:15px;" checked="checked" /> 1
                        <input type="radio" id="rdoUserPoint3" name="rdoUserPoint" value="2" style="margin-left:15px;"/> 2<br>
                        <input type="radio" id="rdoUserPoint4" name="rdoUserPoint" value="3" style="margin-left:0px;"/> 3
                        <input type="radio" id="rdoUserPoint5" name="rdoUserPoint" value="4" style="margin-left:15px;"/> 4
                        <input type="radio" id="rdoUserPoint6" name="rdoUserPoint" value="5" style="margin-left:15px;"/> 5
                    </div>
                </td>
                <td><a id="srs0000" onClick="showSeries('00')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#f9a98e;"><label style="width:100%;">0000-0999</label><input type="checkbox" /></div></a></td>
                <td><a id="srs1000" onClick="showSeries('10')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#71f4c3;"><label style="width:100%;">1000-1999</label><input type="checkbox" /></div></a></td>
                <td><a id="srs2000" onClick="showSeries('20')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#ffda6c;"><label style="width:100%;">2000-2999</label><input type="checkbox" /></div></a></td>
                <td><a id="srs3000" onClick="showSeries('30')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#a7daf9;"><label style="width:100%;">3000-3999</label><input type="checkbox" /></div></a></td>
                <td><a id="srs4000" onClick="showSeries('40')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#9afb8d;"><label style="width:100%;">4000-4999</label><input type="checkbox" /></div></a></td>
                <td><a id="srs5000" onClick="showSeries('50')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#eeb3ff;"><label style="width:100%;">5000-5999</label><input type="checkbox" /></div></a></td>
                <td><a id="srs6000" onClick="showSeries('60')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#dddbdd;"><label style="width:100%;">6000-6999</label><input type="checkbox" /></div></a></td>
                <td><a id="srs7000" onClick="showSeries('70')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#7bbed9;"><label style="width:100%;">7000-7999</label><input type="checkbox" /></div></a></td>
                <td><a id="srs8000" onClick="showSeries('80')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#f7de5d;"><label style="width:100%;">8000-8999</label><input type="checkbox" /></div></a></td>
                <td><a id="srs9000" onClick="showSeries('90')"><div style="width:100%;line-height:15px;padding: 5px 0px;background-color:#fba769;"><label style="width:100%;">9000-9999</label><input type="checkbox" /></div></a></td>    
                <td style="padding:6px 10px;color:red;width:15%;" colspan="2">
                	<input type="checkbox" /> F11 Family
                </td>
            </tr>
        </table>
        
        <table width="100%">
        	<tr>
            	<!--<td style="width:15%;">
                	<div class="sr0" id="showSideSeries">
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('00')"  style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr0"><input type="button" value="0000-0099" onClick="showSeriesCaptionValue('0')" class="side-btn" style="background-color:#f9a98e;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;">
                                </div>
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('01')" style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr1"><input type="button" value="0100-0199" onClick="showSeriesCaptionValue('1')" class="side-btn" style="background-color:#71f4c3;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;" readonly>
                                </div>
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('02')" style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr2"><input type="button" value="0200-0299" onClick="showSeriesCaptionValue('2')" class="side-btn" style="background-color:#ffda6c;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;" readonly>
                                </div>
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('03')" style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr3"><input type="button" value="0300-0399" onClick="showSeriesCaptionValue('3')" class="side-btn" style="background-color:#a7daf9;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;" readonly>
                                </div>
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('04')" style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr4"><input type="button" value="0400-0499" onClick="showSeriesCaptionValue('4')" class="side-btn" style="background-color:#9afb8d;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;" readonly>
                                </div>
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('05')" style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr5"><input type="button" value="0500-0599" onClick="showSeriesCaptionValue('5')" class="side-btn" style="background-color:#eeb3ff;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;" readonly>
                                </div>
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('06')" style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr6"><input type="button" value="0600-0699" onClick="showSeriesCaptionValue('6')" class="side-btn" style="background-color:#dddbdd;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;" readonly>
                                </div>
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('07')" style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr7"><input type="button" value="0700-0799" onClick="showSeriesCaptionValue('7')" class="side-btn" style="background-color:#7bbed9;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;" readonly>
                                </div>
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('08')" style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr8"><input type="button" value="0800-0899" onClick="showSeriesCaptionValue('8')" class="side-btn" style="background-color:#f7de5d;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;" readonly>
                                </div>
                                <div style="display:flex;margin-top:2px;">
                                <input type="checkbox" /><div onClick="showSeriesCaptionColor('09')" style="width:100px;height:40px;margin:0px 5px;line-height:40px;" id="sr9"><input type="button" value="0900-0999" onClick="showSeriesCaptionValue('9')" class="side-btn" style="background-color:#fba769;"></div><input type="text" style="width:36%;height:22px;text-align:center;background-color:#9533f7;margin-top:18px;" readonly>
                                </div>
                            
                    </div>
                    
                </td>-->
            	<td>
                	<!-- Zero Series 1000 Box Start From Here  -->
                	<div class="sr0">
                    <!--<form id="frmLottery" name="frmLottery" method="GET" action="#" onSubmit="return false">
                        <table width="100%" style="text-align:center;margin-top:-15px;" id="sr001">
                            
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
                                <input type="text" style="width:10%;height: 22px;text-align:center;background-color: #9533f7" >
							<?php
								for($i = 0;$i<=99;$i++){
							
							 ?>
                                
                                <div class="tab-div">
                                	<p style="margin-bottom:0px;" id="p<?php echo ($i)?>"><?php 
									
									if(strlen($i) == 1){
										echo '000'.$i;
										
									}else if(strlen($i) == 2){
										echo '00'.$i;
									}else if(strlen($i) == 3){
										echo '0'.$i;
									}else{
										echo $i;
									}
									//setTotalValue(this);
									?></p>
                                	<input  type="text"   onKeyUp="setValue(this)"   id="<?php echo $i?>" name="<?php echo $i?>" class="tab-input" tabIndex='<?php echo $i?>' maxlength="3"/>
                                </div>
                            <?php } ?>
                                
                            
                            
                        </table>
                    </form>-->
                    </div>
                </td>
                <!--<td width="15%">
        			<table width="100%" class="right-panel" cellpadding="5" style="text-align:center;border:1px solid black;margin:0px 3px;margin-top:-15px;">
                        <tr>
                            <td><div style="background-color:rgba(204,102,0,1);">Qty</div></td>
                            <td><div style="background-color:rgba(204,102,0,1);">Point</div></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty1" name="qty1" readonly /></td>
                            <td><input type="text" name="point1" id="point1" value="" readonly /></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty2" name="qty2" readonly /></td>
                            <td><input type="text" name="point2" id="point2" value="" readonly /></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty3" name="qty3" readonly /></td>
                            <td><input type="text" name="point3" id="point3" value="" readonly /></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty4" name="qty4" readonly /></td>
                            <td><input type="text" name="point4" id="point4" value="" readonly /></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty5" name="qty5" readonly /></td>
                            <td><input type="text" name="point5" id="point5" value="" readonly /></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty6" name="qty6" readonly /></td>
                            <td><input type="text" name="point6" id="point6" value="" readonly /></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty7" name="qty7" readonly /></td>
                            <td><input type="text" name="point7" id="point7" value="" readonly /></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty8" name="qty8" readonly /></td>
                            <td><input type="text" name="point8" id="point8" value="" readonly /></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty9" name="qty9" readonly /></td>
                            <td><input type="text" name="point9" id="point9" value="" readonly /></td>
                        </tr>
                        <tr>
                            <td><input type="text" id="qty10" name="qty10" readonly /></td>
                            <td><input type="text" name="point10" id="point10" value="" readonly /></td>
                        </tr>
                    </table>
       			</td>-->
        	</tr>
        </table>
        <!--<table style="width:98%;">
        	<tr>
            	<td><div style="width:150px;background-color:rgba(0, 0, 0, 0);border: 1.5px solid black; text-align:center;" id="printTicket" class="pointer" onClick="saveTicket()">F6 Print</div></td>
                <td><div style="width:150px;background-color:rgba(0, 0, 0, 0);border: 1.5px solid black;text-align:center;"  class="pointer"><input style="width:147px;background-color:rgba(0, 0, 0, 0);text-align:center;" id="btnClear" name="btnClear" type="reset" value="F7 Clear"></div></td>
                <td><div style="width:150px;background-color:rgba(0, 0, 0, 0);border: 1.5px solid black;text-align:center;" class="pointer" onClick="location.reload()">F8 Reset</div></td>
                <td><div style="width:150px;background-color:rgba(0, 0, 0, 0);border: 1.5px solid black;text-align:center;"><a href="<?php echo SITEURL?>/lottery/adv-draw/?u=<?php echo $_REQUEST['u']?>&userID=<?php echo $_REQUEST['userID']?>">Advance Draw</a> </div></td>
                <td><div style="width:150px;background-color:rgba(0, 0, 0, 0);border: 1.5px solid black;text-align:center;">Barcode</div></td>
                <td><input type="text" class="form-control" id="txtBarcode" /></td>
                <td><div style="width:150px;background-color:rgba(0, 0, 0, 0);border: 1.5px solid black;text-align:center;">Total</div></td>
	            <td><div style="width:40px;"></div></td>
                <td><input style="width:50px;" value="" id="qtyTot" name="qtyTot"></td>
	<td><input style="width:50px;" value="" id="pointTot" name="pointTot"></td>
            </tr>
        </table>-->
    </div>
</div>
</span>

<div id="printableArea" style="display:none;">

</div>
<!-- Footer--> 
<!-- Bootstrap core JS--> 
<style>
.pointer{
    cursor: pointer;
}
@media print{
	#cls-hide{
		display:none;
	}
	body {
		height: 100%;
		width:100% ;
		font-size:14px;
		letter-spacing:2px;
		line-height:16px;
		margin-top:-8%;
	}
	html {
	  height: 100%;
	  width:100%;
	}
	body {
	  min-height: 100%;
	  min-width:100% ;
	}
	#printableArea{
		visibility:visible !important;
		display:block !important;
		
	}
	.barcode{
		margin-top:2%;	
		width:100%;
		
		text-align:center;
		height:70px;

	}
	.bx1_only_print .bx1_only_print{
		line-height:16px;
	}
	.name{
		margin-bottom:1%;
	}
	
}
</style>
<script type="text/javascript" language="javascript" src="<?php echo SITEURL?>/mod/lottery/x-lottery.inc.js"></script>

</body>
</html>
