帝国cms自定义专题列表调用当前专题下的信息及信息数量

统计记录:

select count(*) as total from [!db.pre!]enewszt

查询记录:

select ztid as id,ztname as title,ztimg as titlepic,ztpath as titleurl,addtime as newstime from [!db.pre!]enewszt order by ztid desc

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<4;$i++){
             if($ga[$i])
                {
                        $cc=$empire->fetch1("select * from phome_ecms_game where id='$ga[$i]'");
                        $nr.='<a href="'.$cc[titleurl].'" target="_blank" class="hover_a"><img src="'.$cc[titlepic].'" alt="'.$cc[title].'" /><span class="b_bj"></span></a>';
                                                
                }
        }
$num=$empire->gettotal("select count(*) as total from phome_enewsztinfo where ztid='$r[id]'");
$listtemp='<li >
<div class="hj_top">
<a href="/[!--titleurl--]/" target="_blank"><img src="[!--titlepic--]" alt="[!--title--]" /></a>
<div class="hj_hover">
<div class="hj_bj"></div>
<div class="hj_a">
'.$nr.'
<a href="/[!--titleurl--]/" target="_blank" class="na">更多</a>
</div>
</div>
</div>
<div class="hj_bt">
<p class="title"><a href="/[!--titleurl--]/" target="_blank">[!--title--]</a></p>
<p class="intro"><span>[!--newstime--]</span><span><em>'.$num.'</em>个手游</span><a href="/[!--titleurl--]/">查看</a></p>
</div>
</li>';

 

图片[1]-帝国cms自定义专题列表调用当前专题下的信息及信息数量-HostJL-VPS主机交流

© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容