<?php session_start(); require_once("../include/connect.php"); require_once("../include/function.php"); require_once("functionphp.php"); if(isset($_SESSION["U_User"])) { $U_User=$_SESSION["U_User"]; $strExcelFileName="material-All.xls"; header("Content-Type: application/x-msexcel; name=\"$strExcelFileName\""); header("Content-Disposition: inline; filename=\"$strExcelFileName\""); header("Pragma:no-cache"); ?> <html xmlns:o="urn:schemas-microsoft-com:office:office"xmlns:x="urn:schemas-microsoft-com:office:excel"xmlns="http://www.w3.org/TR/REC-html40"> <!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 rel="stylesheet" type="text/css" href="css_report.css"> </head> <body> <div id="bodymain"> <?php $strsql="select * from tb_material order by mat_id asc"; $dbquery=mysql_db_query($dbname,$strsql,$conn); $numrows=mysql_num_rows($dbquery); ?> <table class="c_list"> <thead> <tr> <th width="3%">#</th> <th width="8%">รหัสวัสดุ</th> <th width="29%">ชื่อวัสดุ</th> <th width="29%">หน่วยงาน</th> <th width="7%">จำนวน</th> <th width="15%">รูปภาพ</th> </tr> </thead> <tbody> <?php $j=1; if($numrows>0){ while($objResult=mysql_fetch_array($dbquery)){ ?> <tr> <td align="center"><?php echo $j;?></td> <td><?php echo $objResult["mat_code"];?></td> <td align="center"><?php echo $objResult["mat_name"];?></td> <td align="center"><?php echo $objResult["mat_projectid"];?></td> <td align="center"><?php echo $objResult["mat_qty"];?> <?php echo $objResult["mat_unit"];?></td> <td><img src="../material/<?php echo $objResult["mat_image"];?>" width="121" height="94" border="1" /></td> </tr> <?php $j++; } } ?> <tr> <td align="right" colspan="5">รวม/Total <?php echo $numrows;?> รายการ</td> </tr> </tbody> </table> </div> <script> window.onbeforeunload = function(){return false;}; setTimeout(function(){window.close();}, 10000); </script> </body> </html> <?php } else { echo"<meta http-equiv=refresh content='0; URL=index.php'>"; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง