📄 chkuser.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
dim sql
dim rs
dim onname
dim passwd
onname=replace(trim(request.form("username")),"'","")
passwd=replace(trim(Request.form("passwd")),"'","")
if onname="" then
Response.write "<script>alert('你还没有输入用户名!!!');history.back();</script>"
Response.end
end if
if passwd="" then
Response.write "<script>alert('你还没有输入密码!!!');history.back();</script>"
Response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where passwd='"&passwd&"' and nickname='"&onname&"'"
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
if passwd=rs("passwd") then
session("inname")=rs("nickname")
If IsObjInstalled("Scripting.FileSystemObject")=true and uplink<>2 Then
Response.Redirect "makefile.asp"
else
Response.Redirect "editupfile.asp"
end if
else
Response.write "<script>alert('用户名或密码错误!!!');history.back();</script>"
end if
else
Response.write "<script>alert('用户名或密码错误!!!');history.back();</script>"
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -