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/defaultpic.gif'; } 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'] = ""; $row['image'] = ""; $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; $row['memberurl'] = $GLOBALS['cfg_memberurl']; $row['templeturl'] = $GLOBALS['cfg_templeturl']; $row['title'] = cn_substr($row['title'],$titlelen); if($row['color']!="") { $row['title'] = "".$row['title'].""; } if(preg_match("#c#", $row['flag'])) { $row['title'] = "".$row['title'].""; } //编译附加表里的数据 if(is_object($this->ChannelUnit)) { foreach($row as $k=>$v) { if(preg_match("#[A-Z]#", $k)) { $row[strtolower($k)] = $v; } } foreach($this->ChannelUnit->ChannelFields as $k=>$arr) { if(isset($row[$k])) { $row[$k] = $this->ChannelUnit->MakeField($k,$row[$k]); } } } //解析单条记录 if(is_array($indtp->CTags)) { foreach($indtp->CTags as $k=>$ctag) { $_f = $ctag->GetName(); if($_f=='array') { //传递整个数组,在runphp模式中有特殊作用 $indtp->Assign($k,$row); } else { if(isset($row[$_f])) { $indtp->Assign($k,$row[$_f]); } else { $indtp->Assign($k,""); } } } } $artlist .= $indtp->GetResult(); }//if hasRow else { $artlist .= ""; } if($col>1) { $artlist .= " | \r\n"; } }//Loop Col if($col>1){ $i += $col - 1; } if($col>1) { $artlist .= "