<?php
ob_start();
session_start();
include_once("dbconnect.php");

?>
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to Ideal Fengling Group... I FEEL GOOD</title>
<link href="docstyle/css.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function changeclass(key){
key.className = "boxhover";
}
function changeagain(key){
key.className = "box";
}
</script>
<SCRIPT src="jquery-1.4.4.min.js" type="text/javascript"></SCRIPT>
<SCRIPT  src="jquery.orbit.min.js" type="text/javascript"></SCRIPT>
<SCRIPT type=text/javascript>
		$(window).load(function() {
			$('#featured').orbit({
				"animation" : "horizontal-push"
			});
		});
	</SCRIPT>
<link href="home.css" rel="stylesheet" type="text/css" />


<link rel="stylesheet" type="text/css" href="docstyle/ddsmoothmenu.css" />

<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>-->
<script type="text/javascript" src="ddsmoothmenu.js">

/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

<script type="text/javascript">

ddsmoothmenu.init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

ddsmoothmenu.init({
	mainmenuid: "smoothmenu2", //Menu DIV id
	orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
	//customtheme: ["#804000", "#482400"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

</script>
<link href="home.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="top" id="table"><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="228" align="left" valign="bottom"><?php include_once("header.php"); ?></td>
          </tr>
          <tr>
            <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="9" align="left" valign="top" style="background:url(images/shodow_left.png) repeat-y top left;">&nbsp;</td>
                <td height="500" align="left" valign="top" id="cont"><table width="100%" border="0" cellspacing="0" cellpadding="0" summary="
">
                  <tr>
                    <td width="216" align="left" valign="top"><?php include_once("leftlink.php"); ?></td>
                    <td align="left" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          
                          <tr>
                            <td height="10"></td>
                            </tr>
                          <tr>
                            <td align="left" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                              <tr>
                                <td align="left" valign="top" id="wel_box"><h1> Add to cart </h1>
                                  </td>
                                    </tr>
                                    <?php if($_SESSION['idlcount']==0){  ?>
                                  <tr>
                                  <td height="30" align="center" id="wel_box">
                                <h3>    <strong>Your Shopping cart is Empty. </strong></h3>
                                </td>
                                  </tr>
                                  <? } else { ?>
                                  <? if($_GET['error']=="yes"){ ?>
                                  <tr>
                                  <td height="30" align="center" id="wel_box">
                                  <h3>  <strong>Item Exists in the list, Update Below. </strong></h3>
                                  </td>
                                  </tr>
                                  <? } else { ?>
                                   <tr>
                                  <td height="30" align="center" id="wel_box">
                                    <h3><strong>Item was successfully added to your shopping cart. </strong></h3>
                                    </td>
                                  </tr>
                                  <? } ?>
                                  <tr>
                                  <td id="wel_box">
                                  <form action="addtocart.php" name="cart" method="post" enctype="multipart/form-data">
                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="25%" height="25" align="center" valign="middle" style="border:1px solid #CCCCCC;"><strong>Product Image</strong></td>
                                      <td width="16%" align="center" valign="middle" style="border:1px solid #CCCCCC;"><strong>Product Name</strong></td>
                                      <td width="8%" align="center" valign="middle" style="border:1px solid #CCCCCC;"><strong>Quantity</strong></td>
                                      <td width="9%" align="center" valign="middle" style="border:1px solid #CCCCCC;"><strong>Price</strong></td>
                                      <td width="11%" align="center" valign="middle"  style="border:1px solid #CCCCCC;"><strong>Total Price</strong></td>
                                      <td width="10%" align="center" valign="middle" style="border:1px solid #CCCCCC;"><strong>Update</strong></td>
                                      <td width="21%" align="center" valign="middle" style="border:1px solid #CCCCCC;"><strong>Delete</strong></td>
                                      </tr>
                                      
                                      <? 
									  if($_SESSION['idlcount']>=1){
									  
									  
									  for($i=1;$i<=$_SESSION['idlcount'];$i++){  ?>
                                    <tr>
                                      <td height="144" align="center" valign="middle" style="border:1px solid #CCCCCC;"><a href="#"><img src="products/thumb/<?php echo $_SESSION['idlcart'][$i]['prodid']; ?>-1.jpg" width="110" height="236" alt="" /></a></td>
                                      <td align="center" valign="middle" style="border:1px solid #CCCCCC;"><?php echo $_SESSION['idlcart'][$i]['pname']; ?></td>
                                      <td align="center" valign="middle" style="border:1px solid #CCCCCC;"><input name="<?php echo $i; ?>" type="text" id="<?php echo $i; ?>" value="<?php echo $_SESSION['idlcart'][$i]['qty']; ?>" size="3" /></td>
                                      <td align="center" valign="middle" style="border:1px solid #CCCCCC;">$ <?php echo $_SESSION['idlcart'][$i]['price']; ?></td>
                                      <td align="center" valign="middle" style="border:1px solid #CCCCCC;">$ <? echo number_format($_SESSION['idlcart'][$i]['totprice'],2); ?></td>
                                      <td align="center" valign="middle" style="border:1px solid #CCCCCC;">
                                      <input type="hidden" name="hidval" value="updatenow" id="hidval" />
                                      <input type="image" src="images/tick.png" alt="" width="20" height="18" border="0" style="border:none;" /></td>
                                      <td align="center" valign="middle" style="border:1px solid #CCCCCC;"><a href="addtocart.php?row=<?php echo $_SESSION['idlcart'][$i]["prodid"]; ?>" onclick="return confirm('Do you really want to remove this product?');"><img src="images/remove.gif" alt="" width="131" height="23" /></a></td>
                                      </tr>
                                      <? } ?>
                                    <tr>
                                      <td height="51" align="center" valign="middle" style="border:1px solid #CCCCCC;"><a href="index.php"><img src="images/continue.gif" width="131" height="23" alt="" /></a></td>
                                      <td colspan="5" align="center" valign="middle" style="border:1px solid #CCCCCC;">&nbsp;</td>
                                      <td align="center" valign="middle" style="border:1px solid #CCCCCC;"><a href="checklogin.php"><img src="images/proceed.gif" alt="" width="131" height="23" border="0" /></a></td>
                                      </tr>
                                    </table>
                                    </form>
                                  </td>
                                  </tr>
                                  <?
								  $totqty=$totqty+$_SESSION['idlcart'][$i]['qty'];
								  $totres=$totres+$_SESSION['idlcart'][$i]['totprice'];
								  $totweight=$totweight+$_SESSION['idlcart'][$i]['totwieght'];
								  } 
								  $_SESSION['totalquentity']=$totqty;
								  $_SESSION['totalamount']=$totres;
								  $_SESSION['totweight']=$totwieght;	
								  
								  }
								  
								  ?>
                            
                              </table></td>
                          </tr>
                          </table></td>
                        </tr>
                      </table></td>
                    </tr>
                  </table></td>
                <td width="9" align="left" valign="top" style="background:url(images/shodow_right.png) repeat-y top left;">&nbsp;</td>
                </tr>
              </table></td>
          </tr>
          </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="100" align="center" valign="top" style="background:url(images/bottom_bg.gif) repeat-x"><?php include_once("footer.php"); ?></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>

<map name="Map" id="Map">
  <area shape="rect" coords="69,274,206,318" href="#" alt="" />
</map>

<map name="Map2" id="Map2">
  <area shape="rect" coords="87,255,204,295" href="#" alt="" />
</map>
</body>
</html>
