File: /home/durgeshpandey215/public_html/zeeroprice.skilladders.com/trackorderdetail.php
<? require_once "application_top.php";
require_once "protect.php";
$orderid = (isset($_REQUEST["orderid"]))? $_REQUEST["orderid"] : "";
$sqlo = "select * from orders where orderid=? and userid = ? limit 1";
$paramo[] = $orderid;
$paramo[] = $_SESSION['useridsess'];
$rowso = $db->rawQuery($sqlo,$paramo);
if(count($rowso)){
$orderstatus = $rowso[0]['istatus'];
}else{
$_SESSION['msg'] = "Invalid access";
header('location:trackorder.php');exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Order Details</title>
<? require_once "scripts.php";?>
</head>
<body>
<? $pagename = 'shop'; require "header.php";?>
<div class="w3-col m12 w3-container"><!--w3-twothird starts here -->
<div class="w3-row">
<div class="w3-col s8">
<h1>Order Details</h1>
</div>
<div class="w3-col s4 w3-right-align">
<a href="transactions.php" class="w3-btn-gray">Back to Your Orders</a>
</div>
</div>
<?=$msg;?>
<div id="section-to-print" style="margin:0 auto;max-width:800px;">
<div class="w3-row">
<div class="w3-col s12">
<div id="printbutton"><a href="javascript:void(0);" onclick="window.print('section-to-print');"><img src="<?=HTTP_SERVER;?>images/print-icon.gif" style="width:30px;"/>Print</a></div>
</div>
</div>
<center><h2 class="left">Order # <?=$orderid;?></h2></center>
<?
//cart details
$total = 0;
$sql="select * from orders_detail where orderid = ? ";
$params[] = $orderid;
$rows=$db->rawQuery($sql,$params);
if(count($rows)){
?>
<div class="w3-row margintopbt">
<div class="w3-col s8"><b>Items Ordered</b></div>
<div class="w3-col s4" style="text-align:right;"><b>Price</b></div>
</div>
<?
foreach($rows as $cart_itm){
$prdurl = HTTP_SERVER."buy-at-lowest-price/".friendlyURL($cart_itm["ititle"])."_".encode($cart_itm["pid"]).".html";
$db->where('pid',$cart_itm['pid']);
$rowprd = $db->getOne('products');
$curren = currSign($rowprd['currency']);
?>
<div class="w3-row">
<div class="w3-col s8">
<a href="<?=$prdurl;?>">
<? if($rowprd['pic1'] != ""){ ?>
<img src="images/products/<?=$rowprd['pic1'];?>" style="max-height:85px;max-width:95px;"/>
<? }else{ ?>
<img src="images/default.png" style="max-height:85px;max-width:95px;"/>
<? } ?>
</a>
Qty: <?=round($cart_itm["qty"]);?>
<?=$cart_itm["ititle"];?>
<? $subtotal = ($cart_itm["finalcost"]*$cart_itm["qty"]); ?>
</div>
<div class="w3-col s4" style="text-align:right;">
<br/><?=$curren;?> <?=$subtotal;?>.00
</div>
</div>
<hr/>
<? $total = ($total + $subtotal); ?>
<?
}
?>
<div class="w3-row">
<div class="w3-col s8" style="text-align:right;"> </div>
<div class="w3-col s4" style="text-align:right;"><b>Total:</b> <?=$curren;?> <?=$total;?>.00</div>
</div>
<?
//user details
$sqlu = "select * from register where userid = ? limit 1";
$paramu[] = $rows[0]['userid'];
$rowsu = $db->rawQuery($sqlu,$paramu);
if(count($rowsu)){
?>
<div class="w3-row">
<div class="w3-col s12">
<b>Delivery Address:</b><br/>
C/O. <?=$rowsu[0]['fullname'];?><br/>
<i><?=$rowsu[0]['address'];?></i><br/>
<b>Mobile #:</b> <?=$rowsu[0]['mobno'];?><br/>
</div>
</div>
<div style="clear:both;"></div>
<hr/>
<?
}
}
?>
<div style="float:left;"><b>ORDER STATUS: </b><?=($orderstatus)? (($orderstatus==1)?"In Transit":"Delivered"):"Pending";?></div>
</div>
<br/><br/>
</div><!--w3-twothird ends here -->
<? include "footer.php";?>
</body>
</html>