السلام عليكم ورحمة الله وبركاته
شخباركم
ممكن تشوفون لي شنو الخطأ !!!
أبغي أعرض في الصفحة الرئيسية آخر 9 منتجات مضافة
+ أكثر 3 منتجات مشاهدة
<?php
session_start();
header("Cache-Control: no-cache, must-revalidate");
require('connection.php');
require('shopping_cart.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=windows-1252" />
<title>Smart Shopping</title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
<link rel="stylesheet" type="text/css" href="style/slider_style.css" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="style/iecss.css" />
<![endif]-->
<script src="ajax/ajax_framework.js" language="javascript"></script>
<script type="text/javascript" src="scripts/js/boxOver.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="scripts/s3Slider.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#slider').s3Slider({
timeOut: 7000
});
});
</script>
</head>
<body>
<?php
session_start();
if (isset($_SESSION['user']) && isset($_SESSION['pass']) )
{
?>
<div id='header'>
<div class='top_right'>
<div class='login_div' id="login_response" >
<div id="user_top_information_box" style="margin-top:20px; margin-left: 140px; border: none;">
<div id="profile_top_picture">
<img src="<?php echo ($_SESSION['profile_pic']); ?>" width="40" height="40" border="0"/>
</div>
<div id="user_top_information" style="margin-top: -35px; margin-left: 50px; font-weight: bold; font-size: 14px; width: 300px;">
<a href="#" style="text-decoration:none; color: black" > <?php echo ($_SESSION['user']); ?> </a> <br />
<a href="logout.php" style="font-size: 10px; color: blue;"> logout </a> <a href="account.php" style="font-size: 10px; color: blue;"> My Account </a>
</div>
</div>
</div>
</div>
<div id='logo'></div>
</div>
<?php
}
?>
<?php
if (!isset($_SESSION['user']) || !isset($_SESSION['pass']) )
{
?>
<div id='header'>
<div class='top_right'>
<div class='login_div' id="login_response" >
<form action='javascript:login()' method='POST'>
<table border='0' cellspacing='4' cellpadding='0'>
<tr>
<td><span class='login_div_text'> Username </span></td>
<td> <span class='login_div_text'> Password </span></td><td/>
</tr>
<tr>
<td><input class='input_textfield' id="user" name='username' size='20' maxlength='30' /></td>
<td><input class='input_textfield' id= "pass" name="password" type='password' size='20' maxlength='30' /></td>
<td><input name="login" type='submit' value='Log In' id='login_button' /></td></td>
</tr>
<tr>
<td><a href='register.php' style='text-decoration:none; color:#567CAB'>Don't have account?</a></td>
<td><a href='#' style='text-decoration:none; color:#567CAB'>Forget your password?</a></td>
</tr>
</table>
</form>
</div>
</div>
<div id='logo'></div>
</div>
<?php
}
?>
<div id="main_container">
<div id="main_content">
<div id="menu_tab">
<?php require('menu_bar.php'); ?>
</div><!-- end of menu tab -->
<div class="crumb_navigation">
Navigation: <span class="current">Home</span>
</div>
<div class="left_content">
<div class="title_box">Categories</div>
<!-- show left bar menus -->
<?php require('left_bar_menus.php'); ?>
<div class="title_box">Search</div>
<div class="border_box">
<input style="margin-top: 10px; margin-bottom:10px; "type="text" name="newsletter" class="cus_input" />
</div>
</div><!-- end of left content -->
<div class="center_content">
<div class="center_title_bar">Special Promotions</div>
<div id="slider">
<ul id="sliderContent">
<li class="sliderImage">
<a href="#"><img src="images/sp_promo/1.png" style="border:none;" alt="1" /></a>
<span class="top"><strong>iPhone 3 Special Promotion</strong><br />Buy two and get the third in half price</span>
</li>
<li class="sliderImage">
<a href="#"><img src="images/sp_promo/2.jpg" style="border:none;" alt="2" /></a>
<span class="top"><strong>Galaxy S2</strong><br />It's just arrived, be the first one you buy it</span>
</li>
<div class="clear sliderImage"></div>
</ul>
</div>
<div class="center_title_bar">Latest Products</div>
<?php
$Products=mysql_query("select * from products order by pid DESC LIMIT 9") or die (mysql_error());
while ($Product=mysql_fetch_array($Products))
{
?>
<form method='post' name='AddCart <?php echo $Product[0];?>'>
<div class="prod_box">
<div class="center_prod_box">
<div class="product_title"><a href="details.php"><?php print $Product[1] ;?></a></div>
<div class="product_img"><a href="details.php">
<img src='<?php print $Product[9] ;?>' alt="" title="" border="0" height="90" width="100" /></a>
</div>
<div class="prod_price"><span class="price"><?php print $Product[5] ;?></span></div>
</div>
<input type='hidden' name='id' value='<?php echo $Product[0];?>' />
<input type='hidden' name='name' value='<?php echo $Product[1];?>' />
<input type='hidden' name='categry' value='<?php echo $Product[2];?>' />
<input type='hidden' name='seller' value='<?php echo $Product[3];?>' />
<input type='hidden' name='price' value='<?php echo $Product[5];?>' />
<input type='hidden' name='warranty' value='<?php echo $Product[7];?>' />
<input type='hidden' name='pathimage' value='<?php echo $Product[9];?>' />
<div class="prod_details_tab">
<a href="index.php" onclick="document.forms['AddCart <?php echo $Product[0];?>'].submit(); return false;" class="prod_buy">Add to Cart</a>
<a href="details.php" class="prod_details">Details</a>
</div>
</div>
</form>
<?php
}
?>
<div class="center_title_bar">Recomended Products</div>
<?php
$Products=mysql_query("select * from products order by visit_counter DESC limit 3") or die (mysql_error());
while ($Product=mysql_fetch_array($Products))
{
?>
<form method='post' name='AddCart1 <?php echo $Product[0];?>'>
<div class="prod_box">
<div class="center_prod_box">
<div class="product_title"><a href="details.php"><?php print $Product[1] ;?></a></div>
<div class="product_img"><a href="details.php"><img src='<?php print $Product[9] ;?>' alt="" title="" border="0" height="90" width="100" /></a></div>
<div class="prod_price"><span class="price"><?php print $Product[5] ;?></span></div>
</div>
<input type='hidden' name='id' value='<?php echo $Product[0];?>' />
<input type='hidden' name='name' value='<?php echo $Product[1];?>' />
<input type='hidden' name='categry' value='<?php echo $Product[2];?>' />
<input type='hidden' name='seller' value='<?php echo $Product[3];?>' />
<input type='hidden' name='price' value='<?php echo $Product[5];?>' />
<input type='hidden' name='warranty' value='<?php echo $Product[7];?>' />
<input type='hidden' name='pathimage' value='<?php echo $Product[9];?>' />
<div class="prod_details_tab">
<a href="shopping_cart.php" onclick="document.forms['AddCart1 <?php echo $Product[0];?>'].submit(); return false;" class="prod_buy">Add to Cart</a>
<a href="details.php" class="prod_details">Details</a>
</div>
</div>
</form>
<?php
}
?>
</div><!-- end of center content -->
<?php require('right_content.php'); ?>
</div><!-- end of main content -->
<div class="footer">
<div class="center_footer">
© 2011-2012, Smart Shopping, Inc.<br />
</div>
</div>
</div>
<!-- end of main_container -->
</body>
</html>