<?php session_start(); $ebits = ini_get('error_reporting'); error_reporting($ebits ^ E_NOTICE); $user_id=$_SESSION['user_id']; $username=$_SESSION['username']; $firstname=$_SESSION['firstname']; $role=$_SESSION['role']; include("connect.php"); $sql_join="SELECT *FROM order WHERE bill_id='$bill_id'"; $result=mysql_query($sql_join); ?> <form method="POST" action=""> <table width=100% border=1 cellpadding="7" cellspacing=1> <tr> <td colspan=3 align="center"><h3>Your Cart</h3></td> </tr> <?php////////////////////qty///////// $all_list=mysql_num_rows($result); if($all_list!=null){ while($row=mysql_fetch_array($result)){ $all_qty+=$row['num_product']; $all_price+=$row['price_total']; } ?> <tr><td>List <?php echo $all_list;?> list</td></tr> <tr><td>Amount<?php echo $all_qty;?></td></tr> <tr><td>Total <?php echo $all_price;?> Baht</td></tr> <tr><td align="right"><a href="confirm.php" target="_self"><input type="button" name="chk_out"/></a></td></tr> <?php }else{ ?> <tr><td align="center">Picking Me</td></tr> <?php } ?> </table> </form>
<!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>Untitled Document</title> </head> <?php session_start(); $ebits = ini_get('error_reporting'); error_reporting($ebits ^ E_NOTICE); $user_id=$_SESSION['user_id']; $username=$_SESSION['username']; $firstname=$_SESSION['firstname']; $role=$_SESSION['role']; include("connect.php"); $sql_join="SELECT *FROM order WHERE bill_id='$bill_id'"; $result=mysql_query($sql_join); ?> <form method="POST" action=""> <table width=100% border=1 cellpadding="7" cellspacing=1> <tr> <td colspan=3 align="center"><h3>Your Cart</h3></td> </tr> <?php $all_list=mysql_num_rows($result); if($all_list!=null){ while($row=mysql_fetch_array($result)){ $all_qty+=$row['num_product']; $all_price+=$row['price_total']; } ?> <tr><td>List <?php echo $all_list;?> list</td></tr> <tr><td>Amount<?php echo $all_qty;?></td></tr> <tr><td>Total <?php echo $all_price;?> Baht</td></tr> <tr><td align="right"><a href="confirm.php" target="_self"><input type="button" name="chk_out"/></a></td></tr> <?php }else{ ?> <tr><td align="center">Picking Me</td></tr> <?php } ?> </table> </form> <body> </body> </html>
<?php session_start(); $ebits = ini_get('error_reporting'); error_reporting($ebits ^ E_NOTICE); $user_id=$_SESSION['user_id']; $username=$_SESSION['username']; $firstname=$_SESSION['firstname']; $role=$_SESSION['role']; include("connect.php"); $id=$_GET['icecream']; ?> <html> <head> <title>Icecream</title> <meta charset="utf-8"> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> td{ font-family: 'PTSansNarrowRegular'; color:#8c836b; } #page #sidebar td { font-family: 'PTSansNarrowRegular'; color:#ffffff; } </style> </head> <body> <div id="page"> <!--this is letf page--> <div id="sidebar"><img id="logo" src="images/logo.gif" width="171" height="239" alt=""> <?php if(!isset($username)){ ?> <h2>Log in</h2> <form method="POST" action="login.php"> <table border=0 align="center"> <tr><td>Username</td><td><input type="text" name="username" id="username"/></td></tr> <tr><td>Password</td><td><input type="password" name="password" id="pasword"/></td></tr> <tr><td colspan=2 align="center"><input type="submit" name="Submit" value="Log in" /> <a href="forgetpass.php"><input type="button" value="Forget Password"/></a></td></tr> </table> <h2>Register</h2> <a href="register.php" target="_new"><input type="button" value="Register"/></a> </form> <?php }else{?> <h2>Welcome</h2> <?php echo $firstname; ?> | <a href="logout.php"><input type="button" value="Log out"></a> <?php }?> <br/> <br/> <br/> </div> <div id="content"> <!--this is center page--> <!-- start of header --> <div id="header"> <ul class="navigation"> <li><a href="index.php">Home</a></li> <li><a class="active" href="icecream.php">Icecream</a></li> <li><a href="topping.php">Topping</a></li> <?php if(isset($username) AND $role=="user"){ ?><li> <a href="profile.php">Profile</a></li><?php } ?> <?php if(isset($username) AND $role=="admin"){ ?><li> <a href="profile.php">Admin</a></li><?php } ?> <li><a href="contact.php">Contact</a></li> </ul> </div> <!-- end of header --> <!-- start of class content --> <div class="content"> <div class="content"> <!-- start inner page content box background --> <div class="header"> <div class="footer"> <div class="body"><!-- start of body --> <p><h1>Select Your Icecream</h1></p> <img src="images/strawberry-ice-cream.jpg" width="648" height="312" alt=""> <div class="icecream" > <?php $sql_icecream="SELECT * FROM product WHERE type='icecream' "; $result=mysql_query($sql_icecream); $how=mysql_num_rows($result); if($how=mysql_num_rows($result)){ ?><br/><br/> <table cellpadding="7"> <tr> <?php while($row=mysql_fetch_array($result)){ ?> <td><a href="?icecream=<?php echo $row['product_id'];?>"><img src="<?php echo $row['pic'];?>" height="95" width="95" border=0/></a></td> <?php } } ?> </tr> </table> </div> <br/> <br/> <?php if($id==null){ $sql_show="SELECT * FROM product WHERE type='icecream' "; $re=mysql_query($sql_show); if(mysql_num_rows($re)){ $fix=mysql_fetch_array($re); $sql_show="SELECT * FROM product WHERE product_id=".$fix['product_id']; $re=mysql_query($sql_show); } } else{ $sql_show="SELECT * FROM product WHERE product_id=$id "; } $re=mysql_query($sql_show); if(mysql_num_rows($re)){ $row_icecream=mysql_fetch_array($re); ?> <center> <form method="POST" action="inorder.php?tb=rc"> <table cellpadding="10" border="0"> <tr><td rowspan=7 width="150" VALIGN=top><img src="<?php echo $row_icecream['pic'];?>"/></td><td colspan=2><h1><?php echo $row_icecream['product_name'];?></h1></td><tr> <tr><td VALIGN=top>Detail: </td><td width="300"><?php echo$row_icecream['detail'];?></td></tr> <tr><td>Price:</td><td><?php echo $row_icecream['price'];?> Baht/Box</td></tr> <?php if($role=='user'){ ?> <tr><td colspan=2><input type="button" value="Add to Cart"></td></tr> <tr> <td><input type="hidden" name="id_icecream_hidden" value="<?php echo $row_icecream['product_id'] ?>"></td> <td><input type="hidden" name="pageorder" value="icecream"></td> </tr> <?php }else if($role==''){ ?> <tr> <td colspan=2><font color=red>*Please login before you buy.</font></td> </tr> <?php }else{ ?> <tr> <td colspan=2><font color=red>You are Admin.</font></td> </tr> <?php }?> </table> </form> <?php } ?> </center> <?php include("showordertable.php") ?> </div> <!-- end of body --> </div> </div> <!-- end inner page content box background --> </div> <!-- end of class content --> <div id="footer"> <ul> <li><a href="index.php">Home</a></li> <li><a href="icecream.php">Icecream</a></li> <li><a href="topping.php">Topping</a></li> <li><a href="profile.php">Profile</a></li> <li><a href="admin.php">Admin</a></li> <li><a href="contact.php">Contact</a></li> </ul> <span>©2011 <a href="index.html">Frost Sweets Gourmet Ice Cream</a> All Rights Reserved</span> <ul class="connect"> <li> FOLLOW US: </li> <li> <a class="facebook" href="http://www.freewebsitetemplates.com/go/facebook"> </a> </li> <li> <a class="twitter" href="http://www.freewebsitetemplates.com/go/twitter/"> </a> </li> <li> <a class="email" href="http://www.freewebsitetemplates.com/misc/contact"> </a> </li> <li> <a class="googleplus" href="http://www.freewebsitetemplates.com/go/googleplus/"> </a> </li> </ul> </div> </div> <!-- end of ID content--> </div> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง