<!--<?php print <<<EOT
-->
<div align="center"><a href="./"><img src="img/fo2.jpg" alt="免费网络烧香拜佛" width="980" height="125" /></a></div>
<!--
EOT;
if($n_lists != ''){
print <<<EOT
-->
<table width="980" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
  <tbody>
<!--
EOT;
$rnd = rand();
$txtorderby = "ORDER BY RAND(NOW()+$rnd)";
$intjilu = 10;

$iii = 3;
foreach($n_lists as $nl){
$iii++;
if($iii%4==0){
print <<<EOT
-->
  <tr>
<!--
EOT;
}print <<<EOT
-->
	<td width="245" style="padding-bottom:5px;padding-left:2px;padding-right:2px;">
<!--
EOT;
$topnews = ng_query("SELECT $sql_tbl[newsletter].newsid, $sql_tbl[newsletter].subject, $sql_tbl[newsletter].titleb, $sql_tbl[newsletter].titlecolor FROM $sql_tbl[newsletter] where $sql_tbl[newsletter].avail = 'Y' and $sql_tbl[newsletter].listid = $nl[listid] $txtorderby LIMIT $intjilu");
print <<<EOT
-->
<table width="100%" border="0" class="biaoge" cellspacing="0" cellpadding="0">
  <tbody>
  <tr>
    <td class="biaoge_biaotise"><a href="news.php?lid=$nl[listid]">$nl[name]</a></td>
	<td class="biaoge-gengduo"><a href="news.php?lid=$nl[listid]">更多...</a></td>
  </tr>
<!--
EOT;
foreach($topnews as $nl){

$nl[subject] = msubstr($nl[subject],0,32);
$titleb = ($nl[titleb] == 'Y')?'<b>':'';
$titlebend = ($nl[titleb] == 'Y')?'</b>':'';
$titlefont = ($nl[titlecolor] != '' && $nl[titlecolor] != '000000')?"<font color='$nl[titlecolor]'>":"";
$titlefontend = ($nl[titlecolor] != '' && $nl[titlecolor] != '000000')?"</font>":"";

$txtsubject = $titlefont.$titleb.$nl[subject].$titlebend.$titlefontend;
print <<<EOT
-->
  <tr>
    <td class="biaoge_td" colspan="2"><img src="$temp_img/leftarrow.gif" width="9" height="9" border="0"><a href="news.php?nid=$nl[newsid]" target="_blank">$txtsubject</a></td>
  </tr>
<!--
EOT;
}print <<<EOT
-->
  </tbody>
</table> 

	</td>
<!--
EOT;
if($iii%(4+$iii)==0){
print <<<EOT
-->
  </tr>
<!--
EOT;
}}print <<<EOT
-->
  </tbody>
</table>
<!--
EOT;
}else{
print <<<EOT
-->
<table width="100%" border="0" class="biaoge" cellspacing="0" cellpadding="0">
  <tbody>
  <tr>
    <td class="biaoge_biaoti">暂无学堂</td>
  </tr>
  <tr>
    <td class="biaoge_td">暂无学堂</td>
  </tr>
  </tbody>
</table>
<!--
EOT;
}?>-->