织梦cms未审核的文章如何实现仅发布者可见

635 ℃

织梦cms未审核的文章如何实现仅发布者可见,接下来我们来一起研究一下。修改文件:./plus/view.php。
头部添加:

require_once(DEDEINC.'/memberlogin.class.php');
$keeptime = isset($keeptime) && is_numeric($keeptime) ? $keeptime: -1;
$name_chka = new MemberLogin($keeptime);

在view.php末尾$arc->Display();前添加:

if ($name_chka – >M_UserName != $arc – >Fields['writer']) {
    $description = "只有本人才能查看";
    $pubdate = GetDateTimeMk($arc – >Fields["pubdate"]);
    $arctitle = $arc – >Fields['title'];
    $msgtitle = "没有权限!";
    $moremsg = "<font color='red'>请登录后查看!</font>";
    include_once($cfg_basedir.$cfg_templets_dir."/plus/view_msg.htm");
    $arc – >Close();
    exit();
}

利用php语法实现一个哔哩哔哩热榜api

php删除接口:在指定的数据库数据表中根据ID删除指定的数据

php插入接口:在指定的数据库数据表中插入数据

php语法对index.php首页进行判断(根据需要显示不同页面)

html文本如何读取数据库代码示例

标签: CMS网站, keeptime, php语法, 未审核, 织梦

上面是“织梦cms未审核的文章如何实现仅发布者可见”的全面内容,想了解更多关于 织梦cms 内容,请继续关注web建站教程。

当前网址:https://m.ipkd.cn/webs_661.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

生活小工具

收录了万年历、老黄历、八字智能排盘等100+款小工具!生活小工具
aicolors:一款快速生成与之匹配的配色方案的AI配色工具
帝国cms如何做留言板功能
帝国cms如何修改留言版的分页数
bootstrap如何动态绑定数据
利用cors模块解决node.js中存在的跨域问题?