<?php require "_header.php"; ?>
<div id="main-report" align="center">
	<center>
		<h4>Customer Order Report </h4>
	</center>
	<?php

	$csc_id = Escape($_REQUEST["csc_id"]);

	$header_row_string = "Customer Order Report  ";
	$totalproduct = 0;
	$finalgrandtotal = 0;

	ob_start();

	$sql = "select * from csc_customer where csc_id=$csc_id  ORDER BY order_date DESC";




	$result = dbQuery($sql);
	if (dbRows($result) > 0) {
		while ($row1 = dbArray($result)) {
			?>
			<table width="80%" class="report">
				<tr>
					<td width="70%" colspan="3" rowspan="2">
						<b>
							<?php echo $row1["estore_name"]; ?>
						</b class="mb-2">
						<br>
						<br />
						Billing Address:&nbsp;
						<?php echo $row1["address"]; ?>
						<br />
						<br>
						Shipping Address:&nbsp;<?php echo $row1["address1"]; ?>
						<br />

					</td>
					<td width="15%" style="text-align:center"><b>District</b><br /><?php echo $row1["district"]; ?></td>
					<td width="30%" style="text-align:center"><b>Transcation
							Date</b><br /><?php echo $row1["transcation_date"]; ?></td>
				</tr>
				<tr>
					<td style="text-align:center"><b>State</b><br /><?php echo $row1["state"]; ?></td>
					<td style="text-align:center"><b>Transcation Status</b><br /><?php echo $row1["transcation_status"]; ?></td>
				</tr>
				<?php
		}

		?>

		</table>
		<?php

		$HtmlCode = ob_get_contents();
		ob_end_flush();



		?>
		<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="btnPdf" id="btnPdf" value="Create PDF" onclick="SetPageAction('PDF');" />
			<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.target = "_blank";
					document.frm.submit();
				}
				if (varAction == "PDF") {
					document.frm.action = "convertpdf/create-pdf.php";
					document.frm.target = "_blank";
					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>
		<br />
		<br />
		<?php
	} else {
		echo "<b>No Data Found </b>";
	}

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