以下为引用的内容:
//上面已经定义的函数库... //表格的定义...... <center><FONT SIZE=5 FACE="'georgia',verdana,Arial,Lucida Sans,Gill Sans">$title "; if ($admin==1) { echo " Admin "; } echo " - News</font> </td></tr> "; $db=connect_db(); $db_name=db_name(); mysql_select_db($db_name,$db); if ($show_news_sub) { $show_news = $show_news_sub; } if (!ereg("([0-9]{".strlen($show_news)."})",$show_news)) { $show_news="ALL"; } if (strtoupper($show_news)=="ALL") { $sql="select date_format(n_date,'%m/%d/%Y') as n_date, date_format(n_date,'%H:%i') as n_time ,news , n_date as date from news order by date desc"; } else { $link="<a href=$REQUEST_URL?show_news_sub=ALL><FONT SIZE=-2 FACE="'georgia',verdana,Arial,Lucida Sans,Gill Sans">All news</font></a>"; $sql="select date_format(n_date,'%m/%d/%Y') as n_date, date_format(n_date,'%H:%i') as n_time , news , n_date as date from news order by n_date desc limit $show_news"; } $result=mysql_query($sql,$db); $num_rows=mysql_num_rows($result); if($num_rows!=0) { echo " "; while($myrow=mysql_fetch_array($result)) { $date=$myrow["n_date"]; $time=$myrow["n_time"]; $news=$myrow["news"]; $n_id=$myrow["n_id"]; if (strtoupper($show_date)=="Y" && strtoupper($show_time)=="Y") { $show=$date." ".$time; } else if (strtoupper($show_date)=="Y" && strtoupper($show_time)!="Y") { $show=$date; } if (strtoupper($show_date)!="Y" && strtoupper($show_time)=="Y") { $show=$time; } $cleannews=(nl2br($news)); <TD align=left><FONT SIZE=-2 FACE="'verdana',Arial,Lucida Sans,Gill Sans">$show<br>$cleannews</font</TD> "; } echo " "; } if ($admin==1) { echo "<center><a href=admin/index.php><FONT SIZE=-2 FACE="'verdana',Arial,Lucida Sans,Gill Sans">返回</font></a></center>"; } if ($link) { echo "<center><br><br>$link</center>"; }
|