"; for($i=0 ; $i <= $cuenta-1; $i++){ $arreglo[]=$var1[$i]; } if($valor_cargado==""){ echo ""; for($i=0 ; $i <= $cuenta-1; $i++){ $a = $arreglo[$i]; echo ""; } echo ""; }else{ echo ""; for($i=0 ; $i <= $cuenta-1; $i++){ if($arreglo[$i]!=$valor_cargado){ echo ""; } else { echo "ssss"; } } echo ""; } } // ************************************************************************************* // IMAGENES **************************************************************************** // ************************************************************************************* function imagenes($tt2,$tt3){ $ruta="../imagenes/download/"; $ruta2="../flash/"; $blanco ="../imagenes/gifs_jpg_admin/icon_err.gif"; $img ="../imagenes/gifs_jpg_admin/imagen.gif"; $des ="../imagenes/gifs_jpg_admin/interoga.gif"; $pdf ="../imagenes/gifs_jpg_admin/pdf.gif"; $doc ="../imagenes/gifs_jpg_admin/word.gif"; $xls ="../imagenes/gifs_jpg_admin/xls.gif"; $ppt ="../imagenes/gifs_jpg_admin/ppt.gif"; $swf ="../imagenes/gifs_jpg_admin/swf.gif"; $mp3 ="../imagenes/gifs_jpg_admin/mp3.gif"; $zip ="../imagenes/gifs_jpg_admin/zip.gif"; $des ="../imagenes/gifs_jpg_admin/interoga.gif"; if ($tt2==""){ echo " No hay documento"; } else { $cad1 = explode(".",$tt2); $exte = strtolower($cad1[1]); switch ($exte) { case "gif": echo " $tt3"; break; case "jpg": echo " $tt3"; break; case "pdf": echo " $tt3"; break; case "doc": echo " $tt3"; break; case "xls": echo " $tt3"; break; case "ppt": echo " $tt3"; break; case "pps": echo " $tt3"; break; case "swf": echo " $tt3"; break; case "mp3": echo " $tt3"; break; case "zip": echo " $tt3"; break; default: echo " $tt3"; break; } } } function imagen_galeria($tt2,$tt3){ $ruta="../imagenes/galeria/"; $ruta2="../flash/"; $blanco ="../imagenes/gifs_jpg_admin/icon_err.gif"; $img ="../imagenes/gifs_jpg_admin/imagen.gif"; $des ="../imagenes/gifs_jpg_admin/interoga.gif"; $pdf ="../imagenes/gifs_jpg_admin/pdf.gif"; $doc ="../imagenes/gifs_jpg_admin/word.gif"; $xls ="../imagenes/gifs_jpg_admin/xls.gif"; $ppt ="../imagenes/gifs_jpg_admin/ppt.gif"; $swf ="../imagenes/gifs_jpg_admin/swf.gif"; $mp3 ="../imagenes/gifs_jpg_admin/mp3.gif"; $zip ="../imagenes/gifs_jpg_admin/zip.gif"; $des ="../imagenes/gifs_jpg_admin/interoga.gif"; if ($tt2==""){ echo " No hay documento"; } else { $cad1 = explode(".",$tt2); $exte = strtolower($cad1[1]); switch ($exte) { case "gif": echo " $tt3"; break; case "jpg": echo " $tt3"; break; case "mp3": echo " $tt3"; break; case "zip": echo " $tt3"; break; default: echo " $tt3"; break; } } } // ************************************************************************************* // IMAGENES **************************************************************************** // ************************************************************************************* function imagenes2($tt2,$tt3){ $ruta="../codigo_php/imagenes/download/"; $ruta2="../flash/"; $blanco ="../codigo_php/imagenes/gifs_jpg_admin/icon_err.gif"; $img ="../codigo_php/imagenes/gifs_jpg_admin/imagen.gif"; $des ="../codigo_php/imagenes/gifs_jpg_admin/interoga.gif"; $pdf ="../codigo_php/imagenes/gifs_jpg_admin/pdf.gif"; $doc ="../codigo_php/imagenes/gifs_jpg_admin/word.gif"; $xls ="../codigo_php/imagenes/gifs_jpg_admin/xls.gif"; $ppt ="../codigo_php/imagenes/gifs_jpg_admin/ppt.gif"; $swf ="../codigo_php/imagenes/gifs_jpg_admin/swf.gif"; $mp3 ="../codigo_php/imagenes/gifs_jpg_admin/mp3.gif"; $zip ="../codigo_php/imagenes/gifs_jpg_admin/zip.gif"; $des ="../codigo_php/imagenes/gifs_jpg_admin/interoga.gif"; if ($tt2==""){ echo " No hay documento"; } else { $cad1 = explode(".",$tt2); $exte = strtolower($cad1[1]); switch ($exte) { case "gif": echo " $tt3"; break; case "jpg": echo " $tt3"; break; case "pdf": echo " $tt3"; break; case "doc": echo " $tt3"; break; case "xls": echo " $tt3"; break; case "ppt": echo " $tt3"; break; case "pps": echo " $tt3"; break; case "swf": echo " $tt3"; break; case "mp3": echo " $tt3"; break; case "zip": echo " $tt3"; break; default: echo " $tt3"; break; } } } // ************************************************************************************* // IMAGENES CON RUTA ******************************************************************* // ************************************************************************************* function imagen_rut($nombre,$etiqueta,$ruta) { $ruta2="../codigo_php/imagenes/gifs_jpg_admin/"; $blanco ="icon_err.gif"; $img ="imagen.gif"; $des ="interoga.gif"; $pdf ="pdf.gif"; $doc ="word.gif"; $xls ="xls.gif"; $ppt ="ppt.gif"; $swf ="swf.gif"; $mp3 ="mp3.gif"; $zip ="zip.gif"; $des ="interoga.gif"; if ($nombre==""){ echo ""; } else { $cade1 = explode(".",$nombre); $exte = strtolower($cade1[1]); switch ($exte) { case "gif": echo " $etiqueta"; break; case "jpg": echo " $etiqueta"; break; case "pdf": echo " $etiqueta $etiqueta"; break; case "doc": echo " $etiqueta $etiqueta"; break; case "xls": echo " $etiqueta $etiqueta"; break; case "ppt": echo " $etiqueta $etiqueta"; break; case "pps": echo " $etiqueta $etiqueta"; break; case "swf": echo " $etiqueta $etiqueta"; break; case "mp3": echo " $etiqueta $etiqueta"; break; case "zip": echo " $etiqueta $etiqueta"; break; } } } // ************************************************************************************* // DOWNLOAD DE DOCUMENTOS ************************************************************** // ************************************************************************************* function descargadoc($tt2) { $ruta="../imagenes/download/"; $msn_des="No hay archivo adjunto"; $arc_des=" - Archivo desconosido"; $blanco="../imagenes/gifs_jpg_admin/no_doc.gif"; $pdf="../imagenes/gifs_jpg_admin/pdf.gif"; $doc="../imagenes/gifs_jpg_admin/word.gif"; $xls="../imagenes/gifs_jpg_admin/xls.gif"; $ppt="../imagenes/gifs_jpg_admin/ppt.gif"; $swf="../imagenes/gifs_jpg_admin/swf.gif"; $mp3="../imagenes/gifs_jpg_admin/mp3.gif"; $zip="../imagenes/gifs_jpg_admin/zip.gif"; $des="../imagenes/gifs_jpg_admin/interoga.gif"; if ($tt2==""){ echo " $msn_des";} else { $cad1 = explode(".",$tt2); $exte = strtolower($cad1[1]); switch ($exte) { case "pdf": echo " $ruta$tt2"; break; case "doc": echo " $ruta$tt2"; break; case "xls": echo " $ruta$tt2"; break; case "ppt": echo " $ruta$tt2"; break; case "pps": echo " $ruta$tt2"; break; case "swf": echo " $ruta$tt2"; break; case "mp3": echo " $ruta$tt2"; break; case "zip": echo " $ruta$tt2"; break; default: echo " $ruta$tt2$arc_des"; break; } } } // ************************************************************************************* // FECHA A ENTERO ********************************************************************** // ************************************************************************************* function fec_ent($var) { $arreglo_fe=explode("-",$var); $th=$arreglo_fe[0].$arreglo_fe[1].$arreglo_fe[2]; $th = (int)($th); return $th; } // ************************************************************************************* // TITULO CORTO ************************************************************************ // ************************************************************************************* function TituloCorto($tit_corto) { $titulo_corto = substr($tit_corto,"0","20")." ..."; echo "$titulo_corto"; } // ************************************************************************************* // TITULO CORTO CON LINK *************************************************************** // ************************************************************************************* function TituloCorto_link($tit_corto) { $titulo_corto = substr($tit_corto,"0","30")." ..."; echo "$titulo_corto"; } // ************************************************************************************* // TITULO PEQUEÑO ********************************************************************** // ************************************************************************************* function Titulopeq($tit_peq) { $tit_peq = substr($tit_peq,"0","35").".."; echo $tit_peq; } // ************************************************************************************* // TEXT AREA SIMPLE ******************************************************************** // ************************************************************************************* function textarea_simple($var) { include("variables.php"); echo "
"; } // ************************************************************************************* // TEXT AREA CON VALORES *************************************************************** // ************************************************************************************* function textarea_simple_val($var,$cols,$rows) { include("variables.php"); echo "
"; } // ************************************************************************************* // PUBLICAR **************************************************************************** // ************************************************************************************* function publicar($publi) { if ($publi=="SI"){ echo "SI publicar"; } else { echo "NO publicar"; } } // ************************************************************************************* // ICONOS DE DOCUMENTOS **************************************************************** // ************************************************************************************* function iconos($t1) { $ruta="../imagenes/download/"; $arc_des=" - Archivo desconocido"; $blanco="../imagenes/gifs_jpg_admin/no_doc.gif"; $jpg="../imagenes/gifs_jpg_admin/image.gif"; $gif="../imagenes/gifs_jpg_admin/image.gif"; $pdf="../imagenes/gifs_jpg_admin/pdf.gif"; $doc="../imagenes/gifs_jpg_admin/word.gif"; $xls="../imagenes/gifs_jpg_admin/xls.gif"; $ppt="../imagenes/gifs_jpg_admin/ppt.gif"; $swf="../imagenes/gifs_jpg_admin/swf.gif"; $mp3="../imagenes/gifs_jpg_admin/mp3.gif"; $zip="../imagenes/gifs_jpg_admin/zip.gif"; $des="../imagenes/gifs_jpg_admin/interoga.gif"; if ($t1==""){ echo "";} else { switch ($t1) { case "jpg": echo " Permite *.JPG / *.GIF "; break; case "gif": echo " Permite *.JPG / *.GIF "; break; case "pdf": echo " Permite PDF "; break; case "doc": echo " Permite DOC "; break; case "xls": echo " Permite XLS "; break; case "ppt": echo " Permite PPT "; break; case "swf": echo " Permite SWF "; break; case "mp3": echo " Permite MP3 "; break; case "zip": echo " Permite ZIP "; break; default: echo " No conocido "; break; } } } // ************************************************************************************* // NUMERACION ************************************************************************** // ************************************************************************************* function numeracion($valor,$num) { echo ""; if ($valor==""){ $valor="---";} echo ""; if (strlen($num)==1){ $tam="0".$num; echo "
$valor
$tam.-
"; }else{ echo "$num.-"; } } // ************************************************************************************* // BUSCANDO EXTENCIÓN ****************************************************************** // ************************************************************************************* function buscando_extension($exten) { $cad1= explode(".", $exten); return $cad1[1]; } // ************************************************************************************* // OBTENER MES ************************************************************************* // ************************************************************************************* function ObtenerNombreMes($Nmes) { switch ($Nmes) { case 1: return "Enero"; case 2: return "Febrero"; case 3: return "Marzo"; case 4: return "Abril"; case 5: return "Mayo"; case 6: return "Junio"; case 7: return "Julio"; case 8: return "Agosto"; case 9: return "Setiembre"; case 10: return "Octubre"; case 11: return "Noviembre"; case 12: return "Diciembre"; } } // ************************************************************************************* // MAYUSCULAS ************************************************************************** // ************************************************************************************* function mayuscula($vari) { if($vari==""){$mayus = "
"."..."."
";} else{ $mayus = "
".strtoupper($vari)."
";} return $mayus; } // ************************************************************************************* // MINUSCULAS ************************************************************************** // ************************************************************************************* function minuscula($vari) { if($vari==""){$minus = "
"."..."."
";} else{ $minus = "
".strtolower($vari)."
";} return $minus; } // ************************************************************************************* // FORMATO DE DOLARES ****************************************************************** // ************************************************************************************* function mon_uss($moneda) { $imp=printf("US$.%.2f",$moneda); return $imp; } // ************************************************************************************* // RADIO BOTON ************************************************************************* // ************************************************************************************* function radioboton($valor,$si,$no) { echo "
$si
"; echo "$no
"; } // ************************************************************************************* // RADIO BOTON EN REGISTRO ************************************************************* // ************************************************************************************* function radioboton_reg($nombre,$valor,$si,$no) { switch($valor) { case 'SI': echo "activado
"; echo "no activado"; break; case 'NO': echo "activado
"; echo "no activado"; break; } } // ************************************************************************************* // FORMATO UPLOAD ARCHIVO ************************************************************** // ************************************************************************************* function uparchivo($valor) { include("variables.php"); echo ""; } // ************************************************************************************* // DIRECCIÓN *************************************************************************** // ************************************************************************************* function direccion($via,$via_nom,$via_num,$urb,$dpto,$mz,$lte) { if ($via=="") { $via=" ";} else { $via=$via." ";} if ($via_nom=="") { $via_nom=" ";} else { $via_nom=$via_nom." ";} if ($via_num=="") { $via_num=" ";} else { $via_num=$via_num." ";} if ($urb=="") { $urb=" ";} else { $urb="- Urb.".$urb." ";} if ($dpto=="") { $dpto=" ";} else { $dpto="- Dpto.".$dpto." ";} if ($mz=="") { $mz="";} else { $mz="Mz.".$mz." ";} if ($lte=="") { $lte="";} else { $lte=" Lte.".$lte." ";} $direccion= $via.$via_nom.$via_num.$dpto.$urb; $direccion.=" ".$dist.$mz.$lte; return $direccion; } // ************************************************************************************* // funcion combo *********************************************************************** // ************************************************************************************* function combo($nombre,$cadena,$valor_cargado) { include("variables.php"); $var1=explode(",",$cadena); $cuenta=count($var1); echo ""; }else{ echo ""; for($i=0 ; $i <= $cuenta-1; $i++){ if($arreglo[$i]!=$valor_cargado){ echo ""; } else { echo "ssss"; } } echo ""; } } // ************************************************************************************* // funcion combo numerico*************************************************************** // ************************************************************************************* function combo_num($nombre,$cadena,$valor) { include("variables.php"); $var1=explode(",",$cadena); $cuenta=count($var1); echo ""; }else{ echo ""; for($i=0 ; $i <= $cuenta-1; $i++){ if($valor!=$arreglo[$i]){ echo ""; } } echo ""; } } // ************************************************************************************* // funcion textbox ********************************************************************* // ************************************************************************************* function textbox($vari,$tama,$valor,$tipo) { include("variables.php"); if ($tipo=='password'){ echo ""; }else { echo ""; } } // ************************************************************************************* // funcion textbox disabled ************************************************************ // ************************************************************************************* function textbox_disabled($vari,$tama,$valor,$tipo) { include("variables.php"); if ($tipo=='password'){ echo ""; }else { echo ""; } } // ************************************************************************************* // funcion checkbox ******************************************************************** // ************************************************************************************* function chbox($nombre,$valor,$titulo) { echo "$titulo"; } // ************************************************************************************* // funcion checkbox ******************************************************************** // ************************************************************************************* function chbox_borra($nombre,$valor) { echo ""; if ($valor==""){ echo ""; } else { echo ""; } } // ************************************************************************************* // funcion checkbox reg **************************************************************** // ************************************************************************************* function chbox_reg($nombre,$valor,$titulo) { if ($valor=="") { echo "$titulo"; } else { echo "$titulo";} } // ************************************************************************************* // *** FIN *** // ************************************************************************************** ?>"; $header_admin2=""; $img_error =""; $grabar ="../imagenes/gifs_jpg_admin/grabar.gif"; $help =""; // link *********************************************************************************************************************************** $css_interior =""; $css_interior2 =""; $btn_aceptar ="../imagenes/gifs_jpg_admin/aceptar.gif"; // arreglos ******************************************************************************************************************************* //$menu_princ_user = array ("Seudonimo", "Detalle del Usuario", "Nivel"); //$t_array_user = count($menu_princ_user); $nom_duracion="0,1,2,3,4,5,6,7,8,9"; $edad="6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90"; $nom_anno="2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,1977"; $nom_anno.=",1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1951,1950,1949,1948,1947"; $nom_anno.=",1946,1945,1944,1943,1942,1941,1940,1939,1938,1937,1936,1935,1934,1933,1932,1931,1930"; //borrar test Patrick $lan = "esp"; $cmb_n_acc="admin"; $fecha_act= date("Y-m-d"); $hora_act = date("H:i:s"); // variables generales ******************************************************************************************************************************** $color1 = "#EDF1D6"; // color fondo 2 a, bc $color2 = "#EBF6B0"; // color fondo 1 a ,bc $color3 = "#f5f5f5"; // color l $color4 = "#FFFFFF"; $color5 = "#000000"; // variables generales ******************************************************************************************************************************** $fecha_act= date("Y-m-d"); $hora_act = date("H:i:s"); $titulos= array("Archivo Nº 1","Archivo Nº 2","Archivo Nº 3","Archivo Nº 4","Archivo Nº 5","Archivo Nº 6","Archivo Nº 7","Archivo Nº 8","Archivo Nº 9","Archivo Nº 10","Distrito","Fecha","Alinear","Publicar","Detalle:"); $titulo1 ="Archivo Nº 1 "; $titulo2 ="Archivo Nº 2 "; $titulo3 ="Archivo Nº 3 "; $titulo4 ="Archivo Nº 4 "; $titulo5 ="Archivo Nº 5 "; $titulo6 ="Archivo Nº 6 "; $titulo7 ="Archivo Nº 7 "; $titulo8 ="Archivo Nº 8 "; $titulo9 ="Archivo Nº 9 "; $titulo10="Archivo Nº 10"; $titulo11="Distrito "; $titulo12="Fecha"; $titulo13="Alinear"; $titulo14="Publicar"; $titulo15="Detalle:"; //$cadena1="t1=1&t2=1&t3=1&t4=1&t5=0&t6=0&t7=0&t8=0&t9=0&t10=0&t11=0&t12=0&t13=0&t14=0&t15=1&t16=0&t17=1&t18=1"; // ************************************* TITULOS ************************************* ?> "; exit(); } if (!mysql_select_db($nombre_db,$link)) { echo ""; exit(); } return $link; } // en linea para servidor de pixel /* $nombre_host = "mysql"; $cad_usuario = "admin"; $cad_password = "123"; $nombre_db = "bd_controlpixel"; */ ?>