PageSourceSearch

https://www.atleticosaguntino.es/Deporpanel/acceso/javas/control.js

js atleticosaguntino.es collected 2026-10-02 13:45:37 UTC 4,324 bytes, 119 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2
3        btnrecupera = document.getElementById("solicitaolvido");
4        if(btnrecupera!=null) btnrecupera.addEventListener("click",solicitaclaves);
5
6      btnrecontra = document.getElementById("restablececontra");
7      if(btnrecontra!=null) btnrecontra.addEventListener("click",clavesiguales);
8
9      btnrecpas = document.getElementById("repassword");
10      if(btnrecpas!=null) btnrecpas.addEventListener("keyup",keyclaves);
11
12  });
13
14
15  function solicitaclaves(){
16  	    var dominio=document.getElementById("vdominio");
17        var email=document.getElementById("email");
18  	    var equipo=document.getElementById("vequipo");
19        var exr = /^[0-9a-z_\-\.]+@[0-9a-z\-\.]+\.[a-z]{2,4}$/i;
20
21        if(exr.test(email.value)==false){
22        		alert("Introduce email valido");
23        }else{
24            		//1.Instanciar objeto peticion_http
25            		peticion_http=inicializa_xhr();
26
27            		//3-  Realizar peticion HTTP al servidor
28            		peticion_http.open("POST", ""+dominio.value+"/Deporpanel/acceso/javas/recuperarcon.php", true);
29            		peticion_http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
30
31            		//2.- Preparar la funcion de respuesta
32            		peticion_http.onreadystatechange = function() {
33            			if(peticion_http.readyState == 4) {
34            				if(peticion_http.status == 200){
35                        if(peticion_http.response=="ok"){
36                    	     var divform=document.getElementById("formdeolvido");
37                           divform.style.display="none";
38                      	  var divhecho=document.getElementById("formhecho");
39                          divhecho.style.display="block";
40                      }else if(peticion_http.response=="sin"){
41                      	   var inputemail=document.getElementById("email");
42                           inputemail.value="";
43                      	   var divfallo=document.getElementById("formfallo");
44              					      divfallo.style.visibility="visible";
45                      }else{
46                          alert("response invalida ");
47                      }
48
49            				}else{
50                          alert("fallo clave");
51            				}
52            			}
53            			else{
54            			}
55            		}
56
57            		var query_string = mandaropa(email.value,equipo.value);
58            		peticion_http.send(query_string);
59          }
60          event.preventDefault();
61  }
62
63  function mandaropa(email,equipo) {
64    return "email=" + encodeURIComponent(email) +
65           "&equipo="+equipo+
66           "&nocache=" + Math.random();
67  }
68
69  function clavesiguales(){
70  	    var pass=document.getElementById("password");
71        var repass=document.getElementById("repassword");
72        exr=/^(?=(?:.*\d){2})(?=(?:.*[A-Z]){2})(?=(?:.*[a-z]){2})\S{8,}$/;
73
74        if(exr.test(pass.value)==false){
75            alert("Las contraseñas debe tener 8 caracteres como minimo. Introduce como minimo 2 mayusculas, 2 minusculas y 2 numeros.");
76            event.preventDefault();
77        }else if(pass.value!=repass.value){
78            alert("Las contraseñas no coinciden");
79            event.preventDefault();
80        }else{
81
82
83        }
84
85  }
86
87  function keyclaves(){
88  	    var pass=document.getElementById("password");
89        var repass=document.getElementById("repassword");
90        var divhecho=document.getElementById("formhecho");
91        var divfallo=document.getElementById("formfallo");
92        if(pass.value!=repass.value){
93           divfallo.style.visibility="visible";
94           divhecho.style.display="none";
95        }else{
96           divfallo.style.visibility="hidden";
97           divhecho.style.display="block";
98        }
99  }
100
101
102  /**/
103  function inicializa_xhr() {
104  	var navega_version=["MSXML2.XHTMLHttp.5.0","MSXML2.XHTMLHttp.4.0","MSXML2.XHTMLHttp.3.0","MSXML2.XHTMLHttp","Microsoft.XHTMLHttp",];
105  	if(window.XMLHttpRequest) {
106  		var peticion_http = new XMLHttpRequest();
107  	}
108  	else if(window.ActiveXObject) {
109  		for(a=0;$a<navega_version.length;$a++){
110  			  try {
111  				var peticion_http = new ActiveXObject(navega_version[a]);
112  			 }
113  			 catch (e) {
114  			 alert('El navegador utilizado no esta soportado');
115  			 }
116  		}
117  	}
118  	return peticion_http;
119  }

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.