<?php session_start() ; if(!session_is_registered("login_true")){ echo "<meta http-equiv='refresh' content='0; url = index.php'>" ; exit() ; } ?> <!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"> <style type="text/css"> <!-- .style14 { font-size: 12px; font-family: "MS Sans Serif"; } .style17 {color: #0066CC} --> </style> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <title>รายการ</title> <style type="text/css"> <!-- .style12 { font-size: 12px; font-family: "ms Sans Serif"; color: #0033CC; } .style9 {font-size: 12px; font-family: "ms Sans Serif"; } .style19 {color: #003399} --> </style> </head> <body> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="4%" bgcolor="#99CCFF"><img src="images/Main_Clock.gif" width="24" height="24" /></td> <td width="59%" bgcolor="#99CCFF"><span class="style12">รายการอุปกรณ์ที่แจ้งซ่อมไว้กับระบบ</span></td> <td width="37%" bgcolor="#99CCFF"> </td> </tr> </table> <div align="center"></div> <br /> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="ecf5ff"> <tr> <td width="9%" height="23"><div align="center" class="style9"> <input type="checkbox" name="allbox" id="allbox" onclick="CA();" disabled="disabled"/> </div></td> <td width="9%"><div align="center"><span class="style9">รหัส</span></div></td> <td width="14%"><div align="center" class="style9">ชื่ออุปกรณ์</div></td> <td width="29%"><div align="center" class="style9">อาการเบื้องต้น</div></td> <td width="11%"><div align="center" class="style9">ห้อง</div></td> <td width="12%"><div align="center" class="style9">วันที่แจ้ง</div></td> <td width="16%"><div align="center" class="style9">สถานะ</div></td> </tr> </table> <? $sql = "select * from repair where user = '$login_true' "; $result = mysql_db_query($db,$sql); $NRow = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { $id = $row["id"]; $user = $row["user"]; $room = $row["room"]; $device = $row["device"]; $act = $row["act"]; $status = $row["status"]; $date = $row["date"]; /////////////////////////////////////////// $date_new=explode("-",$date); $date_new[0] += 543; //เอา ค.ศ. มา+543 เปง พ.ศ. $date=$date_new[2]."/".$date_new[1]."/".$date_new[0]; ?> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCFF"> <tr> <td width="9%" bgcolor="#FFFFFF"><div align="center" class="style9"> <input name="checkbox[]" type="checkbox" id="checkbox2" onclick='CCA(this)' value="<? echo $id ?>" disabled="disabled"/> </div></td> <td width="9%" bgcolor="#FFFFFF"><div align="center"><span class="style9"><? echo $id ?></span></div></td> <td width="14%" bgcolor="#FFFFFF"><div align="center" class="style17"><span class="style9"><? echo $device ?></span></div></td> <td width="29%" bgcolor="#FFFFFF"><div align="center"><span class="style9"><? echo $act?></span></div></td> <td width="11%" bgcolor="#FFFFFF"><div align="center"><span class="style9"><? echo $room?></span></div></td> <td width="12%" bgcolor="#FFFFFF"><div align="center"><span class="style14"> <? echo $date; ?> </span></div></td> <td width="16%" bgcolor="#FFFFFF"><div align="center"><span class="style9"><? if($status == "รอดำเนินการ") echo "<font color=red>รอดำเนินการ</font>";else echo "<font color=green>ดำเนินการเรียบร้อยแล้ว</font>";?></span></div></td> </tr> </table> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="8"><div align="center" class="style9"><img src="../images/bggreen.gif" width="100%" height="2" /></div></td> </tr> </table> <? } ?> </body> </html>
$result = mysql_query($sql); #คำสั่งเชคว่า มันสามารถประมวลผลได้หรือไม่ if (!$result){ echo mysql_error(); //แสดงคำสั่งที่ error exit(); }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง