session与COOKIE
<!--#include file="conn/conn.asp"-->
<!--#include file="inc/md5.asp"-->
<%
dim rs
dim nick
dim password
nick=replace(trim(request("nick")),"'","")
password=md5(replace(trim(Request("password")),"'",""))
set rs=server.createobject("adodb.recordset")
sql="select * from personnal where pass='"&password&"' and [user]='"&nick&"'"
' response.write ""&sql&""
' response.end
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
if password=rs("pass") and rs("flag")>=1 then
session("admin")=rs("user")
session("flag")=rs("flag")
Response.Redirect "managemain.asp"
else
call Error
end if
else
call Error()
end if
sub Error()
response.write " <br><br><br>"
response.write " <table align='center' width='300' border='1' cellpadding='0' cellspacing='0' bordercolor='#999999'>"
response.write " <tr bgcolor='#999999'> "
response.write " <td colspan='2' height='15'> "
response.write " <div align='center'><font color='#FFFFFF'>操作: 确认身份失败!</font></div>"
response.write " </td>"
response.write " </tr>"
response.write " <tr> "
response.write " <td colspan='2' height='23'> "
response.write " <div align='center'><br><br>"
response.write " 用户名或密码错误!!! <br><br>"
response.write " <a href='javascript:onclick=history.go(-1)'>返回</a>"
response.write " <br><br></div></td>"
response.write " </tr> </table>"
end sub
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
session怎么设置都不能设置超时时间
请问要怎么改成COOKIE啊
每个页面是用
<%@language=vbscript%>
<%
if session("admin")="" then
response.redirect "../index.asp"
else
if session("flag")>1 then
response.write "<br><p align=center>您没有操作的权限</p>"
response.end
end if
end if
%>判断是否登陆 都要怎么改啊