{dede:FIELD.aid runphp='yes'}
$aid = @me;
$sql = "select * from dede_archives where id =".$aid." limit 1";
$query = mysql_query($sql);
$row = mysql_fetch_array($query);
$typeid = $row["typeid"];
$sql = "SELECT * FROM dede_archives where id<>".$aid." and typeid =".$typeid." order by id desc limit 15";
$query = mysql_query($sql);
@me = "";
while($row = mysql_fetch_array($query)){
$id = $row["id"];
$title = cn_substr($row["title"],80,0);
$urlarray = GetOneArchive($id);
$url = $urlarray['arcurl'];
$time = strftime("%Y-%m-%d",$row["sortrank"]);
@me.= '<li><a href="'.$url.'" title="'.$title.'" target="_blank">'.$title.'</a><span>'.$time.'</span></li>';
}
{/dede:FIELD.aid}
|