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 "font-family: '微軟雅黑';" align="center" width="100%">
<tr>
<td align=center>
<div "font-size:12px; width:100%;height:100%;">
<div "text-align:center;">請輸入密碼后繼續:<br>
<form action="" method="post">
<input "border:1px solid #3374b4;height:33px;line-height:33px;padding-left:5px" type="password" name="password">
<input "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 "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>
將上面的二維碼路徑改為自己的即可!
另外需要源文件的自己下載(如下)!
新聞熱點
疑難解答