<?php 

include('../../connectdb.inc.php');

// error_reporting(1);die;
    

?>

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


<link rel="stylesheet" type="text/css" href="<?php echo SITEURL?>/css/style.css">

</head>

<body style="">
	<div class="container">
		

		<div class="row">
			<div class="a-form" style=" width:300px;border: 0px solid black;margin-left:0px">
				<ul class="tick_li" style="font-weight: 600; padding-left: 0px; list-style-type:none; margin-left:0px">
					<li><img src="<?php echo SITEURL?>/images/gd.png" style="width:50px;height:50px;"> Golden Winlot </li>
					<li>For Amusement Only</li>
					<li>Dr. <?php echo date('d-m-Y')?> <?php echo $_REQUEST['lotTime']?> </li>
                    <?php
                	$sqlL1 = 'SELECT point,uID,qtyTot,ticketTot,barcode,printTime FROM '.$DB->pre.'lottary WHERE tranID="'.$_REQUEST['tran'].'"';
					$L1 = $DB->dbRow($sqlL1);
					
					?>
					<li style="font-size:11px; margin-top:3px; margin-bottom:-5px">Per Ticket Point <?php echo $L1['point']?> </li>
				</ul>
				<div class="" style="background-color: rgb(255, 255, 255); width:68%;border:0px solid red;" >
					<table border="1px" style="font-size:11px;" width="100%">
					<tr>
						<th>No. </th>
						<th>Qty</th>
						<th>No. </th>
						<th>Qty</th>
                        <th>No. </th>
						<th>Qty</th>
                       
						
					</tr>
					</table>
				</div>

				<div class="row">
                <?php
                	 $sqlL = 'SELECT * FROM '.$DB->pre.'lottary WHERE tranID="'.$_REQUEST['tran'].'"  ORDER BY cellID ASC';
					$L = $DB->dbRows($sqlL);
					//print_r($L);
					
					
					
				?>
					<div class="ticket_2" style=" width:70%; padding-left: 0px; margin-left:0px; border:0px solid #000; ">

						<?php
							
                        	foreach($L as $L){
								
								 ?>
                                 <div style="width:20%; display:inline;border:0px solid red;text-align:center;font-weight:500;font-size:12px;">
                                 <b><?php 
                                     echo $L['cellID'];
                                   
                                    ?></b>
                                 </div>
                                 
                                 <div style="width:10%;display:inline;border:0px solid red;text-align:center;font-weight:500;font-size:12px;">
                                 	<b><?php echo $L['cv']?></b>
                                 </div>
                                  
                                <?php
								
							}
						?>
                        
                      
                                         
					</div>
					
				</div>
				<div class="text_second_only_print">
					<ul class="tick_li_print" style="font-weight: 600; margin-top: 15px;list-style-type:none;padding-left:0px; margin-left:0px">
						<li>Total Points  : <?php echo $L1['ticketTot'] ?> </li>
						<li>Dr. <?php echo date('d-m-Y')?> <?php echo $_REQUEST['lotTime']?> </li>
                        <li>Print Time : <?php echo $L1['printTime'] ?> </li>
						<li>TransactionID <?php echo $_REQUEST['tran']?> </li>
						<li style="font-size:11px; font-weight:bolder;">Retailer Id <?php echo $L1['uID']?> </li>
						<li class="name" style="font-size:11px; font-weight: bolder;">Code <b style="font-size:13px;"><?php 
							$sqlU = 'SELECT userCode FROM '.$DB->pre.'users WHERE id="'.$L1['uID'].'"';
							$U = $DB->dbRow($sqlU);
							echo $U['userCode'];
						?></b></li>
						<li>GSTIN : <b>27ahicd3924g1zh</b></li>
						<li style="margin-left: -17px; margin-top:5px;">
                        	<img class="barcode" src="<?php echo SITEURL?>/inc/barcode.php?text=<?php echo trim($L1['barcode'])?>&print=true">
                        </li>
                        
					</ul>
				</div>

 
			</div>
				
			
		</div>

	</div>

</body>
</html>
<style>
@media print {
  body {
		height: auto;
		width:100% ;
		font-size:10px;
		letter-spacing:2px;
		line-height:12px;
		margin-top:-8%;
	}
	.container .a-form{
		width:270px !important;
	}
	.barcode{
		margin:0;	
		width:70%;
		text-align:left;
		height:70px;
	}
	.bx1_only_print{
		line-height:12px;
		width:40px !important;
	}
	.name{
		margin-bottom:0%;
	}
	.tick01{
		display:inline-flex;
	}
	.tick01 .bx1_only_print{
		width:65px !important;
	}
	.tick01 .bx2_only_print{
		width:30px !important;
	}
	@page 
    {
        size: auto;   /* auto is the initial value */
        margin: 0mm;  /* this affects the margin in the printer settings */
    }
}
</style>
