详情页

帝国cms下载模型添加密码插件简介

时间:2024年03月29日

编辑:佚名

今天下午楼主开发了一个帝国cms下载模型添加密码插件,现在免费分享给大家!
楼主本人也在用,后期也会随时更新,大家放心使用,想要知道最新更新消息的可以加入q群,里面的资源共享也是很多都是原创的,爱学习的同学可以加入,不爱的就在外面看看就好了!
适用版本:7.2UTF-8(需要GBK的自己转码即可)
功能演示:
插件演示地址
1.后台发布下载信息时可以设置下载密码
2.点击下载时出现密码输入框,起到引流的效果,这时他们就不得不关注你了
3.密码错误时,显示密码错误
4.密码正确时,直接跳转到下载地址(样式自己改)
5.若后台没有设置密码,则直接显示下载链接
插件使用:
适用:7.2UTF-8(需要GB2312的自己转码)
1.建立一个新字段,mima:
2.更新系统模型表单:
3.替换代码:
模板-->公共模板-->最终下载页模板
代码具体代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>[!--pagetitle--]</title>
<meta name="keywords" content="[!--pagekey--]">
<meta name="description" content="[!--pagedes--]">
</head>
<body>
<?php
if(!$r[mima])
{
?>
<table align="center" width="100%">
  <tr>
    <td height="32" align=center>
<a href="[!--down.url--]" title="[!--title--] -[!--down.name--]">
<img src="../../data/images/download.jpg" border=0>
</a>
</td>
  </tr>
  <tr>
    <td align=center>(点击下载)</td>
  </tr>
</table>
<?
}else{
?>
<?php
if(isset($_POST['password'])){
   $pwd=$_POST['password'];
   if($pwd == $r[mima]){
?>
  <table align="center" width="100%">
  <tr>
    <td height="32" align=center>
<a href="[!--down.url--]" title="[!--title--] -[!--down.name--]">
<img src="../../data/images/download.jpg" border=0>
</a>
</td>
  </tr>
  <tr>
    <td align=center>(点击下载)</td>
  </tr>
</table>
<?  
   }else{
   echo "<script>alert('密码错误');</script>";
   }
}
?>
<?
  if($pwd !== $r[mima]){
  ?>
<table style="font-family: '微软雅黑';" align="center" width="100%">
  <tr>
    <td align=center>
<div style="font-size:12px; width:100%;height:100%;">
<div style="text-align:center;">请输入密码后继续:<br>
<form action="" method="post">
<input style="border:1px solid #3374b4;height:33px;line-height:33px;padding-left:5px" type="password" name="password">
<input style="border:1px solid #3374b4;background:#3374b4;padding:10px 10px;color:#fff;text-decoration:none;vertical-align:top" type="submit" value="下 载"></form>
</div>
</div>
</a>
</td>
  </tr>
  <tr>
    <td align=center><img style="margin:15px 0 5px 0" src="http://www.hengzhixy.com/d/file/p/2017-06-30/b96165fce27a41c7b0e22dd54fde3fed.jpg" height="100" width="100"></td>
  </tr>
    <tr>
    <td align=center>扫描二维码关注微信<br>回复<font color="red">视频教程</font>获取下载密码</td>
  </tr>
</table>
<?
}
?>
<?
}
?>
</body>
</html>
将上面的二维码路径改为自己的即可!
另外需要源文件的自己下载(如下)!
帝国cms下载模型添加密码插件
链接: https://pan.baidu.com/s/1RWcPUE5pWjKUyK6w5EnH6g 提取码: ztmf
相关文章
猜你需要