function listtag($aid)
{
$tsql = new DedeSql(false);
$tags = '';
$tsql->SetQuery("Select i.tag From dede_taglist t left join dede_tagindex i on i.id=t.tid where t.aid='$aid'");
$tsql->Execute('t');
while($row = $tsql->GetArray('t',MYSQL_ASSOC)){
$tags .= "<a href='/tags.php?/".urlencode($row['tag'])."/'>".$row['tag']."</a> ";
}
return $tags;
}