(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 "
$nnome
\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"); $news_result = $dblink->get_list("SELECT id,nome,imgfile,testo_home FROM memht_news WHERE enabled=1 ORDER BY id DESC LIMIT 6");// à»ÅÕè¹ LIMIT 5 à»ç¹ LIMIT 6 $num=0; // ¡Ó˹´¤èÒµÑÇá»Ã $num =0 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 "
$nnome
\n"; //echo "
  $nnome
$testo_home
\n"; // echo ""; // echo ""; // ¢Öé¹á¶ÇãËÁè } // »Ô´ if echo ""; echo ""; //echo ""; //echo ""; //echo ""; //echo ""; if($num==2){ // check µÑÇá»Ã $num ÇèÒà»ç¹¤ÍÅÑÁ·ÕèÊͧ ãËé»Ô´ á¶Ç echo ""; // »Ô´ á¶Ç $num=0; // ãËé $num à·èҡѺ 0 ¤×ÍàÃÔèÁ¹Ñº ¤ÍÅÑÁ à»ç¹ 0 }//»Ô´ if } echo "
"; $num++; // à¾ÔèÁµÑÇá»Ã $num if($num==1){ // check µÑÇá»Ã $num echo "
"; // ¢Ö鹤ÍÅÑÁãËÁè if($imgfile !="" ){ echo ""; } echo " $nnome
$testo_home
"; /////////////////////////////////////////////////////////////////////////////////////////////////////////// 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 " "; $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"); 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
\n"; //echo "
  $nnome
$testo_home
\n"; echo ""; echo ""; echo ""; } echo "
  "; echo "$nnome [".printdate($data)."]
"; echo "
\n"; } echo "

\n"; ?>