"; //print_r($_SERVER); //echo ""; @$var_query_principal=$_SERVER["REDIRECT_QUERY_STRING"]; @parse_str($var_query_principal, $q_val); @$id_cate_sm=$q_val["sm"]; @$id_cate_sm_html=$q_val["sm"].".html"; @$mn_html=$q_val["mn"].".html"; //verifica si tiene dependencia $latitud="8.976993938904876"; $longitud="-79.52828984238283"; if(strlen($id_cate_sm) > 0){ $jaka=@mysql_query("select * from menu order by orden asc"); while($wss=@mysql_fetch_array($jaka)){ $lingmenus=$wss["menu".$lang_sufix]; $var_crid=$wss["id"]; $directorio_sm="/".modcarpetas($var_crid).$mn_html; if($directorio_sm==$_SERVER['REQUEST_URI']){ $var_id_sm = $wss["id"]; $var_include_where=" and depende='".$var_id_sm."' "; $var_include_where_a =" where depende='".$var_id_sm."' "; } } //echo $var_include_where; }else{ $var_include_where=" and depende is null "; $var_include_where_a =" where depende is null "; } $var_global_menu=@consulta_img("menu","mod_rewrite".$lang_sufix."='".$lang_var_diagona_menu.$var_principal_menu."' ".$var_include_where." ","id"); $id_depende=@consulta_img("menu","id='".$var_global_menu."'","depende"); if(strlen($var_global_menu)==0){ $nsd=@mysql_query("select * from menu ".$var_include_where_a." order by orden asc"); while($ws=@mysql_fetch_array($nsd)){ $link_menu=$ws["menu".$lang_sufix]; if(convertir_seo($link_menu)==$var_principal_menu){ $var_global_menu=$ws["id"]; $id_depende=$ws["depende"]; } } } //echo $var_global_menu; //imprime si hay dos nombres duplicados en los titulos $check_dup=explode(".",$var_principal_menu); if($var_duplicado_id==true && count($check_dup) > 1 && is_numeric($check_dup[0])){ $var_global_menu=$check_dup[0]; $id_depende=@consulta_img("menu","id='".$var_global_menu."'","depende"); } $check_tipo_user=consulta_img("menu","id='".$var_global_menu."'","tipo"); if(@$_SESSION["u_id"] == false && $check_tipo_user=="clientes"){ header ("Location: /salir.php"); } if($lang_var=="esp"){ $var_type_html_encode="windows-1252"; $var_type_html_ct_language="es"; }else{ $var_type_html_enconde="utf-8"; $var_type_html_ct_language="en"; } @include $_SERVER['DOCUMENT_ROOT']."/modules/tag-title/tags_search_engines.php"; if($var_principal_id==true){ $strs = explode("_id_",$var_principal_menu); $url_pr= $strs[0]; $url_pr_html=$url_pr.".html"; $url_ev= str_replace(array(".html",".htm"),array("",""),$strs[1]); if($lang_var=="eng") $print_first="eng/"; else $print_first=""; $url_pr=consulta_img("menu","mod_rewrite".$lang_sufix."='".$print_first.$url_pr_html."'","id"); $nombre_tit_ns=consulta_img("menu","id='".$var_global_menu."'","menu".$lang_sufix); if(strlen($url_pr)==0){ $nsdr=@mysql_query("select * from menu order by orden asc"); $nsdr_num=mysql_num_rows($nsdr); while($lalo=@mysql_fetch_array($nsdr)){ $link_menur=$lalo["menu".$lang_sufix]; if(convertir_seo($link_menur)==$url_pr_html){ if(strlen($id_cate_sm) > 0) $directorio_mn="/".modcarpetas($lalo["depende"]).$mn_html; else $directorio_mn="/".$var_principal_menu; if($directorio_mn==$_SERVER['REQUEST_URI']){ $url_pr=$lalo["id"]; } }else $url_rp=0; } } if($url_pr > 0) $var_global_menu=$url_pr; } $va_dt=parse_url($var_principal_menu); @parse_str($va_dt["query"], $sld); @$id_mn=$sld["id"]; @$prev_mn=$sld["preview"]; @$idn_mn=$sld["idn"]; if($prev_mn=="true" && $id_mn > 0){ $var_global_menu=$id_mn; $url_ev=$idn_mn; $var_id_sm=consulta_img("menu","id='".$var_global_menu."'","depende"); } //redirect notificacion $notificaciones=consulta_img("configuracion","id='1'","notificaciones"); if($prev_mn!="true" && $notificaciones=="si"){ if($url_ev > 0){ $verifica_noti=consulta_img("notificaciones","id_listado='".$url_ev."'","estatus"); if($verifica_noti == "espera" || $verifica_noti == "no") header("Location: http://".$_SERVER['HTTP_HOST']); }else{ $verifica_menu=consulta_img("notificaciones","id_menu='".$var_global_menu."' and id_listado is null","estatus"); if($verifica_menu == "espera" || $verifica_menu == "no") header("Location: http://".$_SERVER['HTTP_HOST']); } //elimina los menu que no estan aprobados $jng=mysql_query("select * from notificaciones where (estatus='espera' or estatus='no') and id_listado is null group by id_menu"); if(mysql_num_rows($jng) > 0){ $query_filter_mn="and ("; while($tf=mysql_fetch_array($jng)){ $bsg++; if($bsg!=1) $var_andd=" and "; else $var_andd=""; $query_filter_mn.=$var_andd." id != '".$tf["id_menu"]."'"; } $query_filter_mn.=")"; } //elimina las noticias que no estan aprobadas $jngs=mysql_query("select * from notificaciones where (estatus='espera' or estatus='no') and id_listado > 0 group by id_listado"); if(mysql_num_rows($jngs) > 0){ $query_filter_list="and ("; while($tfs=mysql_fetch_array($jngs)){ $bsgs++; if($bsgs!=1) $var_andds=" and "; else $var_andds=""; $query_filter_list.=$var_andds." listados.id != '".$tfs["id_listado"]."'"; } $query_filter_list.=")"; } }else { } $title_page=@consulta_img("menu","id='".$var_global_menu."'","menu".$lang_sufix); $w_wallpaper=@consulta_img("menu","id='".$var_global_menu."'","background"); $sub_title_page=@consulta_img("menu","id='".$var_global_menu."'","subtitulo".$lang_sufix); $filtro_id=@consulta_img("menu","id='".$var_global_menu."'","filtro_id"); $iframe_link=@consulta_img("menu","id='".$var_global_menu."'","iframe_link"); $iframe_alto=@consulta_img("menu","id='".$var_global_menu."'","iframe_alto"); $iframe_ancho=@consulta_img("menu","id='".$var_global_menu."'","iframe_ancho"); $iframe_scrollbar=@consulta_img("menu","id='".$var_global_menu."'","iframe_scrollbar"); $barra_izquierda=@consulta_img("menu","id='".$var_global_menu."'","quitar_barra_isquierda"); //$id_depende=@consulta_img("menu","id='".$var_global_menu."' and depende is not null limit 1","depende"); $depende_n=consulta_img("menu","depende='".$var_global_menu."' limit 1","id"); $title_flash=@consulta_img("menu","id='".$var_global_menu."'","texto_flash".$lang_sufix); $text_page= @consulta_img("menu","id='".$var_global_menu."'","texto".$lang_sufix); $w_include = @consulta_img("menu","id='".$var_global_menu."'","include"); $w_galeria = @consulta_img("menu","id='".$var_global_menu."'","galeria"); $w_module_listado = @consulta_img("menu","id='".$var_global_menu."'","modulo_listado"); $w_module_listado_tipo = @consulta_img("menu","id='".$var_global_menu."'","modulo_listado_tipo"); $w_module_listado_destacado = @consulta_img("menu","id='".$var_global_menu."'","modulo_listado_slider"); $w_module_documentos = @consulta_img("menu","id='".$var_global_menu."'","modulo_documentos"); $w_module_sub_menu = @consulta_img("menu","id='".$var_global_menu."'","modulo_sub_menu"); $w_module_organigrama = @consulta_img("menu","id='".$var_global_menu."'","modulo_organigrama"); $w_module_directorio = @consulta_img("menu","id='".$var_global_menu."'","modulo_agencia"); $w_module_correos = @consulta_img("menu","id='".$var_global_menu."'","modulo_correos"); $w_module_chart = @consulta_img("menu","id='".$var_global_menu."'","modulo_chart"); $w_module_twitter_solapa = @consulta_img("configuracion","id='1'","solapa_twitter_derecha"); $w_mostrar_formulario_contacto = @consulta_img("menu","id='".$var_global_menu."'","formulario_contacto"); $w_dep = @consulta_img("menu","id='".$var_global_menu."'","depende"); $w_pdf = @consulta_img("menu","id='".$var_global_menu."'","pdf"); $w_link_nombre = @consulta_img("menu","id='".$var_global_menu."'","link_nombre"); $w_link_completo = @consulta_img("menu","id='".$var_global_menu."'","link_completo"); $w_depende = @consulta_img("menu","id='".$w_dep."'","menu".$lang_sufix); $w_imagen_top = @consulta_img("menu","id='".$var_global_menu."'","imagen_top"); $youtube_codigo = @consulta_img("menu","id='".$var_global_menu."'","youtube_codigo"); $w_imagen_top1 = @consulta_img("menu","id='".$var_global_menu."'","imagen_top1"); if(@$id_depende > 0){ //$title_page=@consulta_img("menu","id='".$id_depende."'","menu".$lang_sufix); if(strlen($w_imagen_top) == 0) $w_imagen_top = @consulta_img("menu","id='".$id_depende."'","imagen_top"); } /*VERIFICA SI HAY NOMBRES DUPLICADOS*/ if(@$id_depende > 0 && strlen($id_cate_sm) > 0) $var_id_where_dep="where depende='".$id_depende."'"; else $var_id_where_dep="where depende is null"; $verifica_suplicado=mysql_query("SELECT menu".$lang_sufix." FROM menu ".$var_id_where_dep." GROUP BY menu".$lang_sufix." HAVING count(*) > 1"); $czx=0; while($dp_n=mysql_fetch_array($verifica_suplicado)){ $dup_n[$czx]=$dp_n["menu".$lang_sufix]; $czx++; } if(strlen($id_cate_sm) > 0) $var_directorio=modcarpetas($id_depende); @define("URL_PRINCIPAL", "http://".$_SERVER['HTTP_HOST']."/"); @define("URL_PRINCIPAL_1", "http://".$_SERVER['HTTP_HOST']); @define("URL_ADMIN", "http://".$_SERVER['HTTP_HOST']."/admin/"); @define("NAME_DOMAIN", "mida.gob.pa"); @define("MAIL_ADMIN", "yanero@gmail.com"); @define("USER_ID", $_SESSION["member_id"]); @define("NAME_SHORT_WITHOUT_SPACES_SMALL", $var_check_menu_cut); $h_1=array(" ","&","'",",","/","\"",":","#"); $h_2=array("-","and","","-","-","-","",""); $i_1=array("'",",","/","\"",":","#","-","and"); $i_2=array(""," "," "," ","",""," ","&"); function datecount($dias,$y,$m,$d){ $mes = $m; $anio = $y; $dia = $d; $ultimo_dia = date( "d", mktime(0, 0, 0, $mes + 1, 0, $anio) ) ; $dias_adelanto = $dias; $siguiente = $dia + $dias_adelanto; if ($ultimo_dia < $siguiente){ $dia_final = $siguiente - $ultimo_dia; $mes++; if ($mes == '13'){ $anio++; $mes = '01'; } $fecha_final = str_pad($anio, 4, "0", STR_PAD_LEFT).'-'.str_pad($mes, 2, "0", STR_PAD_LEFT).'-'.str_pad($dia_final, 2, "0", STR_PAD_LEFT); } else { $fecha_final = str_pad($anio, 4, "0", STR_PAD_LEFT).'-'.str_pad($mes, 2, "0", STR_PAD_LEFT).'-'.str_pad($siguiente, 2, "0", STR_PAD_LEFT); } return $fecha_final; } if(strlen($var_principal_menu)==0 || strlen($_SERVER['REQUEST_URI'])==0) $var_global_menu="1"; $hits1 = @consulta_img("menu","id='".$var_global_menu."'","hits"); $hits1=$hits1+1; @mysql_query("update menu set hits='".$hits1."' where id='".$var_global_menu."'"); ?> window.location='http://mida.gob.pa/transparencias/integridad-institucional.html';"; } if($var_global_menu==172){ echo""; } ?>