<? include ("conne.php"); $strSQL = "select * from oder where status = 'รอจัดของ' order by number_so ASC"; $objQuery = mysql_query($strSQL) or die (mysql_error()); $intNumField = mysql_num_fields($objQuery); $resultArray = array(); while($obResult = mysql_fetch_array($objQuery)) { $arrCol = array(); for($i=0;$i<$intNumField;$i++) { $arrCol[mysql_field_name($objQuery,$i)] = $obResult[$i]; } array_push($resultArray,$arrCol); } echo json_encode($resultArray); ?>
<? include ("../right_user.php"); ?> <!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>STORE:KOOL-Inventory</title> <link href="templatemo_style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style1 { font-size: 16px; font-weight: bold; } .style2 {font-size: 14px} --> </style> <script src="jquery-latest.js"></script> <script> function getDataFromDb() { $.ajax({ url: "getdata_index.php" , type: "POST", data: '' }) .success(function(result) { var obj = jQuery.parseJSON(result); if(obj != '') { //$("#myTable tbody tr:not(:first-child)").remove(); $("#myBody").empty(); $.each(obj, function(key, val) { var tr = "<tr>"; tr = tr + "<td>" + val["number_so"] + "</td>"; tr = tr + "<td>" + val["name_customer"] + "</td>"; tr = tr + "</tr>"; $('#myTable > tbody:last').append(tr); }); } }); } setInterval(getDataFromDb, 10000); // 1000 = 1 second </script> <body> <div id="templatemo_wrapper"> <div id="templatmeo_header"> <? include ("menu.php"); ?> <!-- end of templatemo_menu --> </div> <!-- end of header --> <div id="templatemo_main"> <div class="content_box"> <div id="home"> <table width="361" border="0" align="center"> <!-- head table --> <thead> <tr> <td width="274" bgcolor="#A3D615"><div align="center" class="style1">ใบจัดของ</div></td> <td width="77" bgcolor="#A3D615"><div align="center"></div></td> </tr> </thead> <!-- body dynamic rows --> <tbody id="myBody"></tbody> </table> </div> <div class="content_box_content"> <div class="cleaner h30"></div> <div class="cleaner"></div> </div> <!-- end of content box content --> </div> <!-- end of a content box --> <div id="aboutus"></div> <!-- end of a content box --> <!-- end of a content box --> <!-- end of a content box --> <div class="content_box content_box_last"> <div id="contactus"></div> <!-- end of content box content --> </div> <!-- end of a content box --> </div> <!-- end of main --> <div id="templatemo_footer"> <a href="http://server/checkstock" target="_parent">Back to Home</a> </div> <!-- end of templatemo_footer --> </div> <!-- end of wrapper --> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง