<? session_start(); $id=$_GET[id]; $qty=$_GET[qty]; echo "$qty"; if(count($sess_id)=="0"){ $check=1; }else if (!in_array($id,$sess_id)){ $check=1; } if($check==1){ include("conn.inc.php"); $sql="select * from tb_product where p_nameid ='$id' "; $result=mysql_query($sql); $rs=mysql_fetch_array($result); $_SESSION['sess_id'][]=$rs[p_nameid]; $_SESSION['sess_name'][]=$rs[pro_name]; $_SESSION['sess_price'][]=$rs[pro_price]; $_SESSION['sess_type'][]=$rs[type_name]; $_SESSION['sess_num'][]=1; $_SESSION['sess_service']=500; $_SESSION['sess_qty'][]=$rs[pro_qty]; $_SESSION['sess_weight'][]=$rs[pro_weight]; } echo"<meta http-equiv=\"refresh\" content=\"0;URL=?do=cart\" />"; ?>
<? session_start(); ?> <!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>เธ•เธฃเธฐเธเธฃเนเธฒเธชเธดเธเธเนเธฒ</title> <link href="normal_font.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .style6 { font-size: 16px; color: #FFF; } .style13 {color: #FF0000} .style19 {color: #CCFF33} --> </style> <!--javaเธเธณเธเธงเธ --> <script language="javascript"> function CheckSubmit() { form1.submit(); } </script> </head> <body> <table width="574" align="center"> <tr> <td width="573" valign="top" bgcolor="#FFFFFF"><span class="style6"> <? $sess_id=$_SESSION['sess_id']; $sess_name=$_SESSION['sess_name']; $sess_price=$_SESSION['sess_price']; $sess_type=$_SESSION['sess_type']; $sess_num=$_SESSION['sess_num']; $sess_service=$_SESSION['sess_service']; $sess_weight=$_SESSION['sess_weight']; อันนี้คือน้ำหนัก ?> <strong> <? if(count($sess_id)==0){ ?> </strong><font color="#FF0000">เธขเธฑเธเนเธกเนเธกเธตเธชเธดเธเธเนเธฒเนเธเธ•เธฐเธเธฃเนเธฒเธชเธดเธเธเนเธฒเธเธญเธเธ—เนเธฒเธเธเธฃเธฑเธ <a href="index.php" title="เน€เธฅเธทเธญเธเธเธทเนเธญเธชเธดเธเธเนเธฒ">เธเธฅเธดเธเธ—เธตเนเธเธตเน</a><strong><strong><a href="index.php" title="เน€เธฅเธทเธญเธเธเธทเนเธญเธชเธดเธเธเนเธฒ"></a> </strong></strong>เน€เธเธทเนเธญเน€เธฅเธทเธญเธเธเธทเนเธญเธชเธดเธเธเนเธฒเธเนเธฐเธเธฃเธฑเธ<strong><strong> <? }else{ ?> </strong></strong></font></span> <form method="post" action="script_calculate.php" name="form1"> <table width="572" cellpadding="0" cellspacing="1" > <tr align="center" bgcolor="#000000" class="normal_font"> <td width="5%" height="22" bgcolor="#666666" class="style6">เธฅเธ</td> <td width="15%" bgcolor="#666666"><span class="style6">เธฃเธซเธฑเธชเธชเธดเธเธเนเธฒ</span></td> <td width="17%" bgcolor="#666666" class="style6">เธเธฃเธฐเน€เธ เธ—เธชเธดเธเธเนเธฒ</td> <td width="21%" bgcolor="#666666" class="style6">เธชเธดเธเธเนเธฒ</td> <td width="10%" bgcolor="#666666" class="style6">เธเธณเธเธงเธ</td> <td width="15%" bgcolor="#666666" class="style6">เธฃเธฒเธเธฒ / เธซเธเนเธงเธข </td> <td width="17%" colspan="2" bgcolor="#666666" class="style6">เธฃเธงเธก (เธเธฒเธ—) </td> </tr> <? for($i=0;$i<count($sess_id);$i++){ $total_unit=$sess_num[$i]*$sess_price[$i]; $total=$total_unit + $total; $sum=$total+$sess_service; $code=sprintf("%05d",$sess_id[$i]); $summ1 = $sess_weight[$i] * $sess_num[$i]; $summ = $summ + $summ1; มันติดตรงนี้แหละคับ $_SESSION['summ'] = $summ; ?> <tr align="center"> <td><input name="p_del[]" type="checkbox" id="p_del[]" value="<?=$sess_id[$i]?>" ></td> <td><?=$sess_id[$i]?> <p> </p></td> <td height="22"><?=$sess_type[$i]?> <p> </p></td> <td><?=$sess_name[$i]?> <p><input type="text" value="<?=$summ1;?>" id="sumweg"></p></td> <td><p> <input name="prd_num[]" type="text" style="text-align:center" value="<?=$sess_num[$i]?>" size="5" /> </p> <p> </p></td> <td "><? echo number_format($sess_price[$i],2);?> <p> </p></td> <td><p><span name="spnSum1" id="spnSum1"><? echo number_format($total_unit,2);?></span></p> <p> </p></td> </tr> <? } ?> <tr> <td colspan="8" align="right" class="normal_font"><?=$_SESSION['summ']; ?>เธฃเธฒเธเธฒเธฃเธงเธกเธชเธดเธเธเนเธฒเธ—เธฑเนเธเธซเธกเธ” <strong><span class="style13"><? echo number_format($total,2);?></span></strong> เธเธฒเธ— </td> </tr> <tr> <td height="22" colspan="8" align="right"> <input name="calculate" type="submit" value="เธเธณเธเธงเธ“เนเธซเธกเน" style="background:url(images/preeson1.png); width:100; height:70;"/> <input name="continuebuy" type="button" id="continuebuy" onclick="window.location='index.php' " value="เน€เธฅเธทเธญเธเธเธทเนเธญเธชเธดเธเธเนเธฒเน€เธเธดเนเธก" style="background:url(images/preeson1.png); width:100; height:70;"/> <input name="complete" type="button" class="style13" id="complete" onclick="window.location='?do=order' " value="เธชเธฑเนเธเธเธทเนเธญเธชเธดเธเธเนเธฒ" style="background:url(images/preeson1.png); width:100; height:70;"/></td> </tr> </table> <? } ?> </form> </td> </tr> </table> <br /> </body> </html>
<? session_start(); ?> <!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-874" /> <title>เธ•เธฃเธฐเธเธฃเนเธฒเธชเธดเธเธเนเธฒ</title> <link href="normal_font.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .style6 { font-size: 16px; color: #FFF; } .style13 {color: #FF0000} .style19 {color: #CCFF33} --> </style> <!--javaเธเธณเธเธงเธ --> <script language="javascript"> function CheckSubmit() { form1.submit(); } </script> </head> <body> <table width="574" align="center"> <tr> <td width="573" valign="top" bgcolor="#FFFFFF"><span class="style6"> <? $sess_id=$_SESSION['sess_id']; $sess_name=$_SESSION['sess_name']; $sess_price=$_SESSION['sess_price']; $sess_type=$_SESSION['sess_type']; $sess_num=$_SESSION['sess_num']; $sess_service=$_SESSION['sess_service']; $sess_weight=$_SESSION['sess_weight']; อันนี้คือน้ำหนัก ?> <strong> <? if(count($sess_id)==0){ ?> </strong><font color="#FF0000">เธขเธฑเธเนเธกเนเธกเธตเธชเธดเธเธเนเธฒเนเธเธ•เธฐเธเธฃเนเธฒเธชเธดเธเธเนเธฒเธเธญเธเธ—เนเธฒเธเธเธฃเธฑเธ <a href="index.php" title="เน€เธฅเธทเธญเธเธเธทเนเธญเธชเธดเธเธเนเธฒ">เธเธฅเธดเธเธ—เธตเนเธเธตเน</a><strong><strong><a href="index.php" title="เน€เธฅเธทเธญเธเธเธทเนเธญเธชเธดเธเธเนเธฒ"></a> </strong></strong>เน€เธเธทเนเธญเน€เธฅเธทเธญเธเธเธทเนเธญเธชเธดเธเธเนเธฒเธเนเธฐเธเธฃเธฑเธ<strong><strong> <? }else{ ?> </strong></strong></font></span> <form method="post" action="script_calculate.php" name="form1"> <table width="572" cellpadding="0" cellspacing="1" > <tr align="center" bgcolor="#000000" class="normal_font"> <td width="5%" height="22" bgcolor="#666666" class="style6">เธฅเธ</td> <td width="15%" bgcolor="#666666"><span class="style6">เธฃเธซเธฑเธชเธชเธดเธเธเนเธฒ</span></td> <td width="17%" bgcolor="#666666" class="style6">เธเธฃเธฐเน€เธ เธ—เธชเธดเธเธเนเธฒ</td> <td width="21%" bgcolor="#666666" class="style6">เธชเธดเธเธเนเธฒ</td> <td width="10%" bgcolor="#666666" class="style6">เธเธณเธเธงเธ</td> <td width="15%" bgcolor="#666666" class="style6">เธฃเธฒเธเธฒ / เธซเธเนเธงเธข </td> <td width="17%" colspan="2" bgcolor="#666666" class="style6">เธฃเธงเธก (เธเธฒเธ—) </td> </tr> <? for($i=0;$i<count($sess_id);$i++){ $total_unit=$sess_num[$i]*$sess_price[$i]; $total=$total_unit + $total; $sum=$total+$sess_service; $code=sprintf("%05d",$sess_id[$i]); $summ1 = $sess_weight[$i] * $sess_num[$i]; $summ = $summ + $summ1; มันติดตรงนี้แหละคับ $_SESSION['summ'] = $summ; ?> <tr align="center"> <td><input name="p_del[]" type="checkbox" id="p_del[]" value="<?=$sess_id[$i]?>" ></td> <td><?=$sess_id[$i]?> <p> </p></td> <td height="22"><?=$sess_type[$i]?> <p> </p></td> <td><?=$sess_name[$i]?> <p><input type="text" value="<?=$summ1;?>" id="sumweg"></p></td> <td><p> <input name="prd_num[]" type="text" style="text-align:center" value="<?=$sess_num[$i]?>" size="5" /> </p> <p> </p></td> <td "><? echo number_format($sess_price[$i],2);?> <p> </p></td> <td><p><span name="spnSum1" id="spnSum1"><? echo number_format($total_unit,2);?></span></p> <p> </p></td> </tr> <tr> <td colspan="8" align="right" class="normal_font"><?=$_SESSION['summ']; ?>เธฃเธฒเธเธฒเธฃเธงเธกเธชเธดเธเธเนเธฒเธ—เธฑเนเธเธซเธกเธ" <strong><span class="style13"><? echo number_format($total,2);?></span></strong> เธเธฒเธ— </td> </tr> <? } ?> <tr> <td height="22" colspan="8" align="right"> <input name="calculate" type="submit" value="เธเธณเธเธงเธ"เนเธซเธกเน" style="background:url(images/preeson1.png); width:100; height:70;"/> <input name="continuebuy" type="button" id="continuebuy" onclick="window.location='index.php' " value="เน€เธฅเธทเธญเธเธเธทเนเธญเธชเธดเธเธเนเธฒเน€เธเธดเนเธก" style="background:url(images/preeson1.png); width:100; height:70;"/> <input name="complete" type="button" class="style13" id="complete" onclick="window.location='?do=order' " value="เธชเธฑเนเธเธเธทเนเธญเธชเธดเธเธเนเธฒ" style="background:url(images/preeson1.png); width:100; height:70;"/></td> </tr> </table> <? } ?> </form> </td> </tr> </table> <br /> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง