This is based on the user's choice whether to allow the user name password to be saved in the cookie Oh, we pay special attention to the code blue codes Oh.
Set Rs=server.createobject ("Adodb.recordset")
Exec= "SELECT * from Yrwl_tb_admin where yhm= '" &yhm& ""
Rs.Open exec,conn,1,1
If not rs.eof then
If SetPwd (pass) <> RS ("pass") then
DL = "0"
Else
CS = RS ("cs")
If IsNull (CS) THEN cs = 0
CS = cs + 1
ZHSJ = RS ("ZHSJ")
If IsNull (ZHSJ) then ZHSJ = "First Login"
Session (sessionvalue& "ZHSJ") = ZHSJ
If jy= "1" Then
Response.Cookies ("bbsyhm") = Yhm
Response.Cookies ("bbspass") = Pass
Else
Response.Cookies ("bbsyhm") = ""
Response.Cookies ("bbspass") = ""
End If
Session (sessionvalue& "pass") =pass
Session (sessionvalue& "YHM") = Yhm
Session (sessionvalue& "LXFS") = RS ("Lxfs")
Session (sessionvalue& "sp") = RS ("wz")
Session (sessionvalue& "id") = CStr (RS ("id"))
Session (sessionvalue& "JB") = RS ("JB")
Session (sessionvalue& "QM") = RS ("QM")
EXEC1 = "Update yrwl_tb_admin SET cs =" +cstr (CS) + ", ZHSJ = ' +jdsj+" ' where yhm = ' "+yhm+ '"
Conn.execute EXEC1
EXEC1 = "INSERT into YRWL_TB_DLXX (YHM,SJ,CK) VALUES (' &yhm&" ', ' &jdsj& ', ' paste ') "
Conn.execute EXEC1
If CZ = "index" then Response.Redirect "index.asp"
End If
Else
DL = "0"
End If
If DL = "0" then%>
<script language= "JavaScript" >
Alert ("User name or password is wrong!") ");
if ("<%=cz%>" = "bg") window.location= "index.asp";
Window.location= "tb_dl.asp";
</script>
<%else
Rs.close
Conn.close%>
<script language= "JavaScript" >
parent.window.location.href= ' index.asp ';
parent.window.frames[' bbslx '].location.href= ' bbs_lx.asp ';
window.location = "bbs_list.asp";
</script>
<%end if