$sql="select * from content where cat='A' order by ordering";
$rows = $g_db->getObjects($sql);
?>
for ($i=0; $i
}?>
$sql="select * from content where cat='B' order by ordering";
$rows = $g_db->getObjects($sql);
?>
for ($i=0; $i
}?>
$url_path = "page/".$url.".php";
if (is_file($url_path)) {
include($url_path);
}
?>
$sql = "SELECT id, post_date, title, picture,total_view,cat,subtitle, DATEDIFF(NOW(), post_date) AS past_day FROM news WHERE cat='B' AND activated=1 ORDER BY fixed DESC, fixed_date DESC, id DESC LIMIT 0, 5";
$rows = $g_db->getObjects($sql);
if (count($rows)>0)
$row = $rows[0];
for ($i=0; $i
}
if(count($rows)<=0){
?>
ยังไม่มีข้อมูล!!
}?>
$sql = "SELECT * FROM news WHERE cat='D' AND activated=1 ORDER BY fixed DESC, fixed_date DESC, id DESC LIMIT 0, 1";
$rows = $g_db->getObjects($sql);
if(count($rows)>0){
?>
$sql = "SELECT * FROM news WHERE cat='F' AND activated=1 ORDER BY fixed DESC, fixed_date DESC, id DESC LIMIT 0, 1";
$rows = $g_db->getObjects($sql);
if (count($rows)>0)
$row = $rows[0];
for ($i=0; $i
$sql_maha = "SELECT * FROM teacher_mahapali WHERE activated=1 order by id desc limit 1 ";
$rowmaha= $g_db->getObject($sql_maha);
$picture = $g_config['teacher_path'].$rowmaha->picture;
?>
$sql = "SELECT * FROM banner WHERE activated=1 and point='r1' and cat!='B' ORDER BY ordering asc limit 10";
$rows = $g_db->getObjects($sql);
for ($i=0; $i";}
?>