<table width="100%" border="0" cellspacing="1" cellpadding="3">
[e:loop={栏目ID/专题ID,显示条数,操作类型,只显示有标题图片,'firsttitle=1 or isgood=1','firsttitle desc,newstime desc'}]
<tr><td>
<a href="=$bqsr[titleurl]?>" target="_blank" title="=$bqr[title]?>">=esub($bqr[title],32)?>a>
(=format_datetime($bqr[newstime],'Y-m-d')?>)
=esub($bqr[smalltext],50)?>
td>tr>
[/e:loop]
table>
$bqno
:为调用序号
$bqsr[titleurl]
:标题链接
$bqsr[classname]
:栏目名称
$bqsr[classurl]
:栏目链接$public_r[newsurl]:网站地址
$bqr[字段名]
:显示字段的内容
[!--news.url--]kyrw/
=sys_ReturnBqClassname($class_r[栏目ID],9)?>
=$class_r[栏目ID][classname]?>
$classid=$GLOBALS['navclassid'];
$fr=explode('|',$class_r[$classid][featherclass]);
$topbclassid=$fr[1]?$fr[1]:$classid;//取得第一级栏目id
$topbclassname=$class_r[$topbclassid][classname];//第一级栏目名称
$cr[classid]=$topbclassid;
$topbclassurl=sys_ReturnBqClassname($cr,9); //第一级栏目链接
=$class_r[$GLOBALS[navclassid]][classname]?>
<table width="100%" border="0" cellspacing="3" cellpadding="1">
<tr>
[e:loop={'news',4,18,1,'isgood=2 AND firsttitle=1','onclick desc'}]
<td width="25%" height="92">
<div align="center"><a href="=$bqsr[titleurl]?>" title="=$bqr[title]?>" target="_blank">
<img src="=$bqr[titlepic]?>" width="135" height="90" border="0">a>div>
td>
[/e:loop]
tr>
table>
使用程序代码
$fr=$empire->fetch1("select newstext from ".$dbtbpre."ecms_news_data_{$r[stb]} where id='$r[id]'");
$listtemp='[!--title--]
'.$fr[newstext];
<ul class="links_text">
[e:loop={'select * from [!db.pre!]enewslink where checked=1 and lpic="" order by lid',20,24,0}]
<li><a href="=$bqr[lurl]?>">=$bqr[lname]?>a>li>
[/e:loop]
ul>
<ul>
<li><a href="/" title="首页" target="_self">首 页a>li>
[e:loop={'select classid,classname,classpath from [!db.pre!]enewsclass order by classid',0,24,0}]
<li class="" id="cid=$bqr[classid]?>"><a href="=$public_r[newsurl]?>=$bqr[classpath]?>" title="=$bqr[classname]?>" target="_self" >=$bqr[classname]?>a>li>
[/e:loop]
<li class="posr"><a href="/top" title="排行榜" target="_self">排行榜a>li>
ul>
$pics = explode(PHP_EOL,$navinfor[morepic]);
foreach($pics as $pic){
$p = explode("::::::", $pic);
?>
<div class="swiper-slide" style="background:url(=$p[1]?>) no-repeat center center;">div>
} ?>
<ul>
[e:loop={栏目ID,显示条数,操作类型,只显示有标题图片}]
$newimg="";
if(date("m-d",$bqr[truetime])==date("m-d"))
{
$newimg="";
}
?>
<li>
<a href="=$bqsr[titleurl]?>" target="_blank">=sub($bqr[title],0,10,false)?>a>=$newimg?>
li>
[/e:loop]
ul>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
[e:loop={"select tid,subject from cdb_threads order by tid desc limit 10",10,24,0}]
<tr><td>
<a href="/bbs/viewthread.php?tid==$bqr[tid]?>" target="_blank">=$bqr[subject]?>a>
td>tr>
[/e:loop]
table>
<ul>
[e:loop={'select userid as userid,truename as title,userpic as titlepic from [!db.pre!]enewsmemberadd order by userid desc limit 8',10,24,0}]
<li><a href="/e/space/?userid==$bqr[userid]?>" target="_blank"><img src="=$bqr[titlepic]?>" alt='=$bqr[title]?>' width="52" height="52" />=$bqr[title]?>a>li>
[/e:loop]
ul>
[e:loop={'select * from [!db.pre!]ecms_news where checked=1 order by diggtop desc,id desc limit 8',10,24,0}]
<li><a href="=$bqsr[titleurl]?>">=sub($bqr[title],0,30,false)?>]a><span><small>点击:small>=$bqr[onclick]?>span> <span><small>顶:small>=$bqr[diggtop]?>span>li>
[/e:loop]
[e:loop={'select * from [!db.pre!]ecms_news where checked=1 order by plnum desc,id desc limit 8',10,24,0}]
<li> <small><a href="=$bqsr[titleurl]?>" class="title">=sub($bqr[title],0,30,false)?>a>small>
<p>=$bqr[smalltext]?>p>
li>
[/e:loop]
[e:loop={'select classid,classname,classpath,wburl from [!db.pre!]enewsclass where bclassid=0 and showclass=0 order by myorder',0,24,0}]
"=$bqr[wburl]?$bqr[wburl]:$public_r[newsurl].$bqr[classpath]?>" title="=$bqr[classname]?>" target="_self">=$bqr[classname]?>
[/e:loop]
[e:loop={"select intro from [!db.pre!]enewsclass where classid='$GLOBALS[navclassid]'",1,24,0}]
=$bqr[intro]?>
[/e:loop]
function siteMap($bclassid=0){
global $class_r, $public_r;
foreach($class_r as $class){
if($class['bclassid'] == $bclassid) {
$classurl = $public_r[newsurl].$class[classpath];
echo "{$class['classname']}" ;
if($class['islast'] == 0) {
echo ""
;
siteMap($class['classid']);
echo "";
}
echo '';
}
}
}
echo ""
;
siteMap();
echo "";
当前内容ID $navinfor[id]
当前栏目ID $navinfor[classid]
当前栏目ID $GLOBALS['navclassid']
当前父栏目ID $class_r[$cid]['bclassid']
栏目路径 $class_r[栏目ID]['classpath']
当前终极栏目值 $class_r[$cid][islast]
网站名称 $public_r[sitename]
网站根目录 $public_r[newsurl]
一级栏目 $public_r[classnavs]
内页数据表字段 $navinfor[字段名]
栏目链接 sys_ReturnBqClassname($r,9)
取标题链接 sys_ReturnBqTitleLink($r)
取得IP地址 egetip()
取得当前地址 eReturnSelfPage(0)
文件扩展名 GetFiletype($file)
收藏夹 加入收藏
错误举报 错误举报
风格ID getcvar('loginadminstyleid',1)
密码加密 getcvar('loginecmsckpass',1)
组ID getcvar('loginlevel',1)
认证码加密 getcvar('loginrnd',1)
用户ID getcvar('loginuserid',1)
用户名 getcvar('loginusername',1)
登陆时间UNIX时间戳 getcvar('logintime',1)
会员组ID getcvar('mlgroupid');
认证码加密 getcvar('mlrnd');
会员ID getcvar('mluserid');
会员用户名 getcvar('mlusername');
采集字段模板 e/data/html/cjhtml.txt
前台字段表单模板 e/data/html/qfhtml.txt
后台字段表单模板 e/data/html/sysfhtml.txt
栏目字段表单模板 e/data/html/classfhtml.txt
会员字段表单模板 e/data/html/memberfhtml.txt
留言板模板 e/data/template/gbooktemp.txt
下载页面模板 e/data/template/downpagetemp.php
评论列表模板 e/data/template/pltemp.txt
评论JS调用模板 e/data/template/pljstemp.txt
后台列表模板 e/data/html/list/listinfo.php
后台全部信息列表模板 e/data/html/list/alllistinfo.php
前台会员管理信息列表模板 e/data/html/list/qlistinfo.php
栏目副标题=$class_r[$GLOBALS[navclassid]][bname]?>
echo $GLOBALS[navclassid] ? '是首页' : '不是首页';
list.var支持程序代码
直接添加PHP代码,不需要加
if(empty($r[titlepic]))
{
$r[titlepic]='/images/img.gif';
}
$listtemp='<li><a href="[!--titleurl--]"><img src="[!--titlepic--]">a>li>';
例子2:如果信息是今天发布的就显示“NEW”图片标识。
$newimg='';
if(time()-$r[newstime]<=1*24*3600)
{
$newimg='';
}
$listtemp='[!--title--] ' .$newimg.'';
例子3:调用投稿用户的公司名称。
$userr=$empire->fetch1("select company from {$dbtbpre}enewsmemberadd where userid='$r[userid]' limit 1");
$listtemp='[!--title--] 公司名称:'.$userr[company].' ';
其他说明:
如果$listtemp引用模板内容是用单引号,那么里面使用单引号前面要加\,例如:$listtemp='';
相反如果引用模板内容是用双引号,那么里面使用双引号前面也要加\,例如:$listtemp="";
[e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','id desc'}]
<a href="">上一篇: =esub($bqr[title],30)?>a>
[/e:loop]
上一篇:很抱歉没有了";}?>
[e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}]
<a href="">下一篇:=esub($bqr[title],30)?>a>
[/e:loop]
下一篇:很抱歉没有了";} ?>
[e:loop={"select classtext from [!db.pre!]enewsclassadd where classid='$GLOBALS[navclassid]'",1,24,0}]
=$bqr[classtext]?>
[/e:loop]