<html> <head> <title>SC Sticker </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php @session_start(); include("connect.php"); mysql_query("SET NAMES UTF8"); include ("front/plugin_front.php"); include ("front_header.php"); include ("type_menu.php"); ?> </head> <body topmargin="0" leftmargin="0"> <div class="container"> <div class="col-sm-8 blog-main"> <ol class="breadcrumb"> <li><a href="home.php">หน้าแรก</a></li> <li class="active">ตะกร้าสินค้า</li> </ol> </div> <div class="row"> <div class="col-sm-8 "> <!-- <div class="row" style="font-size:13px;"> --> <?php if ($_SESSION["intLine"] > 0) { ?> <form action="basket_cal.php" method="POST"> <center> <table class="table table-bordered table-hover"> <thead> <tr> <th style="width:130px;text-align:center;background-color: #f5f5f5;">รูปสินค้า</th> <th style="background-color: #f5f5f5;">สินค้า</th> <th style="width:130px;text-align:center;background-color: #f5f5f5;">ราคา/หน่วย</th> <th style="width:100px;text-align: center;background-color: #f5f5f5;">จำนวน</th> <th style="width:140px;text-align:center;background-color: #f5f5f5;">จำนวนเงินรวม</th> <th style="width:100px;text-align:center;background-color: #f5f5f5;"> </th> </tr> </thead> <tbody> <?php $Total = 0; $SumTotal = 0; for($i=0;$i<=(int)$_SESSION["intLine"];$i++) { if($_SESSION["strProductID"][$i] != "") { $strSQL = "SELECT * FROM product WHERE product_id = '".$_SESSION['strProductID'][$i]."' "; $objQuery = mysql_query($strSQL) or die(mysql_error()); $objResult = mysql_fetch_array($objQuery); $Total = $_SESSION["strQty"][$i] * $objResult["saleprice"]; $SumTotal = $SumTotal + $Total; echo "<tr>"; ?> <?php echo '<td align=center> '.'<img src="../scsticker_test/img/product_img/'.$objResult['product_id'].'.jpg" class="magnify" style="width:60px;height:60px;">' . '</td>'; echo "<td> ".$objResult['product_name']."</td>"; ?> <?php echo"<td style='text-align:right;'>".$objResult['saleprice']."</td>"; ?> <td style="text-align:center;"> <input type='text' class="form-control" name='txtQty<?php echo $i;?>' value="<?php echo $_SESSION["strQty"][$i];?>" size="2" style="text-align:center;"> </td> <td style="text-align:right;"><?php echo number_format($Total,2);?></td> <td> <center> <a href="delete_basket.php?Line=<?php echo $i;?>" class="btn btn-danger"> <span class='glyphicon glyphicon-trash'></span> ลบ </a> </center> </td> </tr> <?php } } ?> <h4>เลือกวิธีการจัดส่ง</h4> <hr> <tr> <td align="left"> <input type="radio" name="deliver_format_details0" id="deliver_format_details" value="20" />พัสดุธรรมดา<br /> </td> <td colspan="6" align="right">20</td> </tr> <tr> <td align="left"> <input type="radio" name="deliver_format_details1" id="deliver_format_details" value="70" />พัสดุลงทะเบียน<br /> </td> <td colspan="6" align="right">70</td> </tr> <tr> <td align="left"> <input type="radio" name="deliver_format_details2" id="deliver_format_details" value="80" />พัสดุด่วนพิเศษ<br /> </td> <td colspan="6" align="right">80</td> </tr> <tr> <td align="left"> <input type="radio" name="deliver_format_details3" id="deliver_format_details" value="0" />พัสดุธรรมดา<br /> </td> <td colspan="6" align="right">0</td> </tr> <tr> <td colspan="6" style="text-align: right; background-color: #f5f5f5;"> <h4> <?php echo "จำนวนเงินทั้งหมด "." ".number_format($SumTotal,2); ?> บาท </h4> </td> </tr> <tr> <td colspan="6" style="text-align: right;"> <button type="submit" name="calculate" class="btn btn-primary" > <span class="glyphicon glyphicon-refresh"></span> คำนวณใหม่ </button> <button type="button" name="complete" class="btn btn-success ordercart" ONCLICK="window.location.href='product_order.php'"> <span class="glyphicon glyphicon-shopping-cart"></span> สั่งซื้อสินค้า </button> </td> </tr> </tbody> </table> </center> </form> <?php } else if($_SESSION["intLine"] = 0) { ?> <div class="alert alert-danger" role="alert" style="margin:15px;"> ไม่มีสินค้าในตะกร้าสินค้า หากต้องการซื้อสินค้า </div> <?php } ?> </div> </div><!-- /.blog-main --> </div><!-- /.row --> </div><!-- /.container --> </body> </html>
<?php ob_start(); session_start(); for($i=0;$i<=(int)$_SESSION["intLine"];$i++) { if($_SESSION["strProductID"][$i] != "") { $_SESSION["strQty"][$i] = $_POST["txtQty".$i]; } } header("location:basket.php"); ?>
<html> <head> <title>SC Sticker </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php @session_start(); include("connect.php"); mysql_query("SET NAMES UTF8"); include ("front/plugin_front.php"); include ("front_header.php"); include ("type_menu.php"); ?> <script> function check(deliver_format_details) { document.getElementById("total").value=deliver_format_details; } </script> </head> <body topmargin="0" leftmargin="0"> <div class="container"> <div class="col-sm-8 blog-main"> <ol class="breadcrumb"> <li><a href="home.php">หน้าแรก</a></li> <li class="active">ตะกร้าสินค้า</li> </ol> </div> <div class="row"> <div class="col-sm-8 "> <!-- <div class="row" style="font-size:13px;"> --> <?php if ($_SESSION["intLine"] > 0) { ?> <form action="basket_cal.php" method="POST"> <center> <table class="table table-bordered table-hover"> <thead> <tr> <th style="width:130px;text-align:center;background-color: #f5f5f5;">รูปสินค้า</th> <th style="background-color: #f5f5f5;">สินค้า</th> <th style="width:130px;text-align:center;background-color: #f5f5f5;">ราคา/หน่วย</th> <th style="width:100px;text-align: center;background-color: #f5f5f5;">จำนวน</th> <th style="width:140px;text-align:center;background-color: #f5f5f5;">จำนวนเงินรวม</th> <th style="width:100px;text-align:center;background-color: #f5f5f5;"> </th> </tr> </thead> <tbody> <?php $Total = 0; $SumTotal = 0; for($i=0;$i<=(int)$_SESSION["intLine"];$i++) { if($_SESSION["strProductID"][$i] != "") { $strSQL = "SELECT * FROM product WHERE product_id = '".$_SESSION['strProductID'][$i]."' "; $objQuery = mysql_query($strSQL) or die(mysql_error()); $objResult = mysql_fetch_array($objQuery); $Total = $_SESSION["strQty"][$i] * $objResult["saleprice"]; $SumTotal = $SumTotal + $Total; echo "<tr>"; ?> <?php echo '<td align=center> '.'<img src="../scsticker_test/img/product_img/'.$objResult['product_id'].'.jpg" class="magnify" style="width:60px;height:60px;">' . '</td>'; echo "<td> ".$objResult['product_name']."</td>"; ?> <?php echo"<td style='text-align:right;'>".$objResult['saleprice']."</td>"; ?> <td style="text-align:center;"> <input type='text' class="form-control" name='txtQty<?php echo $i;?>' value="<?php echo $_SESSION["strQty"][$i];?>" size="2" style="text-align:center;"> </td> <td style="text-align:right;"><?php echo number_format($Total,2);?></td> <td> <center> <a href="delete_basket.php?Line=<?php echo $i;?>" class="btn btn-danger"> <span class='glyphicon glyphicon-trash'></span> ลบ </a> </center> </td> </tr> <?php } } ?> <tr> <td colspan="6" style="text-align: right; background-color: #f5f5f5;"> <h4> <?php echo "จำนวนเงินทั้งหมด "." ".number_format($SumTotal,2); ?> บาท </h4> </td> </tr> <tr> <td colspan="6" style="text-align: right;"> <button type="submit" name="calculate" class="btn btn-primary" > <span class="glyphicon glyphicon-refresh"></span> คำนวณใหม่ </button> <button type="button" name="complete" class="btn btn-success ordercart" ONCLICK="window.location.href='product_order.php'"> <span class="glyphicon glyphicon-shopping-cart"></span> สั่งซื้อสินค้า </button> </td> </tr> </tbody> </table> </center> </form> <h4>เลือกวิธีการจัดส่ง</h4> <hr> <table> <tr> <td align="left"> <input type="radio" name="deliver_format_details" id="deliver_format_details" value="20" onclick="check(this.value)"/>พัสดุธรรมดา<br /> </td> <td colspan="6" align="right">20</td> </tr> <tr> <td align="left"> <input type="radio" name="deliver_format_details" id="deliver_format_details" value="70" onclick="check(this.value)"/>พัสดุลงทะเบียน<br /> </td> <td colspan="6" align="right">70</td> </tr> <tr> <td align="left"> <input type="radio" name="deliver_format_details" id="deliver_format_details" value="80" onclick="check(this.value)"/>พัสดุด่วนพิเศษ<br /> </td> <td colspan="6" align="right">80</td> </tr> <tr> <td align="left"> <input type="radio" name="deliver_format_details" id="deliver_format_details" value="0" onclick="check(this.value)"/>พัสดุธรรมดา<br /> </td> <td colspan="6" align="right">0</td> </tr></table> <input type="text" name="total" id="total"> <input type="text" name="sumtotal" id="sumtotal" value="<?=$SumTotal?>"> <?php } else if($_SESSION["intLine"] = 0) { ?> <div class="alert alert-danger" role="alert" style="margin:15px;"> ไม่มีสินค้าในตะกร้าสินค้า หากต้องการซื้อสินค้า </div> <?php } ?> </div> </div><!-- /.blog-main --> </div><!-- /.row --> </div><!-- /.container --> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง