天下网吧 >> 网吧天地 >> 网吧技术 >> 网吧安全 >> 正文

用密码验证来保护动感首页更新的实现

2008-2-18赛迪网佚名

  下面的程序是阿喔动感管理通用程序,非常简单不用解释了吧!

if username="admin" and password="admin" then

  请记得修改两个admin分别用户名和密码!

login.ASP
<HTML>


<head>
<title>管理者登陆</title>
<link rel="stylesheet" href=../../"DOWNLOAD.CSS">
</head>

<body>
<div align="center"><center>

<table border="0" cellspacing="1" width="90%">
  <tr>
    <td> <form method="post"
action="chklogin.ASP">
      <table width="45%" border="1"
cellspacing="0" cellpadding="1" align="center"
      bordercolordark="#ecf5ff"
bordercolorlight="#6699cc">
        <tr>
          <td><table
width="100%" border="0" cellspacing="1"
cellpadding="1">
            <tr>
               
       <td width="33%"
align="right" height="30">用户名:</td>
              <td
width="67%"><input name="username" maxlength="20"
class="smallInput" size="20"> </td>
            </tr>
            <tr>
               
       <td width="33%"
align="right" height="30">密 码:</td>
              <td
width="67%"><input type="password" name="password"
maxlength="16" class="smallInput"
              size=&
quot;20"> </td>
            </tr>
            <tr>
              <td
colspan="2" height="15"></td>
            </tr>
          </table>
          </td>
        </tr>
        <tr align="center">
          <td
height="40">
               
   <input type="submit" name="Submit" value="确
定" class="buttonface">
           
               
   <input type="reset" name="Submit2" value="重
写" class="buttonface">
               
    </td>
        </tr>
      </table>
    </form>
    <p align="center"> </td>
  </tr>
</table>
</center></div>
</body>
</HTML>

__________________________________________________________________

chklogin.ASP
<%
dim sql
dim rs
dim seekerrs
dim founduser
dim username
dim companyid
dim password
dim errmsg
dim founderr
founderr=false
FoundUser=false
username=request.form("username")
password=request.Form("password")
if username="" then
   response.redirect "index.ASP"
end if
if password="" then
     response.redirect "index.ASP"
end if

if username="admin" and password="admin" then
   response.cookies("adminok")=true
   response.redirect "manage.ASP"
else
     response.redirect "index.ASP"
end if
%>

欢迎访问最专业的网吧论坛,无盘论坛,网吧经营,网咖管理,网吧专业论坛https://bbs.txwb.com

关注天下网吧微信,了解网吧网咖经营管理,安装维护:


本文来源:赛迪网 作者:佚名

声明
本文来源地址:0
声明:本站所发表的文章、评论及图片仅代表作者本人观点,与本站立场无关。若文章侵犯了您的相关权益,请及时与我们联系,我们会及时处理,感谢您对本站的支持!联系Email:support@txwb.com.,本站所有有注明来源为天下网吧或天下网吧论坛的原创作品,各位转载时请注明来源链接!
天下网吧·网吧天下
  • 本周热门
  • 本月热门
  • 阅读排行