File: /home/durgeshpandey215/public_html/zeeroprice.skilladders.com/view-cart.php
<?include "application_top.php";
require "protect.php";
$current_url = encode($url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$userid = isset($_SESSION['useridsess'])?$_SESSION['useridsess']:"0";
?>
<!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 name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Shop Online</title>
<? require_once "scripts.php";?>
</head>
<body>
<? $pagename = 'cart'; require "header.php";?>
<div class="w3-row">
<div class="w3-col s8">
<h1>View Cart</h1>
</div>
<div class="w3-col s4 w3-right-align">
<a href="<?=HTTP_SERVER;?>" class="w3-btn">Continue Shopping</a>
</div>
</div>
<div class="w3-row">
<div class="w3-col m12 w3-card w3-white"><!--w3-twothird starts here -->
<br/>
<form method="post" action="process.php" style="max-width: 800px;margin: 0 auto;">
<?php
if(isset($_SESSION["products"]))
{
$total = 0;
$totalwithPGcharge = 0;
$cart_items = 0;
foreach ($_SESSION["products"] as $cart_itm)
{
$pid = $cart_itm["pid"];
$sql = "SELECT * FROM products WHERE pid=? LIMIT 1";
$paramp = array($pid);
$rowsprd = $db->rawQuery($sql,$paramp);
$prdurl = HTTP_SERVER."buy-at-lowest-price/".friendlyURL($rowsprd[0]["ititle"])."_".encode($rowsprd[0]["pid"]).".html";
?>
<div class="w3-row">
<div class="w3-col s3 w3-padding-small">
<a href="<?=$prdurl;?>">
<? if($rowsprd[0]['pic1'] != ""){ ?>
<img src="images/products/<?=$rowsprd[0]['pic1'];?>" style="max-height:85px;max-width:95px;"/>
<? }else{ ?>
<img src="images/default.png" style="max-height:85px;max-width:95px;"/>
<? } ?>
</a>
</div>
<div class="w3-col s6">
<b><a href="<?=$prdurl;?>"><?=$rowsprd[0]["ititle"];?></a></b>
<div class="p-qty">Qty : <?=$cart_itm["qty"];?></div>
<? $subtotal = ($cart_itm["sellingcost"]*$cart_itm["qty"]); ?>
<span class="remove-itm">
<a href="addtocart.php?removep=<?=encode($cart_itm["pid"]);?>&return_url=<?=$current_url;?>">× Remove</a></span>
</div>
<div class="w3-col s3" style="text-align:right;">
<b><?=currSign($rowsprd[0]['currency']);?> <?=$subtotal;?>.00</b>
<? $total = ($total + $subtotal); ?>
<input type="hidden" name="item_id['<?=$cart_items;?>']" value="<?=encode($rowsprd[0]["pid"]);?>" />
<input type="hidden" name="item_name['<?=$cart_items;?>']" value="<?=$rowsprd[0]["ititle"];?>" />
<input type="hidden" name="item_desc['<?=$cart_items;?>']" value="<?=$rowsprd[0]["description"];?>" />
<input type="hidden" name="item_qty['<?=$cart_items;?>']" value="<?=$cart_itm["qty"];?>" />
</div>
</div>
<hr/>
<?
$cart_items ++;
}
?>
<?
if(isset($_SESSION['useridsess'])){
$sqlreg = "select * from register where userid=? limit 1";
$paramreg[] = $userid;
$rowreg = $db->rawQuery($sqlreg,$paramreg);
?>
<div class="w3-row">
<div class="w3-col s6">
<b>Delivery Address:</b><br/>
<?=$rowreg[0]['address'];?>
<br/>
<?=$rowreg[0]['area'];?>
<br/>
</div>
<div class="w3-col s6 w3-right-align">
<strong>Total : <?=currSign($rowsprd[0]['currency']);?> <?=$total;?>.00</strong><br/>
<strong>Delivery Charges : <?=currSign($rowsprd[0]['currency']);?> 00.00</strong><br/>
<br/><strong>Amount to pay: <?=currSign($rowsprd[0]['currency']);?> <?=$total;?>.00</strong><br/>
<br/>
<a href="confirmorder.php" class="btn">Pay Online</a>
<br/>
</div>
</div>
<?
}
}else{
?>Your Cart is empty... Is it best you looking for? We have better than the best products... <a href="<?=HTTP_SERVER;?>">search here</a>.<br/>
आपकी कार्ट खाली है... क्या आप सबसे अच्छा ढूंढ रहे हैं? हमारे पास सर्वोत्तम से बेहतर है... <a href="<?=HTTP_SERVER;?>">यहां खोजें</a>.
<?
}
?>
</form>
<br/><br/>
</div>
</div><!--w3-twothird ends here -->
<br/><br/>
<? include "footer.php";?>
</body>
</html>