MOON
Server: Apache
System: Linux ip-208-109-13-31.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els4.x86_64 #1 SMP Sat Aug 31 06:58:57 UTC 2024 x86_64
User: durgeshpandey215 (1013)
PHP: 8.1.29
Disabled: NONE
Upload Files
File: /home/durgeshpandey215/www/zeeroprice.skilladders.com/myorders.php
<? require "application_top.php";
require "protect.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Transactions</title>	
	<!-- Meta tag Keywords -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta charset="utf-8">
	<meta name="keywords" content="" />
	<? require "scripts.php";?>
</head>

<body>
<? $pagename = "myorders"; require "header.php";?>

	<?
	$sqlmp = " * from orders_detail where userid=? order by id desc";
	$whereParams[] = $userid;
	//---------------pagination BOF---------------------------------------
	$from_where = $sqlmp; 
	//$whereParams[] = 0; required created above 
	$extra ="&extra=";
	$adjacents = 3;
	$limit = 10; 							//how many items to show per page
	$targetpage = $_SERVER['PHP_SELF']; 	//your file name  (the name of this file)
	require "pagination.php";
	?>
	<h1> My Orders (<?=$total_pages;?>)</h1>
	<br/>Note: To receive your ordered product you must share the OTP with delivery person.
	<br/><br/>
	<div class="w3-card w3-white w3-padding">
		<?if($total_pages){?>
		<div style="overflow-x:auto;">
		<table class="listingtable">
		<tr>
		<TH>Item</TH><TH><s>MRP</s><br/>Zeero Price</TH><TH>Status</TH>		
		</tr>
		<?
		$productArr = array();
		$sellerArr = array();
		foreach($rows as $rowod){
			if(!in_array($rowod['pid'],$productArr)){
			//get product details
			$db->where('pid',$rowod['pid']);
			$rowp = $db->getOne('products');
			if($rowp){
			$productArr[$rowod['pid']] = $rowp;
			}
			}
			if(!in_array($rowod['sellerid'],$sellerArr)){
			//get seller details
			$db->where('userid',$rowod['sellerid']);
			$sellerArr[$rowod['sellerid']] = $db->getOne('register');
			}
			$prdurl = HTTP_SERVER."buy-at-lowest-price/".friendlyURL($productArr[$rowod['pid']]["ititle"] ?? "")."_".encode($rowod["pid"]).".html";
		if($rowp){
		?>	
			<tr>
			<td>
			<img src="<?=HTTP_SERVER;?>images/products/<?=($productArr[$rowod['pid']]['pic1'])? $productArr[$rowod['pid']]['pic1']:"default.jpg";?>" style="width:90px;height:90px;"/>
			</td>
			<td>
			<s><?=currSign($productArr[$rowod['pid']]['currency'] ?? "");?>. <?=$rowod['mrp'];?></s>
			<br/>
			<?=currSign($productArr[$rowod['pid']]['currency'] ?? "");?>. <?=$rowod['customercost'];?>
			<br/>
			<font style="font-size:11px;"><?=date('d-M-Y',strtotime($rowod['postedon']));?> 
			<?=date('H:i:s',strtotime($rowod['postedon']));?><br/>
			Order# <?=$rowod['orderid'];?>
			</font>
			</td>
			<td style="text-align:center;">
				<? 
				if($rowod['isDelivered']){
					echo "Delivered";
				}elseif($rowod['isCancelled']){
					echo "Order Cancelled";
				}else{
					?>In Transit<br/>
					OTP:<b><?=$rowod['otp'];?></b>
					<?
				}
				?><br/>
				
			</td>
			</tr>
		<?}?>
		<?}?>
		</table>
		</div>
		<center><?=$pagination;?></center>
		
		<?}else{ ?>Dear <?=$fullnamesession?>,<br/>You don't have any orders yet <br/> <a href="<?=HTTP_SERVER;?>" class="mybtn">View All Products</a><?}?>
		
	</div>
 <br/><br/>
	
<? require "footer.php";?>