
| ||||
Re: como evitar iniciar session tipo FDW amigos, seria algo asi, como obtener la ip del visitante, tomar la hora agregarlo a un campo y consultar primero la ip para denegar el tiempo?? |
| ||||
Re: como evitar iniciar session tipo FDW guardas los reintentos en una tabla y leugo la consultas le pones tiempo actual + 15min verificas existe la ip en mi base? que hora ? es horaproximaentrada < a hora si es menor que hora le decimos te falta tanto para poder entrar suerte
__________________ JuanRa Pérez San Salvador, El Salvador |
| ||||
Re: como evitar iniciar session tipo FDW compañeros, podrian evaluarme, creo que ustedes entenderian mas...
Código:
<% DIM contador, ip_visitante, hora, usuario, clave StrCxn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" StrCxn=StrCxn & "c:\empiezo\sitios\Gestion\utilerias\gestion.mdb;" set cxn=server.CreateObject("ADODB.Connection") set RS=server.CreateObject("ADODB.Recordset") cxn.open StrCxn Function Entrar() SQL="select nombre,pass from ValidUsers where id_user='"&usuario&"';" RS.OPEN SQL, cxn, 3, 3 if Err=0 then if RS.EOF=FALSE then if clave=RS("pass").value then response.Write "Bienvenido de Regreso "&RS("nombre").value else response.Write "Contraseña Incorrecta, Intente nuevamente" contador=contador+1 sSQL="insert into intentos (ip_visitante, hora, intentos) values ('"&ip_visitante&"', "&hora&", "&contador&");" cxn.execute(sSQL) end if else response.Write "Nombre de Usuario Incorrecto" end if end if RS.close end function function verificar(ip) SQL="select ip_visitante, hora, intento FROM intentos where ip_visitante="&ip&" ;" RS.open SQL, cxn, 3, 3 if Err=o then if RS.EOF=true then acceso=1 else if RS("intento").value<3 then entrar() else accesso=0 end if end if end if RS.close end function if request.QueryString("ingresar")="ahorita" then ip_visitante=request.ServerVariables("REMOTE_ADDR") hora=hour(now)&minute(now)&second(now) usuario=request.Form("Usuario") clave=request.Form("Password") verificar(ip) end if cxn.close set cxn=nothing set RS=nothing %> |
| ||||
Re: como evitar iniciar session tipo FDW creo que enrede un poco el codigo anterior, hasta ahorita me di cuenta con los accesos, lo modificare de vuelta, pero si tienen observaciones, se las incluyo |