$link=mysql_connect("","","")
or die("无法连接到mysql数据库".mysql_error());
mysql_select_db("duyounet",$link);
mysql_query("SET NAMES 'gb2312'",$link);
$day30=time()-60*60*24*30;
$result=mysql_query("select articleid,articlename, (allvote*20+goodnum+allvisit) as dxy_px from jieqi_article_article where postdate>$day30 order by dxy_px desc limit 0,14") or die("查询".$database."数据库出错".mysql_error());
$row=mysql_fetch_row($result);
echo "document.writeln(\"
\")".";\r\n";
while ($row){
echo "document.writeln(\"- ".$row[1]."(".$row[2].")
\");\r\n";
$row=mysql_fetch_row($result);
}
mysql_free_result($result);
mysql_close();
echo "document.writeln(\"
\");\r\n"
?>