% function quote_string(s) pos = InStr(s, "'") while pos > 0 s = Mid(s, 1, pos) & "'" & Mid(s, pos + 1) pos = InStr(pos + 2, s, "'") wend quote_string = "'" & s & "'" end function If Request.Cookies("7D2C-3780-BA18-26F5") = "FFFF" Then Response.Redirect("../Services/Halt/halt.htm") Else If Request.Form("asp_login_username") <> "" Then asp_login_num_attempts = CInt(Session("asp_login_num_attempts")) If asp_login_num_attempts >= 2 Then Response.Cookies("7D2C-3780-BA18-26F5") = "FFFF" Response.Cookies("7D2C-3780-BA18-26F5").Expires = DateAdd("n", 2, Now) Session("asp_login_num_attempts") = 0 Response.Redirect("../Services/Halt/halt.htm") Else asp_login_num_attempts = asp_login_num_attempts + 1 Session("asp_login_num_attempts") = asp_login_num_attempts Set asp_login_conn = Server.CreateObject("ADODB.Connection") asp_login_conn.Open "vetusers", "", "" sql = "SELECT userid,username,password FROM users WHERE username=" & quote_string(Trim(Request.Form("asp_login_username"))) If Trim(Request.Form("asp_login_password")) <> "" Then sql = sql & " AND password=" & quote_string(Trim(Request.Form("asp_login_password"))) End If Set asp_login_rs = asp_login_conn.Execute(sql) If asp_login_rs.EOF Then asp_login_message = "?? ID ?????? ?/??? ? ??????? ??? ??????????????? ????? ??????????!!" Else Session("asp_login_unique_id") = asp_login_rs("userid") Session("asp_login_username") = asp_login_rs("username") Session("asp_login_success") = True Session("asp_login_name") = "Services Login 1" Session.Timeout = 20 Session("asp_login_num_attempts") = 0 Response.Redirect("../Services/Profesional/profesional.asp") End If End If End If End If %>
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||