halohalo
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
aramiyarkai
/
public_html
/
admin
/
Upload FileeE
HOME
<?php if(isset($_GET['fromto'])&& $_GET['fromto']!='') { include_once "dbc.php"; error_reporting (0); $fromto = $_GET['fromto']; $explod = explode("-",$fromto); $fromdate=$explod[0]; $sqldate = strtotime($fromdate); $fromdatesql = date("Y-m-d",$sqldate); $todate=$explod[1]; $sqldate1 = strtotime($todate); $todatesql = date("Y-m-d",$sqldate1); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>FROM <?php echo $fromdate; ?> TO <?php echo $todate; ?>ORDER REPORT</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <style type="text/css" media="print"> .hide { display: none } </style> <script type="text/javascript"> function printpage() { document.getElementById('printButton').style.visibility="hidden"; window.print(); document.getElementById('printButton').style.visibility="visible"; } </script> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/main.min.css"> <body> <h3 align="center"><strong>Order Report</strong></h3> <h5 align="right"><strong>From</strong> <?php echo $fromdate; ?> <strong>To</strong> <?php echo $todate; ?></h5> <input name="print" type="button" value="Print" id="printButton" onClick="printpage()" class="btn btn-primary"> <table id="dataTable" class="table table-bordered table-condensed table-hover table-striped"> <thead> <tr> <th>S.NO</th> <th>Date</th> <th>Order Id</th> <th>Customer Details</th> <th>Pincode</th> <th>Product Details</th> <th>Total</th> <th>Status</th> </tr> </thead> <tbody> <?php $sno=1; $sel_order = mysqli_query($link,"select * from shopping_tbl where order_date BETWEEN '$fromdatesql' AND '$todatesql' group by `order_id` order by id desc "); while($rw_order = mysqli_fetch_object($sel_order)){ $cust = $rw_order->customer_details; $cus = explode(",",$cust); $name = $cus[0]; $mobile = $cus[1]; $email = $cus[2]; ?> <tr> <td><?php echo $sno;?></td> <td>Ordered On: <?php echo $rw_order->order_date;?><br>Last Updated: <?php echo $rw_order->order_modified;?></td> <td><?php echo $order_id = $rw_order->order_id;?></td> <td class="center"> <?php echo $name; ?><br><?php echo $mobile; ?><br><?php echo $email; ?><br> <?php echo $rw_order->delivery_details; ?> </td> <td><?php echo $rw_order->pincode; ?></td> <td> <?php $sel_order1 = mysqli_query($link,"select * from shopping_tbl where order_id='$order_id' order by id desc "); while($rw_order1 = mysqli_fetch_object($sel_order1)){ $pid = $rw_order1->product_id; list($product_name,$product_name_en,$size) = mysqli_fetch_row(mysqli_query($link,"select `product_name`,`product_name_en`,`size` from product_tbl where product_id='$pid'")); ?> <?php echo $product_name_en; ?> (<?php echo $size; ?> * <?php echo $rw_order1->quantity; ?>)<br> <?php } ?> </td> <td class="center"><?php echo $rw_order->grand_total; ?></td> <td class="center"><?php echo $rw_order->item_status;?></td> </tr> <?php $sno++; } ?> </tbody> </table> </body> </html> <?php } ?>