login.asp

来自「描述了网上。购物的流程和功能」· ASP 代码 · 共 56 行

ASP
56
字号
   <!--#include file="conn.asp"--> 
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"> 
<STYLE>HTML {TEXT-DECORATION: none}
EM {FONT-FAMILY: CourierNew; FONT-SIZE: 16pt; FONT-STYLE: normal}
A {FONT-SIZE: 9pt}
TD {FONT-SIZE: 9pt}
P {
FONT-SIZE: 9pt
}
</STYLE>
<%set rs=server.createobject("adodb.recordset")
    if session("user_name")="" then
    user_name=trim(request("user_name"))
    user_pass=trim(request("user_pass"))
    if user_name="" or user_pass="" then
        errmsg=errmsg+"<br>"+"<li>用户名和用户密码不能为空!"
        founderr=true
    end if
    sql="select * from member where user_name='"&user_name&"'"
    rs.open sql,conn,3,3
    if rs.eof then
        errmsg=errmsg+"<br>"+"<li>你输入的用户不存在!"
        founderr=true
    elseif user_pass=rs("user_pass") then
        session("user_name")=rs("user_name")
        rs("user_lasttime")=now()
        rs("user_lastip")=request.servervariables("remote_addr")
        rs.update
    else
        errmsg=errmsg+"<br>"+"<li>你输入的密码错误!"
        founderr=true
    end if
    rs.close
    if founderr=true then
    %>

<table border="0" align="center">
      <tr>
        <td width="550" height="20" align="center" bgcolor="53A90C">
        <p><font color="#FFFFFF">出错信息</font> </td>
      </tr>
      <tr>
  <td width="100%" bgcolor="#FFFF00"></td>
      </tr>

<center>


<tr>
  <td width="100%"><%=errmsg%></td>
</tr>
<%else
response.redirect "index.asp"
end if
end if%>
 </table>

⌨️ 快捷键说明

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