今天下午樓主開(kāi)發(fā)了一個(gè)帝國(guó)cms下載模型添加密碼插件,現(xiàn)在免費(fèi)分享給大家!樓主本人也在用,后期也會(huì)隨時(shí)更新,大家放心使用!
適用版本:7.2UTF-8(需要GBK的自己轉(zhuǎn)碼即可)
1.后臺(tái)發(fā)布下載信息時(shí)可以設(shè)置下載密碼
2.點(diǎn)擊下載時(shí)出現(xiàn)密碼輸入框,起到引流的效果,這時(shí)他們就不得不關(guān)注你了
3.密碼錯(cuò)誤時(shí),顯示密碼錯(cuò)誤
適用:7.2UTF-8(需要GB2312的自己轉(zhuǎn)碼)
1.建立一個(gè)新字段,mima:
2.更新系統(tǒng)模型表單:
3.替換代碼:
模板-->公共模板-->最終下載頁(yè)模板
<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><?phpif(!$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>(點(diǎn)擊下載)</td> </tr></table><?}else{?><?phpif(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>(點(diǎn)擊下載)</td> </tr></table><? }else{ echo "<script>alert('密碼錯(cuò)誤');</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;">請(qǐng)輸入密碼后繼續(xù):<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.11px.cn/d/file/p/2017-06-30/b96165fce27a41c7b0e22dd54fde3fed.jpg" height="100" width="100"></td> </tr> <tr> <td align=center>掃描二維碼關(guān)注微信<br>回復(fù)<font color="red">視頻教程</font>獲取下載密碼</td> </tr></table><?}?><?}?></body></html> |
新聞熱點(diǎn)
疑難解答
圖片精選