<?php session_cache_limiter('private, must-revalidate'); session_cache_expire(400);?> <?php @session_start(); ?> <?php include('header.php'); ?> <?php include('connect.php'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Data Tables</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.12/css/jquery.dataTables.css"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script type="text/javascript" charset="utf8" src="../js/jquery.dataTablesB.js"></script> <script type="text/javascript"> $(function(){ $('#example').dataTable( { "bFilter": false } ); }); </script> </head> <body> <!-- เนื้อหา --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <br/> <center> <form method="post"> <input type="text" name="txt_search" size="50" Value="<?=(isset($_POST['txt_search'])? $_POST['txt_search'] : '')?>" /> <input type="submit" name="search" value="ค้นหา" /> </form> </center> <p align="right"> </p> <section class="content-header"> <h1> แสดงสินค้า </h1> </section> <!-- Main content --> <section class="content"> <div class="CSSTableGenerator" > <table id="example"> <thead> <tr> <td>เลขที่</td> <td>รหัสสินค้า</td> <td>ชื่อสินค้า</td> <td>รูปสินค้า</td> <td>ราคา</td> <td>จำนวน</td> <td>หน่วย</td> </tr> </thead> <tbody> <?php $sql=" select * from pro_vw3 "; if(isset($_POST['search'])) { $txt_search=$_POST['txt_search']; $sql.=" where"; $sql.=" pro_no like '%".$txt_search."%'"; $sql.=" or"; $sql.=" pro_name like '%".$txt_search."%'"; $sql.=" or"; $sql.=" type_name like '%".$txt_search."%'"; } $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { echo "<tr>"; echo "<td>" . $row["pro_id"]. "</td>"; echo "<td> <a href='view_product.php?pro_id=" .$row['pro_id']. "'>".$row["pro_no"]."</a></td>"; echo "<td>" . $row["pro_name"]. "</td>"; echo "<td><img src=\"../upload/".$row["pro_pic1"]."\" width='130'/></td>"; echo "<td>" . $row["pro_sell"]. "</td>"; echo "<td>" . $row["pro_qty"]. "</td>"; echo "<td>" . $row["unit_name"]. "</td>"; } } ?> </tbody> </table> <section class="content-header"> <h1> งานประจำวัน</h1> </section> <table id="example"> <thead> <tr> <td>วัน</td> <td>วันที่</td> <td>พนักงาน</td> <td>งานที่ทำ</td> </tr> </thead> <tbody> <?php $sql=" select * from tb_delivery order by tb_delivery desc "; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { echo "<tr>"; echo "<td>" . $row["delivery_wan"]. "</td>"; echo "<td>" . $row ["delivery_date"]. "</td>"; echo "<td>" . $row["delivery_name"]. "</td>"; echo "<td>" . $row["delivery_detail"]. "</td>"; } } ?> </tbody> </table> </body> </html> <?php //include('footer.php'); ?>
select * from tb_delivery order by tb_delivery desc LIMIT 3
<script type="text/javascript"> $(function(){ $('#exampleXXXXXX').dataTable( { "bFilter": false }); }); </script>
<table id="example1"> <table id="example2"> //--------------------------------------------- $('#example1, #example2').dataTable( { "bFilter": false } );
<table class="example"> //--------------------------------------------- $('.example').dataTable( { "bFilter": false } );
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง