<style type="text/css"> .button1{border:1px solid #E4DFDF; width:35.5%;text-align:center;} .img{height:150px; width:250px;} </style> <?php @session_start(); include ("connect.php"); $sqli = "select * from equipment"; $result = mysqli_query($connect,$sqli); ?> <div class="wrap"> <!--<div ><a href="index.php?ref=addCS" class="button1" id="but">เพิ่ม</a></div><br>--> <?php $i=1; while ($data = mysqli_fetch_array($result)){ ?> <?php if($data['eqStatus'] != 0){?> <section class="col-1-3"><div class="wrap-col"> <div class="box"> <div> <h2><span><?=$data['eqName']?></span></h2> <figure><img src="<?=$data['eqImage']?>" class="img"></figure> <h2 style="color:red;">จำนวนคงเหลือ : <span><?=number_format($data['eqNumber'])?></span> <?=$data['eqDevice_unit']?> <br>ราคาต่อชิ้น : <span><?=number_format($data['eqPrice'])?></span> บาท <br>จำนวนที่ต้องการเช่า : <input type="text" name="txtQty" id="txtQty" value="1" size="1" /></h2> <input type="hidden" name="txtEqid" id="txtEqid" value="<?php echo $data["eq_ID"];?>" size="2" /> </p> <?php if(@$_SESSION['status_type'] != null){?> <a href="javascript:doSendParams();" class="button1">เลือก</a> <script type="text/javascript"> function doSendParams(){ var txtEqid = document.getElementById("txtEqid").value; var txtQty = document.getElementById("txtQty").value; location.href='order.php?eq_ID=' + txtEqid + '&txtQty=' + txtQty; } </script> <?php }?> <!--<a href="#" class="button1">รายละเอียด</a>--> </div> </div> </div></section> <?php }?> <?php }?> </div>
<a href="order.php?eq_ID=<?php echo $data['eq_ID'] ?>&txtQty=" class="button1">เลือก</a>
<?php echo $data['eq_ID'] ?>
<style type="text/css"> .button1{border:1px solid #E4DFDF; width:35.5%;text-align:center;} .img{height:150px; width:250px;} </style> <?php @session_start(); include ("connect.php"); $sqli = "select * from equipment"; $result = mysqli_query($connect,$sqli); ?> <div class="wrap"> <!--<div ><a href="index.php?ref=addCS" class="button1" id="but">เพิ่ม</a></div><br>--> <?php $i=1; while ($data = mysqli_fetch_array($result)){ ?> <?php if($data['eqStatus'] != 0){?> <section class="col-1-3"><div class="wrap-col"> <div class="box"> <div> <h2><span><?=$data['eqName']?></span></h2> <figure><img src="<?=$data['eqImage']?>" class="img"></figure> <h2 style="color:red;">จำนวนคงเหลือ : <span><?=number_format($data['eqNumber'])?></span> <?=$data['eqDevice_unit']?> <br>ราคาต่อชิ้น : <span><?=number_format($data['eqPrice'])?></span> บาท <br>จำนวนที่ต้องการเช่า : <input type="text" name="txtQty" id="txtQty" value="1" size="1" /></h2> <input type="hidden" name="txtEqid" id="txtEqid" value="<?php echo $data["eq_ID"];?>" size="2" /> </p> <?php if(@$_SESSION['status_type'] != null){?> <a href="javascript:doSendParams(<?php echo $data['eq_ID']?>,);" class="button1">เลือก</a> <?php }?> <!--<a href="#" class="button1">รายละเอียด</a>--> </div> </div> </div></section> <?php }?> <?php }?> <script type="text/javascript"> function doSendParams(eq_ID){ var txtEqid = document.getElementById("txtEqid").value; var txtQty = document.getElementById("txtQty").value; location.href='order.php?eq_ID=' + eq_ID + '&txtQty=' + txtQty; } </script> </div>
<script type="text/javascript"> function doSendParams(eq_ID,Qty){ //var txtEqid = document.getElementById("txtEqid").value; // ตัดออกไปเลย //var txtQty = document.getElementById("txtQty").value; // ตัดออกไปเลย location.href='order.php?eq_ID=' + eq_ID + '&txtQty=' + Qty; } </script>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง