
<?php 
//echo "1"; exit;
require "_header.php";

/*echo "<pre>";
print_r($_REQUEST);*/
//exit;

$email_ids != "";
$customer_id = Escape($_REQUEST['ID']);

//echo $taluka_id; exit;

 ob_start(); ?>
<div id="main-report" align="center">



<?php


$cond1 = "";
$cond2 = "";
		 $cond = "";
		if($customer_id != "" ){
			$cond .= " AND quantity = 16";
			$cond .= " AND product_name = 'Finger Print Scanner MFS100V54 1pc'";
			
		}
		
	 $sql = "SELECT * FROM csc_customer where 1=1 
					";
	 $sql .= $cond;
	 $sql .= "";  
	
	
	
	$result=dbQuery($sql);
	$srno = 1;
	$temp = "";
	$page_break=1;
	if(dbRows($result)>0){
		?>		
		 
		<?php
		while($row=dbArray($result)){
			?>
		 
		 <table cellpadding="0" cellspacing="0" align="center" width="25%"   style="border: 0px;page-break-after: always;" >
			<tr align="left" style="border: 0px;">
			<td style="border: 0px;"><div style="height:50px;width:300px;border:solid 2px black;"><font size="4"><b>Speed Post<br>		
			BNPL ID: 3000062737</br></b></font></div></td>
			</tr>
			<tr align="left" style="border: 0px;">
				<td style="border: 0px;"><b><font size="2">To</font></b></td>
			</tr>
			<tr align="left" style="border: 0px;">	
				<td style="border: 0px;"><b><font size="2"><?php echo $row['estore_name']; ?></font></b></td>
			</tr>	
			<tr align="left" style="border: 0px;">	
				<td style="border: 0px;"><b><font size="2"><?php echo $row['vendor_name']; ?></font></b></td>
			</tr>

			<tr align="left" style="border: 0px;">	
				<td style="border: 0px;"><b><font size="2"><?php echo $row['address']?></font></b></td>
			</tr>
			<tr align="left" style="border: 0px;">	
				<td style="border: 0px;"><b><font size="2">District - <?php echo $row['district']?></font></b></td>
			</tr>
			<tr align="left" style="border: 0px;">	
				<td style="border: 0px;"><b><font size="2">State - <?php echo $row['state']?></font></b></td>
			</tr>
			<tr align="left" style="border: 0px;">	
				<td style="border: 0px;"><b><font size="2">Contact - <?php echo $row['estore_phoneno']?></font></b></td>
			</tr>
			<tr align="left" style="border: 0px;">	
			<td style="border: 0px;"><b><font size="2">Order Id - <?php echo $row['order_no']?> - <?php echo substr($row['product_name'],0,1).' - '.$row['quantity'];?></font></b></td>
			</tr>
				<?php $orderno = $row['order_no'];
								$barcode= $orderno; ?>
			<tr align="left" style="border: 0px;">	
				<td height="20px" style="border: 0px;">  <?php echo "<img src='$SiteBaseUrl/bc.php?barcode=".$barcode."&width=300&height=58' alt='barcode' />";?></td>
			</tr>
			<tr style="border: 0px ">
			<td  style="border: 0px;padding-top:15px;"><b><font size="2">From</font></b></td>
			</tr>
			
			<tr  style="border: 0px;">	
				<td style="border: 0px;"><font size="2">Aum Imagineering Pvt Ltd.</font></td>
			</tr>	
			
			
			<tr  style="border: 0px;">	
				<td style="border: 0px;"><font size="2">602-603A Shapth-1, S.G. Highway,</font></td>
			</tr>
			<tr  style="border: 0px;">	
				<td style="border: 0px;"><font size="2">Opp.Rajpath Club, Ahmedabad-380015</font></td>
			</tr>
			<tr  style="border: 0px;">	
				<td style="border: 0px;"><font size="2">State - Gujarat</font></td>
			</tr>
			<tr  style="border: 0px;">	
				<td style="border: 0px;"><font size="2">Contact : - 079-40054004, 7600614640</font></td>
			</tr>
			
			
			
</table>
</br>
	 

	<?php 
		}
		$HtmlCode= ob_get_contents();
		ob_end_flush();
		$HtmlUrl 	=	"detail-list-". $_SESSION["eUserId"].".html";
		$HtmlPath 	=	"report/".$HtmlUrl;		
		createHTMLReportPage($header_row_string,$HtmlUrl,$HtmlPath,$HtmlCode,false); ?>		
		<br/>
		<form name="frm" id="frm" action="" method="post">		
			<input type="hidden" name="txtFile" id="txtFile" value="<?php echo $HtmlUrl ;?>" />
		 <input type="button" name="btnPdf" id="btnPdf" value="Print" onClick="SetPageAction('PRINT');"/>
			<input type="button" name="btnHtml" id="btnHtml" value="Create HTML" onClick="SetPageAction('HTML');"/>
			<input type="button" name="btnWord" id="btnWord" value="Create WORD" onClick="SetPageAction('WORD');"/>
			<input type="button" name="btnExcel" id="btnExcel" value="Create EXCEL" onClick="SetPageAction('Excel');"/>
		</form>
		<script language="javascript" type="text/javascript">
			function SetPageAction(varAction) {
					if(varAction=="PRINT"){			
                        document.frm.action="print/create-print.php";
                        document.frm.submit();
                    }
				else if(varAction=="HTML"){
					document.frm.action="<?php echo $HtmlPath ;?>";
					document.frm.target = "_blank";
					document.frm.submit();
				}
				else if(varAction=="WORD"){
					document.frm.action="convertword/create-word.php";
					document.frm.target="_blank";
					document.frm.submit();
				}
				else if(varAction=="Excel"){
					document.frm.action="convertword/create-excel.php";
					document.frm.target="_blank";
					document.frm.submit();
				}
			}
		</script><?php	
	} 


	
	
?>
<br/><br/><br/>
</div>	
<?php require "_footer.php";?>
