%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/riacommer/domains/gasworld.com.my/private_html/
Upload File :
Create Path :
Current File : /home/riacommer/domains/gasworld.com.my/private_html/enquiry-cart.php

<!DOCTYPE html>
<html>
	<head>
		<?php include_once("header.php"); 
	session_start();	
$dbssid='';
if(isset($_POST["product_id"])){
	
	if(!isset($_SESSION["ssid"])){
		$_SESSION["ssid"] = generateGUID();
	} else {
		if($_SESSION["ssid"]==""){
			$_SESSION["ssid"] = generateGUID();
		}
	}
	$pid = $_POST["product_id"];
	$dbssid = $_SESSION["ssid"];
	
	$qty = $_POST["quantity"];
	
	$sql = "INSERT INTO enquiry (sessionId, product_id, qty, created_date) VALUES ('$dbssid', '$pid', '$qty', now())";
	mysql_query($sql);
	
} else {
	if(isset($_SESSION["ssid"])){
		if($_SESSION["ssid"]!=""){
			$dbssid = $_SESSION["ssid"];
		}
	}
}
		
		
		?>
	</head>
	<body>
		<div class="body">
			<?php include_once("top.php"); ?>
			
			<div role="main" class="main shop">

			<section class="page-header">
					<div class="container">
						<div class="row">
							<div class="col-md-12">
								<h1>Enquiry Cart</h1>
							</div>
						</div>
					</div>
				</section>
			
			
				<div class="container">

					<hr />

					<div class="row">
						<div class="col-md-12">

							<div class="featured-boxes">
								<div class="row">
									<div class="col-md-12">
										<div class="featured-box featured-box-primary align-left mt-sm">
											<div class="box-content">
												<form method="post" action="">
													<table class="shop_table cart">
														<thead>
															<tr>
																<th class="product-remove">
																	&nbsp;
																</th>
																<th class="product-thumbnail">
																	Image
																</th>
																<th class="product-name">
																	Product Name / Model
																</th>
																<th class="product-name">
																	Quantity
																</th>
															</tr>
														</thead>
														<tbody>

<?php
$sql = "select p.*, e.id as eid, e.qty from sa_product p, enquiry e where e.product_id = p.id and e.sessionid='$dbssid'";
$mysql_result = mysql_query($sql, $connection);
$num_rows = mysql_num_rows($mysql_result);
if($num_rows>=1){
	while($row = mysql_fetch_array($mysql_result)){
		$pid = $row["id"];
		$eid = $row["eid"];
		$product_code = $row["product_code"];
		$product_name = $row["product_name"];
		$product_image = $row["product_image"];
		if($product_image!=""){
			$product_image_url = 'contents/products/thumb_'.urlencode($product_image);
		}
		
		if(!file_exists($product_image_url)){
			$product_image_url = 'contents/products/'.urlencode($row["product_image"]);
		}
		
		$qty = $row["qty"];
		
		echo '<tr class="cart_table_item">
																<td class="product-remove">
																	<a title="Remove this item" class="remove" href="del.php?eid='.$eid.'">
																		<i class="fa fa-times"></i>
																	</a>
																</td>
																<td class="product-thumbnail">
																	<a href="product-details.php?id='.$pid.'">
																		<img width="260" height="260" alt="" class="img-responsive" src="'.$product_image_url.'">
																	</a>
																</td>
																<td class="product-name">
																	<a href="product-details.php?id='.$pid.'">'.$product_name.'<br />'.$product_code.'</a>
																</td>
																<td style="text-align:right;">
																	<div style="width:60px;">'.$qty.'</div>
																</td>
															</tr>';
		
		
	}
}	
?>														
														
															
															
														</tbody>
													</table>
												</form>
											</div>
										</div>
									</div>
								</div>
							</div>

							
							<div class="row">
								<div class="col-md-12">
									<div class="actions-continue">
										<form method="post" action="checkout.php">
										<button type="submit" class="btn pull-right btn-primary btn-lg">Proceed to Enquiry <i class="fa fa-angle-right ml-xs"></i></button>
										</form>
									</div>
								</div>
							</div>

						</div>
					</div>

				</div>

			</div>

		<?php include_once("footer.php"); ?>
			
		</div>

		<?php include_once("footer-js.php"); ?>


	</body>
</html>

Zerion Mini Shell 1.0