<?include("includes/connection.php")?>
<?include("includes/func.php")?>
<html>
<head>
<link href="images/class.css" rel="stylesheet" type="text/css">
<title>Design Your Ring </title>
</head>
<?
if ($_POST["startagain"]!='') {
	redirect("chooseoptions.php?product=".pdbfx("product"));
}

?>
<body>

<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr align="center" class="heading"> 
	<td class="toplinks" align=left colspan=2><font  size=2><strong>Your Order Status </font></strong></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#EEB94A">
<tr align="center" class="heading"> 
	<td  align=left width="30%" bgcolor="#FFFFFF">
	<b>Order No.</b></td>
	<td  align=left width="30%" bgcolor="#FFFFFF">
	<b>Order Date</b></td>
	<td  align=left width="30%" bgcolor="#FFFFFF">
	<b>Amount</b></td>
	<td  align=left width="30%" bgcolor="#FFFFFF">
	<b>Status</b></td>
	
 </tr>
<?
$sql="select order_serial,order_date,order_amount,order_status from order_master O,user_master U where U.user_type=3 AND U.active=1 AND U.user_id=".$_SESSION["userid"] . "  and U.user_id=O.order_user_id Order by 1 desc";

$cmd = mysql_query($sql);
while ($rs = mysql_fetch_array($cmd)) {
	$i=$i+1;?>
<tr align="center" class="heading"> 
	<td  align=left width="30%" bgcolor="#FFFFFF">
	<font  size=2><a href="order_details.php?id=<?=$rs["order_serial"];?>"><?=$rs["order_serial"];?></a></font></td>
	<td  align=left width="30%" bgcolor="#FFFFFF">
	<font  size=2><?=$rs["order_date"];?></font></td>
	<td  align=left width="30%" bgcolor="#FFFFFF">
	<font  size=2>$ <?=$rs["order_amount"];?></font></td>
	<td  align=left width="30%" bgcolor="#FFFFFF">
	<font  size=2>
	<? if ($rs["order_status"]==0) echo "<small>Lead time is 4 months from date of order</small>";?>
	<? if ($rs["order_status"]==3) echo "Rejected";?>
	<? if ($rs["order_status"]==2) echo "In Process";?>
	<? if ($rs["order_status"]==4) echo "Ready For Delivery";?>
	<? if ($rs["order_status"]==5) echo "Delivered";?>
	</font></td>
 </tr>
 <?}?>
 <?if ($i==0) {?>
 <tr align="center" class="heading"> 
	<td  align=left width="100%" bgcolor="#FFFFFF" colspan=4>
	<b>No Order in Your account.</b></td>
	
	
 </tr>
 <?}?>
</table>








</body>
</html>