<?php

/**
 * 最新文章; 
 */
$a = intval($a);
$b = intval($b);
$key = 'subject_new_' . $a;
if (cache_exists($key))
{
    $arr = $cache[$key];
} else
{
    $arr = array();
    $rs = $db->query('select * from (' . PF . 'article as article left join ' . PF .
        'posts as post on article.menu_id=' . $a .
        ' && article.post_id=post.id) left join ' . PF .
        'user as user on post.authorid=user.id where menu_id="' . $a .
        '" order by post.post_time desc LIMIT 0,' . $b);
    while ($row = $db->fetch_array($rs))
    {
        $arr[$row['post_id']] = array('title' => htmlxlang(unserialize($row['title'])),
            'post_time' => $row['post_time'], );
    }
    set_cache($key, $arr, 20);
}
if (empty($arr))
    return;
echo '<h4 class="title-03"><a href="' . url(RPG . 'article/' . $a . '/') . '">' .
    htmlxlang($conf['sys_menus'][$a]['name']) . '</a></h4>
      <div class="in">
      <ul class="title-03-ul">';
foreach ($arr as $k => $v)
{
    echo '<li><span>', showtime($v['post_time'], 2), '</span><a href="' . url(RPG .
        'article/show/' . $a . '/' . $k . '/') . '">', $v['title'], '</a></li>';
}
echo '</ul>
      </div>';

?>