"; }else { $img_new=""; } ////////////////////ส่วนการแสดงผล/////////////////////////////////////////////////////////////////////////////////////////////////////////// echo"
$post_subject

$post_text

"; if($post_attachment == 1){ $i=1; echo"
"; while ($i < $num_rows3+1){ //อ่านข้อมูลจากตาราง phpbb_attachments $result3 = mysql_fetch_array($dbquery3); $id = $result3[attach_id]; $extension = $result3[extension]; $real_filename = $result3[real_filename]; echo"ไฟล์แนบ$i "; $i++; }//END LOOP WHILE echo"

"; } echo"
$topic_first_poster_name เมื่อ$post_time
"; //แสดงผู้ตั้งคำถาม echo"

"; //นำตัวแปลวางต่อคำถาม }else{ $sql1 = "select * FROM phpbb_topics WHERE forum_id=10 OR forum_id=9 order by topic_last_post_time ASC "; $dbquery1 = mysql_db_query($dbname, $sql1); $date_check=date('m/y'); //หาวันที่ปัจจุบัน [ส่วนที่เพิ่ม] // หาจำนวนเรกคอร์ดข้อมูลในตาราง $num_rows1 = mysql_num_rows($dbquery1); // เริ่มวนรอบแสดงข้อมูล echo"


"; $i=0; while($i < $num_rows1){ // อ่านข้อมูลจากตาราง phpbb_topics $result1 = mysql_fetch_array($dbquery1); $topic_time = date('d/m/y',$result1[topic_time]); $topic_title = $result1[topic_title]; $topic_id = $result1[topic_id]; $forum_id = $result1[forum_id]; $time_check = substr($topic_time,3); if($date_check==$time_check ){ $img_new=""; }else { $img_new=""; } echo"
  • $topic_title
  • ($topic_time) $img_new
    "; $i++; }}//END LOOP WHILE // ปิดการติดต่อฐานข้อมูล mysql_close(); ?>

       


    สถาคณาจารย์และข้าราชการ มหาวิทยาลัยเทคโนโลยีราชมงคลอีสาน
    E-mail senate@rmuti.ac.th