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

相关案例演示
}

function GetMakeFileRule($typeid,$wname,$typedir,$defaultname,$namerule2)

{

$typedir = MfTypedir($typedir);

if($wname==’index’)

{

return $typedir.’/’.$defaultname;

}

else

{

$namerule2 = str_replace(‘{tid}’,$typeid,$namerule2);

$namerule2 = str_replace(‘{typedir}’,$typedir,$namerule2);

return $namerule2;

}

}

function GetArcList($limitstart=0,$row=10,$col=1,$titlelen=30,$infolen=250,

$imgwidth=120,$imgheight=90,$listtype=”all”,$orderby=”default”,$innertext=””,$tablewidth=”100″,$ismake=1,$orderWay=’desc’,$noflag=”)

{

global $cfg_list_son,$cfg_digg_update;

$noflags = explode(‘,’, $noflag);

$noflagsql = ”;

for($i=0;$i<count($noflags);$i++)

{

$noflagsql .= “And arc.flag not like ‘%{$noflags[$i]}%’ “;

}

$typeid=$this->TypeID;

 

if($row==”) $row = 10;

if($limitstart==”) $limitstart = 0;

if($titlelen==”) $titlelen = 100;

if($infolen==”) $infolen = 250;

if($imgwidth==”) $imgwidth = 120;

if($imgheight==”) $imgheight = 120;

if($listtype==”) $listtype = ‘all’;

if($orderWay==”) $orderWay = ‘desc’;

 

if($orderby==”) {

$orderby=’default’;

}

else {

$orderby=strtolower($orderby);

}

 

$tablewidth = str_replace(‘%’,”,$tablewidth);

if($tablewidth==”) $tablewidth=100;

if($col==”) $col=1;

$colWidth = ceil(100/$col);

$tablewidth = $tablewidth.’%’;

$colWidth = $colWidth.’%’;

 

$innertext = trim($innertext);

if($innertext==”) {

$innertext = GetSysTemplets(‘list_fulllist.htm’);

}
//排序方式

$ordersql = ”;

if($orderby==”senddate” || $orderby==”id”) {

$ordersql=” ORDER BY arc.id $orderWay”;

}

else if($orderby==”hot” || $orderby==”click”) {

$ordersql = ” ORDER BY arc.click $orderWay”;

}

else if($orderby==”lastpost”) {

$ordersql = ” ORDER BY arc.lastpost $orderWay”;

}

else {

$ordersql=” ORDER BY arc.sortrank $orderWay”;

}
//获得附加表的相关信息

$addtable = $this->ChannelUnit->ChannelInfos[‘addtable’];

if($addtable!=””)

{

$addJoin = ” LEFT JOIN `$addtable` ON arc.id = “.$addtable.’.aid ‘;

$addField = ”;

$fields = explode(‘,’,$this->ChannelUnit->ChannelInfos[‘listfields’]);

foreach($fields as $k=>$v)

{

$nfields[$v] = $k;

}

if(is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields))

{

foreach($this->ChannelUnit->ChannelFields as $k=>$arr)

{

if(isset($nfields[$k]))

{

if(!empty($arr[‘rename’])) {

$addField .= ‘,’.$addtable.’.’.$k.’ as ‘.$arr[‘rename’];

}

else {

$addField .= ‘,’.$addtable.’.’.$k;

}

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


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