?
Path : /home/admin/domains/happytokorea.com/public_html_bk/happyezystyle/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/happyezystyle/Cart.php |
<? include("header.php");?> <div align="center"> <body bgcolor="#ffffff" background="images/bg.gif"> <table width="1045" border="0" align="center" cellpadding="0" cellspacing="0"> <!-- fwtable fwsrc="Untitled" fwbase="home.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" --> <tr> <td width="423"><img src="images/spacer.gif" width="423" height="1" border="0" alt=""></td> <td width="16"><img src="images/spacer.gif" width="16" height="1" border="0" alt=""></td> <td width="248"><img src="images/spacer.gif" width="225" height="1" border="0" alt=""></td> <td width="325"><img src="images/spacer.gif" width="315" height="1" border="0" alt=""></td> <td width="21"><img src="images/spacer.gif" width="21" height="1" border="0" alt=""></td> <td width="12"><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <!-- fwtable fwsrc="Untitled" fwbase="home.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" --> <tr> <td><img src="images/spacer.gif" width="423" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="16" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="225" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="315" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="21" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <tr> <td colspan="5"><img name="home_r1_c1" src="images/home_r1_c1.jpg" width="1000" height="20" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="20" border="0" alt=""></td> </tr> <tr> <td colspan="5" bgcolor="#FFFFFF"><div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> <td width="192"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><div align="center"> <? echo "$showmember"; ?></div></td> </tr> <tr> <td><img src="images/web_07.jpg" width="211" height="42" alt=""></td> </tr> <tr> <td><? $page = $_GET['page']; $select_type="select * from productstype order by id asc"; $query_select=mysql_query($select_type); $num_rows=mysql_num_rows($query_select); if($num_rows<1){ echo "<br><br><center><b>ยังไม่มีการเพิ่มข้อมูลค่ะ</b></center>"; }else{ $select="select * from productstype order by id asc"; $q_ry = mysql_query($select); $num_rows=mysql_num_rows($q_ry); $pagesize=20; $rt=$num_rows%$pagesize; if($rt!=0) { $totalpage=floor($num_rows/$pagesize)+1; } else { $totalpage=floor($num_rows/$pagesize); $toppic_id=1; } if(empty($page)) { $page=1; } mysql_free_result($q_ry); $goto=($page-1)*$pagesize; $sql_select_mem="Select * From productstype order by id asc limit $goto,$pagesize"; $fect=mysql_query($sql_select_mem); if(!$fect) { ("ติดต่อฐานข้อมูลไม่ได้".mysql_error()); exit; } $bgcount=0; while($rows=mysql_fetch_array($fect)) { $idx =$rows['id']; $productstypecode =$rows['productstypecode']; $productstypename = $rows['productstypename']; $bgcount=$bgcount+1; $bgmod=$bgcount%2; if($bgmod==0){ $bgcolor="#E9E9E8"; }else{ $bgcolor="#FFFFFF"; } $s_num="select * from products where productstypecode = '$productstypecode'"; $query_select_num=mysql_query($s_num); $snum=mysql_num_rows($query_select_num); ?> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td height="23"><div align="left"></div> <div align="left"></div> <div align="center"> </div> <div align="left"><img src="images/opened.gif" width="17" height="17"> <? echo "<a href=ProductList.php?PRD=$productstypecode>$productstypename</a> ($snum)"; ?></div></td> </tr> <tr> <td height="5"><img src="images/inline.jpg" width="184" height="3"></td> </tr> </table> <? } } ?> </td> </tr> <tr> <td> </td> </tr> </table></td> <td width="819"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><img src="images/step1.jpg" width="796" height="64"></td> </tr> <tr> <td><img src="images/h_cart.jpg" width="121" height="29"></td> </tr> <tr> <td><table width="99%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><table width="98%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><div align="left"> <? if (count($sess_idproduct)==0) { echo "<br><br><center>ยังไม่มสินค้าอยู่ใีนรถเข็นของท่าน<br></center><BR>"; } else { //echo"<br><center><h3>ÃÒ¡ÒÃÊÔ¹¤éÒ·Õèä´éÊÑ觫×éÍ </h3></center>"; ?> <form name="form1" method="post" action="cart_cal.php"> <TABLE WIDTH="645" BORDER="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#999999"> <TR BGCOLOR="#E8E8E8"> <TD WIDTH="6%" height="25"><CENTER> <B>ลบ</B> </CENTER></TD> <TD bgcolor="#E8E8E8" width=65%><CENTER> <b>รายการสินค้าที่สั่งซื้อ</b> </CENTER></TD> <TD WIDTH="12%"><CENTER> <B>จำนวน</B> </CENTER></TD> <TD WIDTH="10%"><CENTER> <B>ราคา</B> </CENTER></TD> <TD WIDTH="12%"><CENTER> <B>รวม</B> </CENTER></TD> </TR> <? for ($i=0;$i<count($sess_idproduct);$i++) { $total_unit = $sess_num[$i]*$sess_price[$i]; $sum = $sess_num[$i]*$sess_price[$i]; $total=$total+$total_unit; //$a = $sess_num[$i] *150 ; $a = $sess_num[$i]; $c=number_format($total_unit,2,'.',',') ; //$total_all=$total+$a; $total_all=$total; echo " <TR bgcolor='#FFFFFF'> <TD><CENTER> <INPUT TYPE='checkbox' NAME='prd_del[]' VALUE='$sess_idproduct[$i]'> </CENTER></TD> <TD>$sess_idproduct[$i] $sess_name_prd[$i] </TD> <TD><CENTER> <INPUT TYPE='text' NAME='prd_num[]' VALUE='$sess_num[$i]' SIZE='5' maxlength='5' onkeypress='return bannedKey(event)'> </CENTER></TD> <TD><CENTER>$sess_price[$i]</CENTER></TD> <TD><div align=right>$c</div></TD> </TR>"; } ?> </TABLE> <br> <table width="645" border="0" cellspacing="0"> <tr> <td width="504" height="25"> </td> <td width="143"> </td> </tr> </table> <br> <table width="650" border="0" align="center" cellpadding="5" cellspacing="2"> <tr> <td width="334"><div align="right"></div></td> <td width="290"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="10"><div align="left"></div></td> <td width="130" bgcolor="#A4EDFF"><div align="center"><strong>รวมเป็นเงินทั้งหมด</strong></div></td> <td width="93" bgcolor="#A4EDFF"> <? $a=number_format($total_all,2,'.',',') ; echo "<center><b>$a</b></center>"; ?> </td> <td width="57" bgcolor="#A4EDFF"><strong>ºÒ·</strong></td> </tr> </table></td> </tr> </table> <table width="650" height="50" border="0" align="center" cellpadding="5" cellspacing="2"> <tr> <td><div align="right" class="style1"> <p> </p> <p> </p> </div></td> </tr> <tr> <td><div align="right"> <input name="continue" type="submit" class="submitxx" value="เลือกซื้อสินค้าต่อ"> <input name="calculate" type="submit" class="submitxx" value="คำนวณใหม่"> <input name="complete" type="submit" class="submitxx" value="ขั้นตอนต่อไป"> </div></td> </tr> </table> <? } ?> </form> <br> <br> </div></td> </tr> </table> <strong></strong></td> </tr> </table></td> </tr> </table> <br> <br> </td> </tr> </table> </div></td> <td><img src="images/spacer.gif" width="1" height="25" border="0" alt=""></td> </tr> <tr> <td colspan="2"><img src="images/home_r5_c1.jpg" alt="" name="home_r5_c1" width="439" height="39" border="0" usemap="#home_r5_c1Map"></td> <td colspan="3"><img src="images/home_r5_c3.jpg" alt="" name="home_r5_c3" width="561" height="39" border="0" usemap="#home_r5_c3Map"></td> <td><img src="images/spacer.gif" width="1" height="39" border="0" alt=""></td> </tr> <tr> <td><img name="home_r6_c1" src="images/home_r6_c1.jpg" width="423" height="71" border="0" alt=""></td> <td colspan="4" background="images/home_r6_c2.jpg"><? echo "$buttomtxt_web"; ?></td> <td><img src="images/spacer.gif" width="1" height="71" border="0" alt=""></td> </tr> </table> </body> </html>