在 e:loop 标签中 调用方法为:?=$bqr[ftitle]?
创新互联于2013年成立,是专业互联网技术服务公司,拥有项目网站设计制作、成都网站制作网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元江北做网站,已为上家服务,为江北各地企业和个人服务,联系电话:13518219792
帝国CMS副标题直接使用 [!--ftitle--]
经测试,在我的帝国6.0里用第一段调用没有问题,你检查下你要调用的文章是否是新闻模型,且确实有正文内容?
1.标签上面的“操作类型”参数要设为24,然后“栏目id”为SQL语句
2.需要开启支持按SQL语句调用:打开e/class/connect.php文件(粗体文字的设置)
//部分参数设置
$do_theloginlog=0;
//是否记录登陆日志(0为记录,1为不记录)
$do_thedolog=0;
//是否记录操作日志(0为记录,1为不记录)
$do_openbqquery=0;
//开启标签支持sql语句查询(0为不支持,1为开启)
$do_openreadfile=0;
//开启读取页面标签支持读取服务器本地文件,为了安全,一般情况请不要开启(0为不支持,1为开启)
$do_txtpath="../../d/txt/";//文本型数据存放目录
?
3.调用例子,以ecmsinfo为例:
[ecmsinfo]"select
*
from
phome_ecms_news
where
classid=1
order
by
id
desc
limit
10",10,30,0,24,1,0[/ecmsinfo]
注:显示栏目id为1的10条新闻表记录。
本来不想回答
去年做过项目4表联合
拿去自己改吧
不会改就没办法
不解释
[e:loop={'select *
from
(
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news where istop=1 order by newstime desc limit 13 )
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news1 where istop=1 order by newstime desc limit 13)
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news2 where istop=1 order by newstime desc limit 13)
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news3 where istop=1 order by newstime desc limit 13)
) as A order by newstime desc limit 20',0,24,0}]
?php
$fb=$empire-fetch1("select *
from
(
(select id,classid,smalltext from phome_ecms_news_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news1_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news2_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news3_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
) as A");
?
li class="clearfix"
a target='_blank' href="?=$bqr[titleurl]?" title="?=$bqr[title]?" class="index-img"img src="?=$bqr[titlepic]?$bqr[titlepic]:'404.jpg'?" alt="?=$bqr[title]?"/a
div class="index-text"
h1a target='_blank' href="?=$bqr[titleurl]?"?=$bqr[title]?/a
/h1
div class="index-con"/div
div class="index-intro"a target="_blank" href="?=$bqr[titleurl]??from=index_new_intro"?=$fb[smalltext]?/a/div
div class="index-like clearfix"
span class="time"
?php
$fr=$empire-fetch1("select *
from
(
(select id,classid,infotags from phome_ecms_news_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news1_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news2_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news3_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
) as A");
$keyr=explode(',',$fr[infotags]);
for($i=0;$i2;$i++)
{
echo'spana href="/liaotian/tags-'.$keyr[$i].'-0.html" target=_blank'.$keyr[$i].'/a/span ';
}
?
/span
span class="time"?=format_datetime($bqr[newstime],"m-d")?/span
div class="post-ope"
a href="/e/public/digg/?classid=?=$bqr[classid]?id=?=$bqr[id]?dotop=1ajaxarea=diggnum?=$bqr[id]?" class="post-like-btn post-like" id="post-like-top-btn"
script
document.write('script src="/e/public/ViewClick/?classid=?=$bqr[classid]?id=?=$bqr[id]?down=5?t='+Math.random()+'"'+'/script');
/script
/a
/div
/div
/div
/li
[/e:loop]
功能:联合取4表数据
关联取附表简介
并取标签
附加顶功能
动态浏览量等