include("includes/session.php"); require_once("includes/conexion.php"); function mayus($a){ $a=str_replace("á","á",$a); $a=str_replace("Á","Á",$a); $a=str_replace("é","é",$a); $a=str_replace("É","É",$a); $a=str_replace("í","í",$a); $a=str_replace("Í","Í",$a); $a=str_replace("ó","ó",$a); $a=str_replace("Ó","Ó",$a); $a=str_replace("ú","ú",$a); $a=str_replace("Ú","Ú",$a); $a=str_replace("ñ","ñ",$a); $a=str_replace("Ñ","Ñ",$a); strtoupper($a); return $a; } function crearEtiqueta($eti,$fi,$ff){ global $conexion; if ($fi!=""){ $fl=explode("/",$fi); $fi=$fl[2]."-".$fl[1]."-".$fl[0]; } if ($ff!=""){ $fg=explode("/",$ff); $ff=$fg[2]."-".$fg[1]."-".$fg[0]; } if($eti!=""){ $ssql="id_usuario='".$eti."'"; }else{ $ssql="1=1"; } if(($fi!="" and $ff!="")){ $ssql=" fecha_confirmacion BETWEEN '".$fi." 00:00:00' AND '".$ff."-23:59:59'"; } $sql="SELECT * FROM usuarios WHERE ".$ssql." ORDER BY apellido_p, apellido_s, nombre"; $query=mysql_query($sql,$conexion); $salto=1; while($d=mysql_fetch_array($query)){ ?>
echo mayus($d["nombre"]); ?>
echo mayus($d["apellido_p"])." ".mayus($d["apellido_s"]);?>
echo mayus($d["organizacion"]);?>