FreeID = $fid; $this->TypeLink = new TypeLink(0); $this->dsql = $dsql; $this->maintable = '#@__archives'; $this->TempletsFile = ''; $this->FLInfos = $this->dsql->GetOne("SELECT * FROM `#@__freelist` WHERE aid='$fid' "); $liststr = $this->FLInfos['listtag']; $this->FLInfos['maxpage'] = (empty($this->FLInfos['maxpage']) ? 100 : $this->FLInfos['maxpage']); //载入数据里保存的列表属性信息 $ndtp = new DedeTagParse(); $ndtp->SetNameSpace("dede", "{", "}"); $ndtp->LoadString($liststr); $this->ListObj = $ndtp->GetTag('list'); $this->pagesize = $this->ListObj->GetAtt('pagesize'); if (empty($this->pagesize)) { $this->pagesize = 30; } $channelid = $this->ListObj->GetAtt('channel'); /* if(empty($channelid)) { showmsg('必须指定频道','-1');exit(); } else { $channelid = intval($channelid); $channelinfo = $this->dsql->getone("select maintable from #@__channeltype where id='$channelid'"); $this->maintable = $channelinfo['maintable']; } */ $channelid = intval($channelid); $this->maintable = '#@__archives'; //全局模板解析器 $this->dtp = new DedeTagParse(); $this->dtp->SetNameSpace("dede", "{", "}"); $this->dtp->SetRefObj($this); //设置一些全局参数的值 $this->Fields['aid'] = $this->FLInfos['aid']; $this->Fields['title'] = $this->FLInfos['title']; $this->Fields['position'] = "
\r\n";
}
if ($row = $this->dsql->GetArray("al")) {
$GLOBALS['autoindex']++;
//处理一些特殊字段
$row['id'] = $row['id'];
$row['arcurl'] = $this->GetArcUrl(
$row['id'],
$row['typeid'],
$row['senddate'],
$row['title'],
$row['ismake'],
$row['arcrank'],
$row['namerule'],
$row['typedir'],
$row['money'],
$row['filename'],
$row['moresite'],
$row['siteurl'],
$row['sitepath']
);
$row['typeurl'] = GetTypeUrl(
$row['typeid'],
$row['typedir'],
$row['isdefault'],
$row['defaultname'],
$row['ispart'],
$row['namerule2'],
$row['siteurl'],
$row['sitepath']
);
if ($ismake == 0 && $GLOBALS['cfg_multi_site'] == 'Y') {
if ($row["siteurl"] == "") {
$row["siteurl"] = $GLOBALS['cfg_mainsite'];
}
}
$row['description'] = cn_substr($row['description'], $infolen);
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/defaultpic.jpg';
}
if (!preg_match("#^http:\/\/#i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
}
$row['picname'] = $row['litpic'];
$row['info'] = $row['description'];
$row['filename'] = $row['arcurl'];
$row['stime'] = GetDateMK($row['pubdate']);
$row['textlink'] = "".$row['title']."";
$row['typelink'] = "[".$row['typename']."]";
$row['imglink'] = " | \r\n";
}
} //Loop Col
if ($col > 1) {
$i += $col - 1;
}
if ($col > 1) {
$artlist .= "