📄 login.asp
字号:
<!--#include file="header.asp" -->
<table width="778" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="185" height="350" valign="top" class="table-right"><!--#include file="left.asp" --></td>
<td valign="top"> <p> </p><table width="90%" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<%
sia_user=replace(trim(request("sia_user")),"'","")
password=replace(trim(Request("password")),"'","")
ProductList = Session("ProductList")
set rs=server.createobject("adodb.recordset")
sql="select * from sia_user where sia_user='"&sia_user&"' and password='"&password&"'"
rs.open sql,conn,3,3
if not(rs.bof and rs.eof) then
if sia_user=rs("sia_user") and password=rs("password") then
set rs2=server.createobject("adodb.recordset")
sql2="select top 1 * from sia_discount where price <= "&rs("price")&" order by grade DESC"
rs2.open sql2,conn,1,1
if rs("grade") < rs2("grade") then
rs("grade")=rs2("grade")
rs.update
end if
session("sia_user")=rs("sia_user")
session("grade")=rs("grade")
If Len(ProductList) = 0 Then
Response.write "<meta http-equiv='refresh' content='8; url=index.asp'>"
Response.write "<img src=images/i-2.gif width=17 height=17>会员登陆成功<br><br> <a href=index.asp>>>返回首页</a><br><br> <a href='#' onclick=javascript:window.history.go(-1)>>>返回上一页</a>"
Else
Response.write "<meta http-equiv='refresh' content='10; url=check-out.asp'>"
Response.write "<img src=images/i-2.gif width=17 height=17>会员登陆成功<br><br> <a href=index.asp>>>返回首页</a>"
Response.write "<br><br> <a href=check-out.asp>>>去结算中心</a>"
End If
else
call Error
end if
else
call Error()
end if
sub Error()
Response.write "<img src=images/i-2.gif width=17 height=17>用户名或密码错误!<br><br> <a href=# onclick='javascript:window.history.go(-1)'>>>返回上一页</a>"
end sub
rs.close
set rs=nothing
%>
</td>
</tr>
</table>
</td>
</tr>
</table><!--#include file="footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -