เนื่องจากEZyTrip ได้ปิดปรับปรุงระบบชั่วคราว
จึงไม่สามารถใช้งานเว็บบอร์ดได้ในวันดังกล่าว
ขออภัยในความไม่สะดวกมา ณ ที่ด้วยค่ะ
"; exit ; } //$sql = "USE ezytrip;"; $res = mysql_query($sql); $charset = "SET character_set_results=utf8"; mysql_query($charset) or die('Invalid query: ' . mysql_error()); //get data(1st post) from database $sql2 = "select * from webboard where (status='y' or type ='reserve') and id=$chk;"; $res2 = mysql_query($sql2); $chk_row = mysql_num_rows($res2); if($chk_row){ $title = mysql_result($res2,0,'title'); $uname = mysql_result($res2,0,'pname'); $pre_body = mysql_result($res2,0,'pre_body'); $uname = admin_name($uname); $time_post = mysql_result($res2,0,'time_post'); $time_post = gdate($time_post); $programme_inv= mysql_result($res2,0,'programme_inv'); $sub_comment = mysql_result($res2,0,'sub_comment'); if ( $sub_comment) { $sub_comment = "

" . $sub_comment . "
"; } $comment = mysql_result($res2,0,'comment'); $comment = preg_replace("/\n/i","\n
",$comment); $comment = preg_replace('/\[b\]/i','',$comment); $comment = preg_replace('/\[\/b\]/i','',$comment); $comment = mklink($comment); $imgp =''; if (mysql_result($res2,0,'image_path')){ $imgpth= mysql_result($res2,0,'image_path'); $border= mysql_result($res2,0,'border'); //echo "$imgpth--"; $imgpth = preg_replace("/\.\//","",$imgpth); if ($_SESSION['mylogin']=="kaew" or $_SESSION['mylogin']=="talon"){ $s_pic0 = ""; }else{ $s_pic0 = ''; } //echo "$imgpth--$imgpth
"; $w_image1=''; if (trim($imgpth)){ //$imgpth_s = "/home/ezytrip/domains/ezytrip.com/public_html/webboard/$imgpth"; //chmod($imgpth,0777); //list($width0,$height0)= getimagesize($imgpth); //if($width0 >780 ){ //$w_image1 = " width=780 "; //} $imgp = "
"; $img_show = "http://www.ezytrip.com/webboard/$imgpth"; } } $links_b = mysql_result($res2,0,'links_b'); $links_bpath = mysql_result($res2,0,'links_bpath'); //$click = mysql_result($res2,0,'click'); //++$click; $ip = mysql_result($res2,0,'ip'); $sql3 = "update webboard set click = click+1 where id =$chk;"; $res3 = mysql_query($sql3); //get data(comment) from database $post_page = 40; $wb_name = 'comment_wb'; $show_page = $post_page * ($pages-1); $cond = " where wb_id=$chk and status= 'y' "; $sql31 = "select * from comment_wb where wb_id=$chk and status='y' order by id ;"; $res31 = mysql_query($sql31); $mynum = mysql_num_rows($res31); $pages1 = $mynum/$post_page ; $pages_int1 = $pages1; settype($pages_int1,"integer"); if ($pages1 > $pages_int1){ ++$pages_int1; } $links = "http://www.ezytrip.com/webboard/show.php?id=$chk&pages="; $comment_page = page_split($post_page,$wb_name,$cond,$links); $sql4 = "select * from comment_wb where wb_id=$chk and status='y' order by id limit $show_page,$post_page;"; $result = mysql_query($sql4); $iii = 1; $mycomm = ""; while ($dbarry=mysql_fetch_array($result)){ $img_path = $dbarry['image_path']; $wb_id = $dbarry['wb_id']; //echo "$img_path"; $border = $dbarry['border']; $cm_sub_comment = $dbarry['cm_sub_comment']; if($cm_sub_comment){ $cm_sub_comment = '

' . $cm_sub_comment . '
'; } $img_path = trim($img_path); // echo "--$img_path
"; if ($img_path){ $img_path = preg_replace("/\.\//","",$img_path); $w_image1=''; if ($_SESSION['mylogin']=="kaew" or $_SESSION['mylogin']=="talon"){ $s_pic = ""; }else{ $s_pic = ''; } if(trim($img_path)){ $img_path2 = "

"; }else{ $img_path2 = ""; } }else{ $img_path2 = ""; } $time_post2 = gdate($dbarry['pdate']); $comment2 = $dbarry['comment']; $comment2 = preg_replace("/\n/i","\n
",$comment2); $comment2 = mklink($comment2); $comment2 = preg_replace('/\[b\]/i','',$comment2); $comment2 = preg_replace('/\[\\/b\]/i','',$comment2); $pname2 = $dbarry['pname']; $pname2 = admin_name($pname2); $ip2 = $dbarry['ip']; $comment_id = $dbarry['id']; $wb_id = $dbarry['wb_id']; $iij = $iii + $show_page; $mycomm = $mycomm ."\n\n

"; $mycomm = $mycomm . "\nความคิดเห็นที่ $iij\n
$img_path2
"; $mycomm = $mycomm . "\n$comment2

โดย $pname2   $time_post2   IP : $ip2" ; $mycomm = $mycomm . "   "; $mycomm .= "   $s_pic $cm_sub_comment



" ; ++$iii; } //insert next pages $my_numa = $mynum; $my_numb = $my_numa-5; if ($my_numa > $post_page and $pages == 1){ if($mynum){ $mycomm .= "
\n"; $mycomm .= "
จำนวนผู้ตอบกระทู้ $mynum ท่าน "; $mycomm .= "
\nความคิดเห็น หน้าที่ >> $comment_page

"; } //insert 5 latest comments $sql4 = "select * from comment_wb where wb_id=$chk and status='y' order by id limit $my_numb,$my_numa;"; $result = mysql_query($sql4); $iii3 = 1; $mycomm .= "
5 ความคิดเห็นล่าสุด
"; while ($dbarry=mysql_fetch_array($result)){ $img_path3 = $dbarry['image_path']; //echo "$img_path"; $border3 = $dbarry['border']; $img_path3 = trim($img_path3); // echo "--$img_path
"; if ($img_path3){ $img_path3 = preg_replace("/\.\/","",$img_path3); $w_image13=''; if(trim($img_path3)){ $img_path32 = "

"; }else{ $img_path32 = ""; } }else{ $img_path32 = ""; } $time_post3 = gdate($dbarry['pdate']); $comment3 = $dbarry['comment']; $comment3 = preg_replace("/\n/i","\n
",$comment3); $comment3 = mklink($comment3); $comment3 = preg_replace('/\[b\]/i','',$comment3); $comment3 = preg_replace('/\[\\/b\]/i','',$comment3); $pname3 = $dbarry['pname']; $pname3 = admin_name($pname3); $ip3 = $dbarry['ip']; $comment_id3 = $dbarry['id']; $wb_id3 = $dbarry['wb_id']; $iij3 = $iii3 + $my_numb; $mycomm = $mycomm ."\n\n

"; $mycomm = $mycomm . "\nความคิดเห็นที่ $iij3\n
$img_path32
"; $mycomm = $mycomm . "\n$comment3

โดย $pname3   $time_post3   IP : $ip3" ; $mycomm = $mycomm . "   "; $mycomm .= "  



" ; ++$iii3; } } }else{ $mycomm = ''; $title = ''; $comment = 'ไม่พบข้อมุลที่คุณต้องการในฐานข้อมูล'; $s_pic0 = ''; $sub_comment = ''; } mysql_close($conn); echo "$title "; if($img_show){ echo""; } include '../config/head_wb.php'; if($programme_inv){ $stat = "webboard-EZ$programme_inv-$chk"; }else{ $stat = "webboard-Z-$chk"; } my_header('http://www.ezytrip.com/images/config/webboard.jpg',$stat,$chk,$links_b,$links_bpath); //echo "$width------
"; echo "
"; echo "\n

$title

\n$imgp


"; echo "\n$comment

โดย $uname   $time_post   IP : $ip"; echo "   "; echo "  $s_pic0"; echo " \n$sub_comment



" ; echo $mycomm; }else{ echo "

ไม่พบข้อมูลดังกล่าวค่ะ กรุณาแจ้ง Webmaster
"; } //insert next pages if($mynum){ echo "
\n"; echo "
จำนวนผู้ตอบกระทู้ $mynum ท่าน "; echo "
\nความคิดเห็น หน้าที่ >> $comment_page
"; } //insert form include ('form.php'); //$lines = file('form.php'); //$fff=""; //foreach ($lines as $iit){ // $fff = $fff.$iit; //} //echo $fff; if (isset($_SESSION['mylogin'])){ if($_SESSION['mylogin'] == 'kaew' or $_SESSION['mylogin']=='talon'){ echo ""; } } echo ""; echo ""; echo ""; echo ""; echo ""; //echo ""; include '../footer.php'; echo"   "; function gdate($mytime){ $byear = substr($mytime,0,4); $bmonth = substr($mytime,4,2); $bdate = substr($mytime,6,2); settype($byear,"integer"); settype($bmonth,"integer"); settype($bdate,"integer"); if ($byear>2500){ $byear -= 543; } $cday = date("w",mktime(0,0,0,$bmonth,$bdate,$byear)); settype($cday,"integer"); $bhour = substr($mytime,8,2); $bmin = substr($mytime,10,2); $bsec = substr($mytime,12,2); $tday = array("อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์"); $tmonth = array("มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"); //if ($byear <2400){$byear += 543;} $today = "เวลา $bhour:$bmin:$bsec น. วัน". $tday[$cday]."ที่ ". $bdate." ". $tmonth[$bmonth-1]." ". $byear; return $today; } function admin_name($pname){ if ($pname == 'ตะลอน' or $pname=='ป้าแก้ว'){ $a_name = "$pname "; }else{ $a_name = $pname ; } return $a_name ; } ?>