日期:2014-05-17 浏览次数:20969 次
username=cstr(trim(request("username"))) password=cstr(trim(request("password"))) if username<>"" and password<>"" then password=md5(password) Set rs=Server.CreateObject("ADODB.Recordset") sql="SELECT * FROM admin where username='"&username&"' and password='"&password&"' order by id desc" rs.Open sql,conn,3,3 if not rs.eof then session("id")=rs("id") session("username")=rs("username") session("adddate")=rs("adddate") Select Case rs("manage") case 1 response.redirect "manage.asp"[color=#FF0000]//这里跳转,跳转前session有值[/color] case 2 response.redirect "manage2.asp" Case Else response.redirect "manage3.asp" End Select else。。。。。。。。。。。
if session("id")="" or session("username")="" then response.redirect"login.asp?err=请您登陆!"[color=#FF0000]这里获取不到值了跳转到登陆页[/color] end if