织梦标签dede:list中增加noflag属性的方法支持5.7版本(2)

相关案例演示

$typeid2Clike = ” ‘%,{$this->CrossID},%’ “;

$this->addSql .= ” AND ( arc.typeid IN({$this->CrossID},{$this->TypeID}) OR CONCAT(‘,’, arc.typeid2, ‘,’) LIKE $typeid2like OR CONCAT(‘,’, arc.typeid2, ‘,’) LIKE $typeid2Clike)”;

} else {

$this->addSql .= ” AND ( arc.typeid IN({$this->CrossID},{$this->TypeID}) OR CONCAT(‘,’, arc.typeid2, ‘,’) LIKE $typeid2like)”;

}

}

}

}

else

{

$sonids = GetSonIds($this->TypeID,$this->Fields[‘channeltype’]);

if(!preg_match(“/,/”, $sonids)) {

$sonidsCon = ” arc.typeid = ‘$sonids’ “;

}

else {

$sonidsCon = ” arc.typeid IN($sonids) “;

}

if($cfg_need_typeid2==’N’)

{

if($this->CrossID==”) $this->addSql .= ” AND ( $sonidsCon ) “;

else $this->addSql .= ” AND ( arc.typeid IN ({$sonids},{$this->CrossID}) ) “;

}

else

{

if($this->CrossID==”)

{

$this->addSql .= ” AND ( $sonidsCon OR CONCAT(‘,’, arc.typeid2, ‘,’) like $typeid2like ) “;

} else {

if($cfg_cross_sectypeid == ‘Y’)

{

$typeid2Clike = ” ‘%,{$this->CrossID},%’ “;

$this->addSql .= ” AND ( arc.typeid IN ({$sonids},{$this->CrossID}) OR CONCAT(‘,’, arc.typeid2, ‘,’) LIKE $typeid2like OR CONCAT(‘,’, arc.typeid2, ‘,’) LIKE $typeid2Clike) “;

} else {

$this->addSql .= ” AND ( arc.typeid IN ({$sonids},{$this->CrossID}) OR CONCAT(‘,’, arc.typeid2, ‘,’) LIKE $typeid2like) “;

}

}

}

}

if($this->TotalResult==-1)

{

$cquery = “SELECT COUNT(*) AS dd FROM `dede_arctiny` arc WHERE “.$this->addSql;

$row = $this->dsql->GetOne($cquery);

if(is_array($row))

{

$this->TotalResult = $row[‘dd’];

}

else

{

$this->TotalResult = 0;

}

}</p><p>//初始化列表模板,并统计页面总数

$tempfile = $GLOBALS[‘cfg_basedir’].$GLOBALS[‘cfg_templets_dir’].”/”.$this->TypeLink->TypeInfos[‘templist’];

$tempfile = str_replace(“{tid}”, $this->TypeID, $tempfile);

$tempfile = str_replace(“{cid}”, $this->ChannelUnit->ChannelInfos[‘nid’], $tempfile);

if(!file_exists($tempfile))

{

$tempfile = $GLOBALS[‘cfg_basedir’].$GLOBALS[‘cfg_templets_dir’].”/”.$GLOBALS[‘cfg_df_style’].”/list_default.htm”;

}

if(!file_exists($tempfile)||!is_file($tempfile))

{

echo “模板文件不存在,无法解析文档!”;

exit();

}

$this->dtp->LoadTemplate($tempfile);

$ctag = $this->dtp->GetTag(“page”);

if(!is_object($ctag))

{

$ctag = $this->dtp->GetTag(“list”);

}

if(!is_object($ctag))

{

$this->PageSize = 20;

}

else

{

if($ctag->GetAtt(“pagesize”)!=””)

{

$this->PageSize = $ctag->GetAtt(“pagesize”);

}

else

{

$this->PageSize = 20;

}

}

$this->TotalPage = ceil($this->TotalResult/$this->PageSize);

}

function MakeHtml($startpage=1, $makepagesize=0, $isremote=0)

{

global $cfg_remote_site;

if(empty($startpage))

{

$startpage = 1;

}</p><p>//创建封面模板文件

if($this->TypeLink->TypeInfos[‘isdefault’]==-1)

{

echo ‘这个类目是动态类目!’;

return ‘../plus/list.php?tid=’.$this->TypeLink->TypeInfos[‘id’];

}</p><p>//单独页面

else if($this->TypeLink->TypeInfos[‘ispart’]>0)

{

$reurl = $this->MakePartTemplets();

return $reurl;

}</p><p>$this->CountRecord();

//初步给固定值的标记赋值

$this->ParseTempletsFirst();

$totalpage = ceil($this->TotalResult/$this->PageSize);

if($totalpage==0)

{

$totalpage = 1;

}

CreateDir(MfTypedir($this->Fields[‘typedir’]));

$murl = ”;

if($makepagesize > 0)

{

$endpage = $startpage+$makepagesize;

}

else

{

$endpage = ($totalpage+1);

}

if( $endpage >= $totalpage+1 )

{

$endpage = $totalpage+1;

}

if($endpage==1)

{

$endpage = 2;

}

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。


来源:网友投稿 关注: 时间:2020-02-25 08:27
首先声明,只要是我们的vip会员所有源码均可以免费下载,不做任何限制(了解更多)
☉本站的源码不会像其它下载站一样植入大量的广告。为了更好的用户体验以后坚持不打水印
☉本站只提供精品织梦源码,源码在于可用,不在多!!希望在这里找到你合适的。
☉本站提供的整站织梦程序,均带数据及演示地址。可以在任一源码详情页查看演示地址
☉本站所有资源(包括源码、模板、素材、特效等)仅供学习与参考,请勿用于商业用途。
☉如有其他问题,请加网站客服QQ进行交流。
相关织梦教程
QQ在线咨询