帝国列表调用其他栏目包含这个信息id的调用

帝国列表调用其他栏目包含这个信息id的调用

$chapter_sql = "select * from {$dbtbpre}ecms_zhangjie where  bookid='".$r[id]."' order by newstime desc limit 6";

$chapter_result = $empire->query($chapter_sql);

$chapter_html = '';

while($chapter_r = $empire->fetch($chapter_result)){

    $chapter_titleurl = sys_ReturnBqTitleLink($chapter_r);

    $chapter_html .= '

    <div class="chapter-item">

<a href="'.$chapter_titleurl.'">

        <img src="'.$chapter_r[titlepic].'" alt="'.$chapter_r[title].'" class="chapter-img"></a>

        <a href="'.$chapter_titleurl.'" class="chapter-link">'.$chapter_r[title].'</a>

    </div>

    ';

}




$listtemp = '

<div class="container1">

    <!-- 左侧漫画介绍 -->

        <div class="comic-info">

<a href="[!--titleurl--]">

            <img src="[!--titlepic--]" alt="[!--title--]" class="comic-cover">

</a>

        </div>




    <!-- 右侧章节列表(无背景查看更多按钮) -->

    <div class="chapter-list">

        <div class="chapter-header">

            <h2>最新章节</h2>

            <!-- 保留button标签,保持点击功能,样式改为无背景文字链接 -->

            <a href="[!--titleurl--]">

                <button class="more-btn">查看更多</button>

            </a>

        </div>

        

        <div class="chapter-grid">

            '.$chapter_html.'

        </div>

    </div>

</div>

';

灵动标签方式:

[e:loop={'news',1,18,0,'','newstime DESC'}]

<div class="fullwidth-wrapper">

    <div class="mod6-dark">

        <div class="mod6-19">

            <div class="mod6-left">

                <div class="rec-title">重磅推荐</div>

                <div class="top1-cover">

                    <img src="<?=$bqr['titlepic']?>" alt="top1">

                    <div class="top1-info">

                        <span class="top1-tag">TOP1</span>

                        <span class="top1-name"><?=$bqr['title']?></span>

                        <span class="top1-date"><?=date('Y-m-d',$bqr[newstime])?></span>

                    </div>

                </div>

                <div class="desc"><?=$bqr['smalltext']?></div>

            </div>

            <div class="mod6-right">

                <?php

                // 核心查询:保留你的原始逻辑

                $cur_bookid = $bqr['id'];

                $chapter_sql = "select * from {$dbtbpre}ecms_zhangjie where bookid='".$cur_bookid."' order by newstime desc limit 6";

                $chapter_result = $empire->query($chapter_sql);

                while($chapter_r = $empire->fetch($chapter_result)){

                    $chapter_titleurl = sys_ReturnBqTitleLink($chapter_r);

                    $chapter_date = date('m-d', $chapter_r['newstime']);

                ?>







<div class="episode-card"><img src="<?=$chapter_r['titlepic']?>"><div class="episode-text"><span class="episode-title">第<?=$chapter_r['ftitle']?>话</span><span class="episode-date"><?=$chapter_date?></span></div></div>

                <?php } ?>

            </div>

        </div>

    </div>

</div>

[/e:loop]

给TA打赏
共{{data.count}}人
人已打赏
帝国CMS教程建站经验

新手做网站选择自适应还是分开做电脑端+手机端好呢?

2025-11-18 19:18:18

帝国CMS教程

帝国cms当点击量超过一万的时候换成万为单位同时保留两位数的方法

2026-3-2 21:12:23

【腾讯云】11.11云上盛惠!云服务器首年1.8折起,买1年送3个月!
11.11云上盛惠!海量产品·轻松上云!云服务器首年1.8折起,买1年送3个月!超值优惠,性能稳定,让您的云端之旅更加畅享。
查看更多相关信息>>
站长

(工作日 10:00 - 22:30 为您服务)

2026-03-24 03:15:01

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

猜你想问:

  • 购买的模板免费包安装吗?

  • 这个演示地址有吗?

  • 购买vip会员可以下载哪些模板?

您的留言我们已经收到,我们将会尽快跟您联系!
取消
立即选择任一渠道联系我们