⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.asp

📁 网络书生留言本单用户 v1.0 正式版源码,大家下了就知道怎么用了!
💻 ASP
字号:
<!--#include file="Gbconn.asp" -->
<!--#include file="char.asp" -->
<!--#include file="eof.asp" -->
<%
dim login
login=request.QueryString("login")
if login="chk" then
Call chk()
end if
%>
<SCRIPT language=javascript id=QzeNet>
<!--
function login_onsubmit() 
{
  if(document.login.uid.value.length==0)
 {
   alert("您必须输入帐号!");
   document.login.uid.focus();
   return false;
 }
   if(document.login.u_pass.value.length==0)
 {
   alert("您必须输入密码!");
   document.login.u_pass.focus();
   return false;
 }
}
//-->
</SCRIPT>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="tableg1">
  <tr>
    <td height="25" align="center"><strong>·管理登陆·</strong></td>
  </tr>
</table>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="tableg2">
  <tr> 
    <td height="110" align="center"> <FORM language="javascript" name="login" action='?login=chk' method=post  onSubmit="return login_onsubmit()">
        <table width="249" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="70" height="25" align="center"><strong>帐号:</strong></td>
            <td width="179"> <input name="uid" type="text" id="uid" size="12" style="height:20px;width:100px"></td>
          </tr>
          <tr> 
            <td width="70" height="25" align="center"><strong>密码:</strong></td>
            <td> <input name="u_pass" type="password" id="u_pass" size="12" style="height:20px;width:100px"></td>
          </tr>
          <tr> 
            <td width="70" height="25" align="center" valign="bottom">&nbsp; </td>
            <td valign="bottom"> <input type="submit" name="Submit" value="管理登陆">
            </td>
          </tr>
        </table>
      </form></td>
  </tr>
  <tr> 
    <td height="25" align="right"><%=now()%><strong>·</strong>&nbsp;</td>
  </tr>
</table>
<%
SUB chk()
dim uid,u_pass,expirestime
uid=HTML(request.Form("uid"))
u_pass=HTML(request.Form("u_pass"))
expirestime=dateAdd("n",20,now)
if u_pass="" then
response.Redirect("guestbook.asp")
end if

set rsu=server.createobject("adodb.recordset")
sql="select u_pass from [user] where u_id='"&uid&"' "
rsu.open sql,conn,1,1
if not rsu.eof then
  if u_pass=rsu("u_pass") then
   response.Cookies("qzenetgbuser")=uid
   if expirestime<>"" then
   response.Cookies("qzenetgbuser").Expires=Cdate(expirestime)
   end if
   response.Redirect("guestbook.asp")
  else
  response.Redirect("login.asp")
  end if
else
response.Redirect("login.asp")
end if

END SUB
%>
<!--#include file="bof.asp" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -