最新公告
  • 欢迎您光临站长源码网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境!立即加入钻石VIP
  • 帝国cms截取当前文章标题匹配相关链接

    正文概述 管理员   2024-09-02   145
    <?php $v= mb_substr($navinfor[title],0,5,'UTF-8'); $id=$navinfor[id];?>
    

    <?php
    $ecms_bq_sql = sys_ReturnEcmsLoopBq("select * from phome_ecms_article where (title like '%$v%') and id<>$id order by newstime desc limit 8", 10, 24, 0);
    $bqno = 0;
    $hasOutput = false; 
    while($bqr = $empire->fetch($ecms_bq_sql))
    {
        $bqsr = sys_ReturnEcmsLoopStext($bqr);
        $bqno++;
        if(empty($bqr['title']) && $hasOutput) { 
            continue;
        }
        ?>
        <li>
            <a href="<?=$bqr['titleurl']?>" target="_blank" title="<?=$bqr['title']?>">
                <img src="<?=$bqr[titlepic]?$bqr[titlepic]:'/e/data/images/notimg.gif'?>" alt="<?=$bqr['title']?>">
                <p><?=$bqr['title']?></p>
            </a>
        </li>
        <?php
        if(!empty($bqr['title'])) {
            $hasOutput = true; 
        }
    }
    ?>
    
    <?php
    if(!$hasOutput) { 
        $ecms_bq_sql = sys_ReturnEcmsLoopBq("select * from phome_ecms_article where id<>$id order by newstime desc limit 8", 10, 24, 0);
        $bqno = 0;
        while($bqr = $empire->fetch($ecms_bq_sql))
        {
            $bqsr = sys_ReturnEcmsLoopStext($bqr);
            $bqno++;
            ?>
            <li>
                <a href="<?=$bqr['titleurl']?>" target="_blank" title="<?=$bqr['title']?>">
                    <img src="<?=$bqr[titlepic]?$bqr[titlepic]:'/e/data/images/notimg.gif'?>" alt="<?=$bqr['title']?>">
                    <p><?=$bqr['title']?></p>
                </a>
            </li>
            <?php
        }
    }
    ?>
    


    站长源码网 » 帝国cms截取当前文章标题匹配相关链接

    发表评论

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者

    请选择支付方式

    ×
    支付宝支付
    微信支付
    余额支付
    ×
    微信扫码支付 0 元