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

📄 ulogin.asp

📁 树形论坛
💻 ASP
字号:
<!-- #include file="function.asp" -->
<!-- #include file="MD5.asp" -->
<%
myfilename="ulogin.asp"
if action="userlogin" and Request.ServerVariables("request_method") = "POST" then
numcode=Request.Form("numcode")
username=HTMLEncode(Trim(Request.Form("login_username")))
userpass=md5(Trim(Request.Form("login_userpass")))
period=int(Request.Form("period"))
numcode=right(numcode,4)
if numcode=empty or username=empty or userpass=empty then error("请填写完整")
if not ISNumeric(numcode) then numcode=1
if ccur(numcode)<>ccur(Session("numcode")) then error("你输入的验证码有错 ")
set rs=server.createobject("ADODB.Recordset")
If conn.Execute("Select id From [user] where username='"&username&"' and userpass='"&userpass&"' " ).eof Then error("你填写的用户名或者密码错误")

Response.Cookies("username")=username
Response.Cookies("userpass")=userpass
if period<>0 then
Response.Cookies("username").Expires=date+period
Response.Cookies("userpass").Expires=date+period
end if
message="<li>登陆成功<li><a href=./>返回论坛首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=2;url=./>")
Response.End
end if
if action="outlogin" and Request.ServerVariables("request_method") = "GET" then
Response.Cookies("username")=""
Response.Cookies("userpass")=""
message="<li>退出论坛成功<li><a href=./>返回论坛首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=2;url=./>")
Response.End
end if

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=forumname%>用户登陆 </title>

<style>
<!--
BODY{font-size:9pt;}
td        { font-size: 9pt}
-->
</style>
</head>
<body topmargin="50">
<!--
'┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓'
'┃                   DATALL 知识库asp版 v2.0                              ┃'
'┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫'
'┃                   homepage:http://www.datall.com                       ┃'
'┃                            http://www.datall.net                       ┃'
'┃                   Q Q  NO.:194088                                      ┃'
'┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫'
'┃                          DATALL出品                                    ┃'
'┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛'
-->
<form name="form"  onsubmit="return VerifyInput();" action="<%=myfilename%>" method="post">
<input type=hidden name="action" value="userlogin">
  <table cellSpacing="0" cellPadding="0" width="500" align="center" border="0">
    <tr>
      <td colSpan="3" height="29" style="font-size: 9pt">
      <table cellSpacing="0" cellPadding="0" width="100%" border="0">
        <tr>
          <td width="7" style="font-size: 9pt">
          <img alt src="images/topbg_01.gif" width="7" height="29"></td>
            <td background="images/topbg_02.gif" style="font-size: 9pt"> <table cellSpacing="0" cellPadding="0" width="100%" border="0">
                <tr> 
                  <td width="3%"></td>
                  <td vAlign="center" align="left" width="85%"> <font color="#ffffff"><b><%=forumname%>用户登陆</b></font></td>
                  <td align="right" width="12%"> &nbsp;&nbsp;</td>
                </tr>
              </table></td>
          <td width="8" style="font-size: 9pt">
          <img alt src="images/topbg_03.gif" width="8" height="29"></td>
        </tr>
      </table>
      </td>
    </tr>
    <tr>
      <td width="3" background="images/link.gif" style="font-size: 9pt"></td>
      <td vAlign="top" style="font-size: 9pt">
      <table cellSpacing="0" cellPadding="0" width="100%" border="0">
        <tr>
          <td style="font-size: 9pt">
          <table width="100%" align="center" bgColor="#eeead6" border="0">
            <tr>
              <td vAlign="top" style="font-size: 9pt"><fieldset>
              <legend accessKey="F" align="left">用户登陆</legend>
			  
                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="32%">&nbsp;</td>
                    <td width="68%">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="20" align="right">用户名:<font color="#FF0000">*</font> </td>
                    <td><input name="login_username" type="text" maxlength="15"></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="20" align="right">密码:<font color="#FF0000">*</font> </td>
                    <td><input type="password" name="login_userpass"></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
				  <tr>
                    <td height="20" align="right">有效期: </td>
                    <td><select name="period">
                        <option value="0" selected>不保存</option>
						<option value="1">一天</option>
						<option value="30">一月</option>
						<option value="360">永久</option>
                      </select> 公用电脑建议不保存</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="20" align="right">验证码:<font color="#FF0000">*</font> </td>
                    <td><input name="numcode" type="text" size="8" maxlength="8">&nbsp;&nbsp;<img src="validate.asp"></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
				  
                  <tr align="center">
                    <td height="20" colspan="2"><input type=submit name=button value=' 登 陆 '> </td>
                    </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                </table></fieldset></td>
            </tr>
          </table>
          </td>
        </tr>
      </table>
      </td>
      <td width="3" background="images/link.gif" style="font-size: 9pt"></td>
    </tr>
    <tr>
      <td background="images/linkbom.gif" colSpan="3" height="3" style="font-size: 9pt"></td>
    </tr>
  </table>
  </form>

  </body>
</html>

⌨️ 快捷键说明

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