<div id="latest_article">
<h2>最新文章</h2>
<div>
<?php
$result = db_query_range("SELECT n.nid, n.title FROM {node} n WHERE n.type = 'story' ORDER BY n.created DESC", 8);
$i = 0;
$content='<ul>';
while ($test = db_fetch_object($result)) {
$content.='<li>'.l($test->title,'node/'.$test->nid).'</li>';
$i++;
};
$content.='</ul>';
if(!$i ){
echo '没有文章';
}
echo $content;
?>
</div>
</div><!--/最新文章-->