诺兰网 - 只为资源而生-分享永无止境 - 专注优质源码/电脑软件/活动资讯/技术教程分享

EMlog文章访问密码美化

编辑:诺兰网 分类:emlog教程 首发 阅读量:154 次
扫码手机访问
0
摘要:EMlog文章访问密码美化教程简介 原生态的文章加密访问页面是不是看腻了 也感觉很丑了啊 此页面由孟坤博客美化了文章加密页面 替换教程 01. 页面路径 include/model/log_model.php 02. 将原生页面代码修改成...

EMlog文章访问密码美化教程简介

原生态的文章加密访问页面是不是看腻了 也感觉很丑了啊 此页面由孟坤博客美化了文章加密页面

替换教程
01. 页面路径 include/model/log_model.php
02. 将原生页面代码修改成美化页面代码哦
03. 也就是修改405~431行代码哦

原生代码

 if ($pwd !== addslashes($logPwd)) {
 echo <<<EOT
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>emlog message</title>
 <style type="text/css">
 <!--
 body{background-color:#F7F7F7;font-family: Arial;font-size: 12px;line-height:150%;}
 .main{background-color:#FFFFFF;margin-top:20px;font-size: 12px;color: #666666;width:580px;margin:10px 200px;padding:10px;list-style:none;border:#DFDFDF 1px solid;}
 -->
 </style>
 </head>
 <body>
 <div class="main">
 <form action="" method="post">
 请输入该文章的访问密码<br>
 <input type="password" name="logpwd" /><input type="submit" value="进入.." />
 <br /><br /><a href="$url">&laquo;返回首页</a>
 </form>
 </div>
 </body>
 </html>
 EOT;
 if ($cookiePwd) {
 setcookie('em_logpwd_' . $logid, ' ', time() - 31536000);
 }
修改如下

 if ($pwd !== addslashes($logPwd)) {
 ?>
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
 <meta charset="UTF-8"> 
 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
 <meta name="renderer" content="webkit"> 
 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
 <title>该文章已被加密</title>
 </head>
 <body>
 <div class="main">
 <img class="alert" alt="EMlog文章访问密码美化" src="https://www.tx7.co/content/templates/FLY/img/mima.png">
 <form action="" method="post" class="mk-side-form">
 <h2 class="pw-tip">该文章已被加密</h2>
 <input type="password" name="logpwd" placeholder="请输入访问密码查看" required><button type="submit">提交</button>
 <?php if($postPwd): ?>
 <p id="pw-error">Oops!密码不对哦~</p>
 <script>setTimeout(function() {document.getElementById("pw-error").style.display = "none"}, 2000);</script>
 <?php endif; ?>
 </form>
 <a href="<?php echo $url; ?>" class="return-home" title="点击回到网站首页">- 返回首页 - </a>
 </div>
 <style type="text/css">
 *{font-family:"Microsoft Yahei",微软雅黑,"Helvetica Neue",Helvetica,"Hiragino Sans GB","WenQuanYi Micro Hei",sans-serif;box-sizing:border-box;margin:0px;padding:0px;font-size:14px;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;-o-transition:.2s;transition:.2s}
 html,body{width:100%;height:100%}
 body{background-color:#F4F6F9;color:#768093}
 input,button{font-size:1em;border-radius:3px;-webkit-appearance:none}
 input{width:100%;padding:5px;box-sizing:border-box;border:1px solid #e5e9ef;background-color:#f4f5f7;resize:vertical}
 input:focus{background-color:#fff;outline:none}
 button{border:0;background:#6abd09;color:#fff;cursor:pointer;opacity:1;user-select:none}
 button:hover,button:focus{opacity:.9}
 button:active{opacity:1}
 .main{width:100%;max-width:500px;height:300px;padding:30px;background-color:#fff;border-radius:2px;box-shadow:0 10px 60px 0 rgba(29,29,31,0.09);transition:all .12s ease-out;position:absolute;left:0;top:0;bottom:0;right:0;margin:auto;text-align:center}
 .alert{width:80px}
 .mk-side-form{margin-bottom:28px}
 .mk-side-form input{float:left;padding:2px 10px;width:77%;height:37px;border:1px solid #ebebeb;border-right-color:transparent;border-radius:2px 0 0 2px;line-height:37px}
 .mk-side-form button{position:relative;overflow:visible;width:23%;height:37px;border-radius:0 2px 2px 0;text-transform:uppercase}
 .pw-tip{font-weight:normal;font-size:26px;text-align:center;margin:25px auto}
 #pw-error {color: red;margin-top: 15px;margin-bottom: -20px;}
 .return-home{text-decoration:none;color:#b1b1b1;font-size:16px}
 .return-home:hover{color:#1E9FFF;letter-spacing:5px}
 </style>
 </body>
 </html>
 <?php
 if ($cookiePwd) {
 setcookie('em_logpwd_' . $logid, ' ', time() - 31536000);
 }
阅读时间:

字数统计:本文共有 3785 个字

本文标题:《EMlog文章访问密码美化》发布于2022-11-3 18:11:48

版权声明:文章由《诺兰网》发布、原创转载请保留出处!

本文链接:https://www.nuolanyl.com/post-2353.html

上一篇
EMlog增加复制提醒弹窗代码
下一篇
EMlog鼠标点击爱心特效

免责声明:

本站提供的资源,都来自网络,版权争议与本站无关,所有内容及软件的文章仅限用于学习和研究目的。不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负,我们不保证内容的长久可用性,通过使用本站内容随之而来的风险与本站无关,您必须在下载后的24个小时之内,从您的电脑/手机中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。侵删请致信E-mail:68407578@qq.com

同类推荐

最新文章

评论列表
签到

小姐姐视频

热门文章

随机推荐

标签云

emlog教程 EMlog文章访问密码美化
EMlog文章访问密码美化教程简介 原生态的文章加密访问页面是不是看腻了 也感觉很丑了啊 此页面由孟坤博客美化了文章加密页面 替换教程 01. 页面路径 ...
扫描二维码阅读原文
诺兰网 January, 01
生成社交图 ×