最新公告
  • 欢迎您光临 我爱模板网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境! 立即加入钻石VIP
  • 帝国CMS内容页调用会员组ID 支持静态页生成

    正文概述 管理员   2025-09-07   5

    <?php

    require("class/connect.php");

    include("class/db_sql.php");

    include("config/config.php");

    include("data/dbcache/class.php");

    $link=db_connect();

    $empire=new mysqlquery();

    $classid=intval($_GET['classid']);

    $id=intval($_GET['id']);

    $muserid=(int)getcvar('mluserid');//用户id

    $musername=RepPostVar(getcvar('mlusername'));//用户名

    $mgroupid=(int)getcvar('mlgroupid');//会员组id

    $r=$empire->fetch1("select id,title from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where id='$id' and classid='$classid' limit 1");

     

    if($mgroupid == 1){?>

    document.write('会员等级不够');

    <?}

    if($mgroupid == 2){?>

    document.write('标题:<?=$r[title]?>');

    <?

    }else{?>

    document.write('请登录');

    <?php

    }

    db_close();

    $empire=null;

    ?>

     

    在/e/目录新建文件 show.php 存入以上代码

     

    模板里用 <script src="[!--news.url--]e/show.php?classid=[!--classid--]&id=[!--id--]"></script> 调用


    我爱模板网 » 帝国CMS内容页调用会员组ID 支持静态页生成

    发表评论

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

    联系作者
    script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?587cc1e5c052b5b0ce99533beff13c96"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();

    请选择支付方式

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