登陆成功写入Cookies:
response.Cookies('71wl')('c71_admin') = oRs('sys_user')
response.Cookies('71wl')('c71_web_name') = oRs('web_name')
response.Cookies('71wl')('c71_web_host') = oRs('sys_Pass')
读取Cookies验证是否登陆:
if request.Cookies('71wl')('c71_admin')='' or request.Cookies('71wl')('c71_web_name')='' or request.Cookies('71wl')('c71_web_host')='' then
Call Err_Show()
else
Call Conn()
Sql = 'select * from admin where sys_user=''&request.Cookies('71wl')('c71_admin')&'' and sys_Pass=''&trim(request.Cookies('71wl')('c71_web_host'))&'''
oRs.Open Sql,Conn,1,1
if Not oRs.Eof then
Response.Write('已登陆')
else
Response.Write('未登陆')
end if
Call closeConn()
End if
注销登陆清空Cookies:
response.Cookies('71wl')('c71_admin') = ''
response.Cookies('71wl')('c71_web_name') = ''
response.Cookies('71wl')('c71_web_host') = ''