<?php <? include "connect_odbc.php"; //include "function.php"; $stmt = oci_parse($conn, "SELECT * FROM room "); oci_execute($stmt); //$i = 1; while ($row = oci_fetch_array ($stmt, OCI_NUM)) { $room_floor= $row[1]; $room_id= $row[0]; $room_sit= $row[4]; $room_floor=htmlspecialchars($room_floor); //$name_ques=htmlspecialchars($name_ques); //$detail_ques=nl2br(htmlspecialchars($detail_ques)); /* $date_ques=displaydate($date_ques); <td width="360" class="style31"><? echo "<a href='answer_view.php?id_ques=$id_ques'> $title_ques </a>"; ?></td>*/ ?> <table width="641"> <tr bgcolor="#e0eff8"> <td width="60" class="style31"><? echo $room_floor; ?></td> <td width="100" class="style31"><? echo $room_id; ?></td> <td width="80" class="style31"><? echo $room_sit; ?></td> </tr> </table> <? } ?> ?>
<?php <?php $sql = "SELECT * from tbl_room order by room_id"; $result = mysql_query($sql); $numsrow = mysql_num_rows($result); ?> <tbody> <tr> <td width="3%" class="tbl2" style="white-space: nowrap;"><div align="center" class="style2">NO</div></td> <td width="40%" valign="top" class="style3" style="white-space: nowrap;">ห้อง</td> <td width="6%" align="center" valign="top" class="style3" style="white-space: nowrap;">สถานะ</td> <td width="4%" class="tbl2" style="white-space: nowrap;"><div align="center" class="style2">NO</div></td> <td width="40%" valign="top" class="style3" style="white-space: nowrap;">ห้อง</td> <td width="7%" align="center" valign="top" class="style3" style="white-space: nowrap;">สถานะ</td> </tr> <?php $column = 2; $ic =1; for ($i=1; $i<=$numsrow;$i++){ $r=mysql_fetch_array($result); $room_id = $r['room_id']; $room_status = $r['room_status']; $room_type = $r['room_type']; if ($ic ==1) { ?> <tr> <?php } ?> <td class="tbl2" style="white-space: nowrap;"><div align="center"><?=$room_id?> </div></td> <td class="tbl1" style="white-space: nowrap;"><?=$room_type?></td> <?php if ($room_status ==1) { $sh = "bgcolor=\"red\""; } else { $sh = "bgcolor=\"green\""; } ?> <td style="white-space: nowrap;" align="center" <?=$sh?> ></td> <?php $ic++; if ($ic > $column) { ?> </tr> <?php $ic =1; } } ?> ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง