1function getMunicipio() { 2 var myAjaxTrigger = new createAJAX(); //Ajax object handle 3 var provincia = document.getElementById('provincia').value; 4 myAjaxTrigger.async_call('index.php', 'option=com_gobierno&view=clasificados' + '&task=get_municipio&format=raw' + '&id=' + provincia, endGetMunicipio); 5} 6 7function endGetMunicipio(responseText) 8{ 9 document.getElementById('municipios').innerHTML = responseText; 10 return; 11} 12 13function sendAPoblacion() { 14 var myAjaxTrigger = new createAJAX(); //Ajax object handle 15 var provincia = document.getElementById('provincia').value; 16 var municipio = document.getElementById('municipio').value; 17 var clasificacion = document.getElementById('clasificacion').value; 18 var municipal = document.getElementById('municipal').value; 19 var provincial = document.getElementById('provincial').value; 20 var captcha = document.getElementById('field_lab5_captcha').value; 21 var correo = document.getElementById('correo').value; 22 var movil = document.getElementById('movil').value; 23 var ncorreo = document.getElementById('ncorreo').value; 24 var nmovil = document.getElementById('nmovil').value; 25 var nombre = document.getElementById('nombre').value; 26 var direccion = document.getElementById('direccion').value; 27 var resumen = document.getElementById('resumen').value; 28 29 var espublicosi = document.getElementById('espublicosi').value; 30 var espublicono = document.getElementById('espublicono').value; 31 32 //alert(espublicono); 33 34 direccion = direccion.replace('#', 'al35'); 35 resumen = resumen.replace('#', 'al35'); 36 37 if(document.getElementById('espublicono').checked == true){ 38 espublico = 'N'; 39 }else{ 40 espublico = 'S'; 41 } 42 43 if(document.getElementById('municipal').checked == true) 44 { 45 nivel = 1; 46 } 47 if(document.getElementById('provincial').checked == true){ 48 nivel = 2; 49 } 50 51 if (municipio != "0" && clasificacion != "0" && nombre != '' && direccion != '' && resumen != '') 52 { 53 document.getElementById('errores').style.display = 'none'; 54 document.getElementById('resultado').style.display = 'block'; 55 document.getElementById('resultado').innerHTML = '<span><i class="fa fa-spinner fa-spin fa-pulse fa-2x"></i></span>'; 56 myAjaxTrigger.async_call('index.php', 'option=com_gobierno&view=clasificados' + '&task=send_atencion_poblacion&format=raw' + '&id_prov=' + provincia + '&id_mun=' + municipio + '&nombre=' + nombre + '&direccion=' + direccion + '&resumen=' + resumen+ '&captcha=' + captcha + '&correo=' + correo + '&movil=' + movil + '&ncorreo=' + ncorreo + '&nmovil=' + nmovil +'&clasificacion=' + clasificacion +'&nivel=' + nivel+'&espublico=' + espublico, endSendAPoblacion); 57 } else { 58 document.getElementById('errores').style.display = 'block'; 59 document.getElementById('errores').innerHTML = "Debe llenar los campos obligatorios"; 60 } 61} 62 63function endSendAPoblacion(responseText) 64{ 65 document.getElementById('resultado').innerHTML = responseText; 66 if(document.getElementById('verif').value == 0){ 67 document.getElementById('nombre').value=""; 68 document.getElementById('direccion').value=""; 69 document.getElementById('resumen').value=""; 70 document.getElementById('correo').value=""; 71 document.getElementById('movil').value=""; 72 document.getElementById('captcha').value=""; 73 document.getElementById('ncorreo').checked=false; 74 document.getElementById('nmovil').checked=false; 75 } 76 return; 77} 78 79function lipiarcampos() { 80 document.getElementById('nombre').value=""; 81 document.getElementById('direccion').value=""; 82 document.getElementById('planteamiento').value=""; 83 document.getElementById('email').value=""; 84 document.getElementById('telef').value=""; 85 document.getElementById('captcha').value=""; 86} 87 88function getVerificarTramiteAP() { 89 var myAjaxTrigger = new createAJAX(); //Ajax object handle 90 var provincia = document.getElementById('provinciaT').value; 91 var codVer = document.getElementById('codVer').value; 92 if (codVer != "") 93 { 94 document.getElementById('errores').style.display = 'none'; 95 document.getElementById('resultado').style.display = 'block'; 96 document.getElementById('resultado').innerHTML = '<span><i class="fa fa-spinner fa-spin fa-pulse fa-2x"></i></span>'; 97 myAjaxTrigger.async_call('index.php', 'option=com_gobierno&view=clasificados' + '&task=get_verificartramiteAP&format=raw' + '&id_prov=' + provincia + '&cod_ver=' + codVer, endGetVerificarTramiteAP); 98 } else { 99 document.getElementById('errores').style.display = 'block'; 100 document.getElementById('errores').innerHTML = "Debe llenar los campos obligatorios"; 101 } 102} 103 104function endGetVerificarTramiteAP(responseText) 105{ 106 document.getElementById('resultado').innerHTML = responseText; 107 return; 108} 109 110function mostrarVerificarAP() { 111 document.getElementById('errores').innerHTML = ""; 112 document.getElementById('capaVerificarTramite').style.display = 'block'; 113 document.getElementById('capaAtencionPoblacion').style.display = 'none'; 114 document.getElementById('capaPlanteamientos').style.display = 'none'; 115 116 document.getElementById('plan').innerHTML = "Introdusca el código de verificación."; 117 document.getElementById('resultado').innerHTML = ''; 118} 119 120function validar_email( email ) 121{ 122 var regex = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 123 return regex.test(email) ? true : false; 124} 125 126 127 128 129function mostrarServicio(tmpidservicio) 130{ 131 document.getElementById('idservsel').value = tmpidservicio; 132 switch (tmpidservicio) { 133 case 14: 134 mostrarFormAP(); 135 break; 136 case 13: 137 mostrarVerificarAP(); 138 break; 139 case 5555: 140 mostrarPlanteamientosAP(); 141 break; 142 } 143} 144 145function mostrarRadios() { 146 document.getElementById('radios').style.display = 'block'; 147} 148 149 150 151 152 153 154function mostrarFormAP() { 155 document.getElementById('errores').innerHTML = ""; 156 document.getElementById('capaAtencionPoblacion').style.display = 'block'; 157 document.getElementById('capaVerificarTramite').style.display = 'none'; 158 document.getElementById('capaPlanteamientos').style.display = 'none'; 159 160 161 document.getElementById('plan').innerHTML = "Servicios de Atención a la Población del Poder Popular Provincial"; 162 document.getElementById('resultado').innerHTML = ''; 163} 164 165function mostrarPlanteamientosAP() { 166 document.getElementById('errores').innerHTML = ""; 167 document.getElementById('capaAtencionPoblacion').style.display = 'none'; 168 document.getElementById('capaVerificarTramite').style.display = 'none'; 169 document.getElementById('capaPlanteamientos').style.display = 'block'; 170 171 172 173 document.getElementById('plan').innerHTML = "Planteamientos realizados por la población."; 174 document.getElementById('resultado').innerHTML = ''; 175} 176 177 178 179 180function getEstacion(id) 181{ 182 183 var myAjaxTrigger = new createAJAX(); //Ajax object handle 184 myAjaxTrigger.async_call('index.php', 'option=com_apoblacion&view=clasificados' + '&task=get_estacion&format=raw' + '&id=' + id, endGetEstacion); 185} 186 187function endGetEstacion(responseText) 188{ 189 document.getElementById('respuesta').innerHTML = responseText; 190 return; 191} 192 193 194 195function limpiarNodo(iIdNodo, text) // limpia un nodo (componente html) 196{ 197 var nodo = document.getElementById(iIdNodo); 198 while (nodo.hasChildNodes()) 199 { 200 nodo.removeChild(nodo.firstChild); 201 } 202 var opcion = document.createElement('option'); 203 var texto = document.createTextNode(text); 204 opcion.appendChild(texto); 205 opcion.setAttribute("value", "0"); 206 document.getElementById(iIdNodo).appendChild(opcion); 207} 208 209//Click function 210function setSearch(value) { 211 document.getElementById('city_birth').value = value; 212 document.getElementById('layer1').innerHTML = ''; 213 document.getElementById('layer1').style.visibility = "hidden"; 214} 215
216/* Creando una cookie para controlar like y dislike */ 217 218 219function setCookie(cname, cvalue, exdays) { 220 var d = new Date(); 221 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 222 var expires = "expires=" + d.toUTCString(); 223 document.cookie = cname + "=" + cvalue + ";" + expires; 224 } 225 226function getCookie(cname) { 227 var tmp = 0; 228 if(document.cookie){ 229 var ca = document.cookie.split(';'); 230 for (var i = 0; i < ca.length; i++) { 231 var c = ca[i]; 232 c = c.trim(); 233 var a = c.split('='); 234 if(a[0] == cname) { 235 tmp = 1; 236 return a[0]; 237 } 238 } 239 240 if(tmp == 0){ 241 242 return ""; 243 } 244 } else { 245 return ""; 246 } 247 } 248 249 function checkCookie(cname) { 250 var resul = false; 251 var username = getCookie(cname); 252 //console.log(username); 253 if (username != "") { 254 resul = true; 255 } 256 return resul; 257 } 258 259function like(id) { 260 if(!checkCookie('voto'+id)){ 261 id_temp = id; 262 sum_temp = document.getElementById('like'+id).innerHTML; 263 var myAjaxTrigger = new createAJAX(); //Ajax object handle 264 265 document.getElementById('like'+id).innerHTML = '<span><i class="fa fa-spinner fa-spin fa-pulse fa-1x"></i></span>'; 266 267 myAjaxTrigger.async_call('index.php', 'option=com_gobierno&view=clasificados' + 268 '&task=like&format=raw' + '&id_plant=' + id, endLike); 269 270 var voto = 'voto'+id; 271 setCookie(voto, true, 365); 272 273 } else { 274 document.getElementById('div_message'+id).style.display='inline'; 275 closeAlert(id); 276 } 277 278} 279 280function endLike(responseText) 281{ 282 if(responseText == 1){ 283 document.getElementById('like'+id_temp).innerHTML = parseInt(sum_temp) + 1; 284 } else { 285 document.getElementById('like'+id_temp).innerHTML = sum_temp; 286 } 287 return; 288} 289 290function dislike(id) { 291 if(!checkCookie('voto'+id)){ 292 id_temp = id; 293 sum_temp = document.getElementById('dislike'+id).innerHTML; 294 var myAjaxTrigger = new createAJAX(); //Ajax object handle 295 296 document.getElementById('dislike'+id).innerHTML = '<span><i class="fa fa-spinner fa-spin fa-pulse fa-1x"></i></span>'; 297 298 myAjaxTrigger.async_call('index.php', 'option=com_gobierno&view=clasificados' + 299 '&task=dislike&format=raw' + '&id_plant=' + id, endDisLike); 300 301 var voto = 'voto'+id; 302 setCookie(voto, true, 365); 303 } 304 else { 305 document.getElementById('div_message'+id).style.display='inline'; 306 closeAlert(id); 307 } 308 309} 310 311function endDisLike(responseText) 312{ 313 if(responseText == 1){ 314 document.getElementById('dislike'+id_temp).innerHTML = parseInt(sum_temp) + 1; 315 } else { 316 document.getElementById('dislike'+id_temp).innerHTML = sum_temp; 317 } 318 return; 319} 320 321function closeAlert(id) { 322 setTimeout(() => { 323 document.getElementById('div_message'+id).style.display = 'none'; 324 }, 3000); 325 }
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.