帝国cms灵动标签调用所有信息的具体方法
方式一、 帝国cms用灵动标签常用灵动标签:
[e:loop={"select * from [!db.pre!]ecms_news order by id desc",0,24,0}]
<li><span><?=date('Y-m-d',$bqr[newstime])?></span><a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a></a></li>
[/e:loop]
帝国cms(默认)系统模型
序号 模型名称
1 新闻系统数据表 ( phome_ecms_news )
2 下载系统数据表 ( phome_ecms_download )
3 图片系统数据表 ( phome_ecms_photo )
4 FLASH系统数据表 ( phome_ecms_flash )
5 电影系统数据表 ( phome_ecms_movie )
6 商城系统数据表 ( phome_ecms_shop )
7 文章系统数据表 ( phome_ecms_article )
8 分类信息数据表 ( phome_ecms_info )
方式二、帝国cms用灵动标签循环文章正文(有几个模型就写上几个)
[e:loop={"select * from [!db.pre!]ecms_news order by id desc",0,24,0}]
<li><span><?=date('Y-m-d',$bqr[newstime])?></span><a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a></a></li>
[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_photo order by id desc",0,24,0}]
<li><span><?=date('Y-m-d',$bqr[newstime])?></span><a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a></a></li>
[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_article order by id desc",0,24,0}]
<li><span><?=date('Y-m-d',$bqr[newstime])?></span><a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a></a></li>
[/e:loop]
方式三、帝国cms用灵动标签调用全站所有数据表最新信息的方法
[e:loop={'select * from (
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_book where newstime union
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_course where newstime union
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_soft where newstime union
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_game where newstime union
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_js where newstime union
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_templet where newstime union
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_mv where newstime union
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_news where newstime) a order by newstime desc limit 7',7,24,0}]
<li><b><?=$bqno?></b><div><a href="<?=$bqsr[classurl]?>" target="_blank">[<?=$bqsr[classname]?>]</a></div><a href="<?=$bqsr['titleurl']?>" class="gxone" target="_blank"><?=$bqr['title']?></a></li>
[/e:loop]