帝国cms 下载链接输入密码
输入密码才能下载,可以修改下载系统,增加一个名为mima的字段,然后修改模型,再修改公共模板"结果下载页模板"
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>[!--pagetitle--]</title>
<meta name="keywords" content="[!--pagekey--]">
<meta name="description" content="[!--pagedes--]">
<link href="../../data/images/qcss.css" rel="stylesheet" type="text/css">
</head>
<body>
<br>
<br>
<br>
<br>
<?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>
<br>
<?
}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>
<br>
<?
}else{
echo "<script>alert('密码错误');</script>";
}
}
?>
<?
if($pwd !== $r[mima]){
?>
<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>
<?
}
?>
<?
}
?>
</body>
</html>
你觉得文章内容怎么样