grupo; } function set_grupo($valor) { //establece el valor de grupo $this->grupo = $valor; } //Cargar los datos function LoadData($file) { //Leer las líneas del fichero $lines=file($file); //Invertimos el orden del fichero para mostrar primero los ultimos usuarios creados for($i=count($lines)-1;$i>=0;$i--){ $linesinv[]=$lines[$i]; } $lines=$linesinv; $data=array(); if ($lines){ //Comprobamos que el fichero no este vacio foreach($lines as $line) $data[]=explode('###',utf8_decode(chop($line))); } return $data; } //Cargar datos desde un vector function LoadDataVect($vect) { $data=array(); if ($vect){ //Comprobamos que el vector no este vacio foreach ($vect as $key => $value) $data[]=explode('###',utf8_decode(chop($value))); } return $data; } //Cabecera de página function Header() { //Logo $this->Image('img/logo_lliurex.jpg',10,8,190,0); //Arial bold 15 $this->SetFont('Arial','B',20); //Movernos a la derecha $this->Cell(80); $this->Ln(22); $this->SetTextColor(0); if (isset($this->grupo)){ //Titulo $this->Cell(0,30,_("Group")." ".$this->grupo,0,0,'R'); $this->SetTitle(_("Group")." ".$this->grupo); }else{ //Titulo $this->Cell(0,30,_("Users created listing"),0,0,'R'); $this->SetTitle(_("Users created listing")); } //Salto de línea $this->Ln(20); } //Pie de página function Footer() { //Posición: a 1,5 cm del final $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',9); //Número de página $this->Cell(0,10,'Pag. '.$this->PageNo(),0,0,'C'); $this->Cell(0,10,date("d/m/Y H:i:s"),0,0,'R'); } //Tabla coloreada function FancyTable($header,$data) { //Colores, ancho de línea y fuente en negrita $this->SetFillColor(0,68,91); $this->SetTextColor(255); $this->SetDrawColor(0,0,0); $this->SetLineWidth(.3); $this->SetFont('','B'); //Cabecera $w=array(70,35,40,45); for($i=0;$iCell($w[$i],7,$header[$i],1,0,'C',1); $this->Ln(); //Restauración de colores y fuentes $this->SetFillColor(239,239,239); $this->SetTextColor(0); $this->SetFont(''); //Datos $fill=0; foreach($data as $row) { $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill); $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill); $this->Cell($w[2],6,$row[2],'LR',0,'L',$fill); $this->Cell($w[3],6,$row[3],'LR',0,'C',$fill); $this->Ln(); $fill=!$fill; } $this->Cell(array_sum($w),0,'','T'); } } ?>