<!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>
	<title>A Simple Lightweight jQuery Modal Popup Box.</title>
	<script src="jquery.min.js" type="text/javascript"></script>
	<link href="modalPopLite.css" rel="stylesheet" type="text/css" />
	<script src="modalPopLite.js" type="text/javascript"></script>

	<style type="text/css">
		/* CSS Reset */  
		#clicker
		{
			font-size:20px;
			cursor:pointer;
		}
		#popup-wrapper
		{
			width:500px;
			height:300px;
			background-color:#ccc;
			padding:10px;
		
		}
	</style>

	<script type="text/javascript">
		$(function () {
		    $('#popup-wrapper').modalPopLite({ openButton: '#clicker', closeButton: '#close-btn', isModal: true });
		});
	</script>
</head>







<?php

session_start();
if(isset($_SESSION['loginuser-id'])) {
	
	$s_id1 =$_SESSION['loginuser-id'];
	}
	else {
       $s_id1 =session_id();
	   
	   
	}



include("connect.php");




$sql3="select c_id, c_name,c_price,c_img,SUM(c_quantity) from  mycart where c_s_id='$s_id1'  group by c_p_id";

echo $sql3;

$result1=mysql_query($sql3) or die(mysql_error());

while($row1=mysql_fetch_array($result1))
{

$sum=0;
$x=$row1['SUM(c_quantity)'];
echo '<br>';
$sub=$x*$row1['c_price'];
echo '<br>';

$sum=$sum+$sub;






echo '<table border=1>
<tr><td align=center>PRODUCT-NAME</td>
<td align=center>PRODUCT-PRICE</td>
<td align=center>PRODUCT</td>
<td align=center>PRODUCT-QUANTITY</td>
<td align=center>TOTAL-PRICE</td>
<td></td>
<td></td>
</tr>';




echo '<tr>';

echo '<td align=center>';
echo $row1['c_name'];
echo '<td align=center>';
echo $row1['c_price'];
echo '</td>';

echo '<td align=center>';

echo "<img  src=upload/".$row1['c_img']."   height=200 width=200   border=10 >";
echo '</td>';


echo '<td align=center>';
echo $x;

echo '</td>';
echo '<td align=center>';


echo $sub;
echo '</td>';


echo '<td  align=center>';


echo '<form action=delcart.php  method=post>
<input type=hidden name=hidden  value="'.$row1['c_id'].'">
<input type=submit  name=delcart  value="delete-cart"></form>';

echo '</td>';
echo '<td align=center>';
echo '<a href="product.php"><button>continue shopping</button></a>';
echo '</td></tr>';
echo '</table>';



}



?>
<body>

<div id="clicker"  >
		<button>Place your order!</button>
	</div>
	
	
	<div id="popup-wrapper">
	
	<a href="#" id="close-btn"><font cloro=red>Close(X)</font></a>
	<table border=0>
	<tr><td>
		<form action=register.php  method=post>
		<table border=0>
		<tr><td>
		 firstname</td><td>
<input type=text name=fname></td></tr>
<tr><td>
 lastname</td><td><input type=text name=lname></td></tr>
<tr><td>
 emailid</td><td><input type=text name=email_id></td></tr>
<tr><td>
password</td><td><input type=password  name=password></td></tr>
<tr><td>
 password</td><td><input type=password name=cpassword></td></tr>
<tr><td></td><td>

<input type=submit  name=submit>		</td></tr>
</table></form></td>
<td></td><td>
<form action=login.php   method=post>
<table border=0 bgcolor=red>
<tr><td>Registered user make Login here</td><td></td></tr>
<tr><td>Email-id</td><td><input type=text name=email_id></td></tr>
<tr><td>Password</td><td><input type=password name=password></td></tr>
<tr><td></td><td><input type=submit  name=submit  value=Login></td></tr>
</form>
</table>

</td><td></td>
</tr></table>
		
	</div>
	</body>
	</html>