帝国cms自定义专题列表模板list.var中获取对应专题下的信息、信息数量及信息所属栏目名称

帝国cms自定义专题列表模板list.var中获取对应专题下的信息、信息数量及信息所属栏目名称

代码如下:

复制代码
$rr = $empire->fetch1("SELECT GROUP_CONCAT(id) from phome_enewsztinfo where ztid='$r[id]'");
$ff = $rr[0];
$ga = explode(",", $ff);
for ($i = 0; $i < 6; $i++) {
if ($ga[$i]) {
$cc = $empire->fetch1("select * from phome_ecms_app where id='$ga[$i]'");
 
// 查询phome_enewsclass表
$classInfo = $empire->fetch1("select * from phome_enewsclass where classid='$cc[classid]'");
$classname = $classInfo['classname'];
 
$nr .= '<li><a href="'.$cc[titleurl].'" target="_blank"><img src="'.$cc[titlepic].'" alt="'.$cc[title].'" /><p>'.$cc[title].'</p><span>'.$classname.'</span></a></li>';
}
}
$num = $empire->gettotal("select count(*) as total from phome_enewsztinfo where ztid='$r[id]'");
$listtemp = '<li>
<a href="/[!--titleurl--]/" target="_blank"><img src="[!--titlepic--]" alt="[!--title--]"/></a>
<div class="info">
<a href="/[!--titleurl--]/" target="_blank"><p class="name">[!--title--]</p><span>更新:[!--newstime--]</span></a>
<ul>
'.$nr.'
</ul>
</div>
<em><i class="ico"></i><a href="/[!--titleurl--]/" target="_blank">'.$num.'</a>款</em>
<div class="line"></div>
</li>';
相关推荐
m0_547486662 天前
《数据结构教程》全套 PPT课件2026
数据结构
tryxr2 天前
矩阵的几种基础变换
java·数据结构·算法·矩阵
mmmmath_32 天前
LeetCode.028.找出字符串中第一个匹配项的
数据结构·算法·leetcode
All for pursuit.2 天前
【栈-4】739.每日温度
数据结构·c++·算法·leetcode
All for pursuit.2 天前
【栈-5】84.柱状图中最大的矩形
数据结构·c++·算法·leetcode
渡我白衣2 天前
HttpRequest与HttpResponse的实现
服务器·数据结构·c++·人工智能·tcp/ip·机器学习·caffe
晴天的雨.9922 天前
【C++算法】和为s的两个数
开发语言·数据结构·c++·算法
淡海水3 天前
13-04-面试-源码级深度追问链
数据结构·unity·面试·c#·游戏引擎·源码·il2cpp
Logic1013 天前
C语言/数据结构位运算题解:异或XOR找出时尚聚会中的“独特颜色“——只出现一次的数字
c语言·数据结构·数组·位运算·时间复杂度·算法题·异或性质
2401_839080543 天前
C++常见八股
数据结构·c++·算法