pass.asp

来自「以朱朱相册为程序原型整合开发winds相册」· ASP 代码 · 共 43 行

ASP
43
字号
<%@ ENABLESESSIONSTATE = FALSE %>
<%
dim db,wConn,myconn,rso
db="plugin/windsphoto/data/winds.mdb"
Set wConn = Server.CreateObject("ADODB.Connection")
myconn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
wConn.Open MyConn
%>
<%
pa=Request.Form("pase")
if pa = "" then
response.write "<script>alert('对不起,通行证不可以为空!');history.back();</script>"
response.end
end if
dim typename,classid,classname,pl,hot
if IsNumeric(Request.QueryString("typeid"))=False then
Response.Redirect"info.asp?info=错误的参数"
else
typeid=cint(Request.QueryString("typeid"))
end if
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from zhuanti where id="&typeid
'response.write sql
'response.end
Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,wConn,1,3
if Rs("pass")="" OR IsNULL(Rs("pass"))=true then
Response.redirect "zhuanti.asp?typeid="&typeid
Response.End
	else
	ps = Rs("pass")
	end if
if ps <> pa then
response.write "<script>alert('对不起,通行证没有得到认可,请重新再试!');history.back();</script>"
response.end
else
	Response.cookies("'"&typeid&"'") = pa
Response.redirect "zhuanti.asp?typeid="&typeid
Response.End
	end if
set wConn = nothing
%>

⌨️ 快捷键说明

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