(GPLv2)
or write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA02110-1301, USA.
********************************************************************************/
if (stristr(htmlentities($_SERVER['PHP_SELF']), "block_news.php")) {
die("
Error: This file cannot be opened directly! |
");
}
global $dblink;
/*
$news_result = $dblink->get_list("SELECT id,nome FROM memht_news WHERE enabled=1 ORDER BY id DESC LIMIT 20");
foreach ($news_result as $row_news) {
$nid = intval($row_news['id']);
$nnome = outCode($row_news['nome']);
echo "\n";
}
*/
echo "
";
echo "";
$news_result = $dblink->get_list("SELECT id,nome,imgfile,testo_home FROM memht_news WHERE enabled=1 ORDER BY id DESC LIMIT 5");
foreach ($news_result as $row_news) {
$nid = intval($row_news['id']);
$nnome = outCode($row_news['nome']);
$imgfile = outCode($row_news['imgfile']);
$testo_home = outCode($row_news['testo_home']);
//echo "\n";
//echo "\n";
echo "";
echo "";
if($imgfile !="" ){
echo " ";
}
echo " | ";
echo " $nnome | ";
echo "
";
echo "";
echo "$testo_home | ";
echo "
";
}
echo "
";
///////////////////////////////////////////////////////////////////////////////////////////////////////////
echo '
';
echo "ข่าวจากวิทยาลัย
\n";
echo '
';
$result = $dblink->get_list("SELECT * FROM memht_argomenti ORDER BY nome");
foreach ($result as $row) {
$aid = intval($row['id']);
$nome = outCode($row['nome']);
echo "
";
echo " $nome [อ่านข่าวทั้งหมด]\n";
// new
//echo $aid;
$news_result = $dblink->get_list("SELECT id,nome,imgfile,testo_home,data FROM memht_news WHERE enabled='1' and argomento='$aid' ORDER BY id DESC LIMIT 6");
if($news_result){
echo " ";
foreach ($news_result as $row_news) {
$nid = intval($row_news['id']);
$nnome = outCode($row_news['nome']);
$imgfile = outCode($row_news['imgfile']);
$testo_home = outCode($row_news['testo_home']);
$data = outCode($row_news['data']);
//echo $nnome;
//echo "\n";
//echo "\n";
echo "";
echo " ";
echo "$nnome [".printdate($data)."] | ";
echo "
";
}
echo "
";
}
echo "
\n";
//
}
echo "
\n";
?>