include "connect.php";
include "function.php";
$sql="select * from news where type='G' and showdetail='show' order by id_news desc";
$result=mysql_db_query($db,$sql);
$nrow = mysql_num_rows($result);
if ($nrow==0){
echo "
::ไม่มีข่าวประกาศเพิ่มเติม::
|
";
}else{
while($record=mysql_fetch_array($result)){
$id_news=$record[id_news];
$type=$record[type];
$subject=$record[subject];
$detail=$record[detail];
$datestart=$record[datestart];
$datestart=displaydate($datestart);
$dateend=$record[dateend];
$url=$record['link'];
$file=$record['file'];
$photo1=$record[photo1];
$photo2=$record[photo2];
$photo3=$record[photo3];
$hit=$record[hit];
if ($detail==""){
$linkfile='http://www.grad.ru.ac.th/Newsboard/File/'.$file;
echo "
![](nphoto/$photo1) |
";
if ($file==""){
echo "$subject ...วันที่ลงข่าว $datestart..[อ่าน $hit ครั้ง] |
";
} else {
echo "
![](nphoto/$photo1) |
$subject ..วันที่ $datestart..[อ่าน $hit ครั้ง] |
";
}
}
}
mysql_close();
?>
::ข่าววิชาการ:: |
include "connect.php";
$sql="select * from news where type='V' and showdetail='show' order by id_news desc";
$result=mysql_db_query($db,$sql);
$nrow = mysql_num_rows($result);
if ($nrow==0){
echo "
::ไม่มีข่าวประกาศเพิ่มเติม::
|
";
}else{
while($record=mysql_fetch_array($result)){
$id_news=$record[id_news];
$type=$record[type];
$subject=$record[subject];
$detail=$record[detail];
$datestart=$record[datestart];
$datestart=displaydate($datestart);
$dateend=$record[dateend];
$url=$record['link'];
$file=$record['file'];
$photo1=$record[photo1];
$photo2=$record[photo2];
$photo3=$record[photo3];
$hit=$record[hit];
if ($detail==""){
$linkfile='http://www.grad.ru.ac.th/Newsboard/File/'.$file;
echo "
![](nphoto/$photo1) |
";
if ($file==""){
echo "$subject ...วันที่ลงข่าว $datestart..[อ่าน $hit ครั้ง] |
";
} else {
echo "
![](nphoto/$photo1) |
$subject ..วันที่ $datestart..[อ่าน $hit ครั้ง] |
";
}
}
}
mysql_close();
?>