$id_view=$_GET[id_view]; include "function.php"; include "connect.php"; $sql="select * from tb_inews where id_new='$id_view' "; $result=mysql_db_query($dbname,$sql); $r=mysql_fetch_array($result); $id_new=$r[id_new]; $title_new=$r[title_new]; $detail_new=$r[detail_new]; $type_new=$r[type_new]; $photo_new=$r[photo_new]; $date_new=displaydate($r[date_new]); $time_new=$r[time_new]; $place_new=$r[place_new]; $count_click=$r[count_click]; $ext = strtolower(end(explode('.', $photo_new))); if ($ext =="jpg" or $ext == "gif") { $pic="images/gif.gif alt='ไฟล์ jpg หรือ gif'"; }else if($ext =="zip"){ $pic="images/zip.gif alt='ไฟล์ winzip'"; }else if($ext =="rar"){ $pic="images/rar.gif alt='ไฟล์ winrar'"; }else if($ext =="doc"){ $pic="images/word.gif alt='ไฟล์ word'"; }else if($ext =="xls"){ $pic="images/excel.gif alt='ไฟล์ exel'"; }else if($ext =="pdf"){ $pic="images/pdf.gif alt='ไฟล์ pdf'"; }else{ $pic="images/no.gif alt='Link ไปหน้า URL'"; } ?>
echo " "; echo " "; echo " "; echo " "; echo " "; echo "
|
$ext = strtolower(end(explode('.', $photo_new)));
if ($ext =="jpg" or $ext == "gif" or $ext=="jpeg") {
echo " "; } if ($photo_new<>"") { echo " "; echo " ";
echo " |