//最新话题
$query2 = $_SGLOBAL['db']->query("SELECT tid,subject,uid,username FROM ".tname('thread')." WHERE tagid='$value[tagid]' ORDER BY dateline DESC LIMIT 0,20");
while ($thread = $_SGLOBAL['db']->fetch_array($query2)) {
$threadlist[$value['tagid']][] = $thread;
}
}