File: /home/durgeshpandey215/public_html/zeeroprice.skilladders.com/product-response.php
<? require "application_top.php";
require "protect.php";
$pid = isset($_REQUEST['id'])? decode($_REQUEST['id']):0 ;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Responses</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 = "responses"; require "header.php";?>
<div class="w3-bar w3-medium">
<a href="#" class="w3-bar-item w3-button w3-border w3-right noteicon"><i class="fa fa-lightbulb-o"></i> Help</a>
<a href="<?=HTTP_SERVER;?>approvedResponses.php" class="w3-bar-item w3-button w3-border w3-right">Approved Responses</a>
</div>
<div class="tip w3-border w3-card" style="display:none;">
<span onclick="this.parentElement.style.display='none'" class="w3-button w3-large w3-display-topright">×</span>
To approve a response click on "Sell Now" button. A notification with OTP will be sent to buyer to confirm transaction when he/she receives the delivery.
On completion of delivery, your account will be credited instantly with the balance amount (if any).
</div>
<?
$db->where('pid',$pid);
$db->orderBy('id','desc');
$rowod = $db->getOne('orders_detail');
?>
<h1 class="heading">Customer Responses </h1>
<br/>
<div class="w3-card w3-white w3-padding">
<?if($rowod){
?>
<div style="overflow-x:auto;">
<table class="listingtable">
<tr>
<TH>Item (MRP)</TH><TH>Customer Name (Mobile)</TH>
<TH>Zeero Price</TH>
<TH>Status</TH>
<TH>Date</TH>
</tr>
<?
$productArr = array();
$customerArr = array();
if(!in_array($rowod['pid'],$productArr)){
//get product details
$db->where('pid',$rowod['pid']);
$productArr[$rowod['pid']] = $db->getOne('products');
}
if(!in_array($rowod['userid'],$customerArr)){
//get customer details
$db->where('userid',$rowod['userid']);
$customerArr[$rowod['userid']] = $db->getOne('register');
}
if(count($productArr)){
$prdurl = HTTP_SERVER."buy-at-lowest-price/".friendlyURL($productArr[$rowod['pid']]["ititle"] ?? '')."_".encode($rowod["pid"]).".html";
}else{
$prdurl = "#";
}
?>
<tr>
<td style="text-align:center;">
<a href="<?=$prdurl;?>"><img src="<?=HTTP_SERVER;?>images/products/<?=($productArr[$rowod['pid']]['pic1'] ?? "")? $productArr[$rowod['pid']]['pic1']:"default.jpg";?>" style="width:90px;height:90px;"/></a>
<br/>
<?=currSign($productArr[$rowod['pid']]['currency'] ?? "");?>. <?=$rowod['mrp'];?>
</td>
<td style="text-align:center;">
<?=$customerArr[$rowod['userid']]['fullname'];?><br/>
<a href="tel:<?=$customerArr[$rowod['userid']]['mobno'];?>">
<img src="<?=HTTP_SERVER;?>/images/call.png" class="icons"/></a>
</td>
<td>
<?=currSign($productArr[$rowod['pid']]['currency'] ?? "");?>. <?=$rowod['customercost'];?>
<br/>
<form action="<?=HTTP_SERVER;?>approveOrder.php?id=<?=encode($rowod['orderid']);?>" method="post" class="commonform">
<input type="submit" class="submitbutton w3-btn w3-border w3-red" value="Sell Now"/>
</form>
</td>
<td style="text-align:center;">
<?=($rowod['isapproved'])? "Approved":"Pending";?>
<!--<a href="<?=HTTP_SERVER;?>handle.php?action=odstatus&id=<?=encode($rowod['orderid']);?>&newstatus=<?=($rowod['isapproved'])? 0 : 1;?>" title="Click to <?=($rowod['isapproved'])? "Deactivate" : "Activate";?> ">-->
</td>
<td style="text-align:center;font-size:12px;">
<?=date('d-M-Y',strtotime($rowod['postedon'] ?? ""));?><br/>
<?=date('H:i:s',strtotime($rowod['postedon'] ?? ""));?></td>
</tr>
</table>
</div>
<?}else{ ?><br/> No customer responses found<br/><br/><?}?>
</div>
<br/><br/>
<? require "footer.php";?>