#!/usr/bin/perl use strict; $ENV{DOCUMENT_ROOT}.='/' if $ENV{DOCUMENT_ROOT}; use Time::Local 'timelocal'; my $html; my $linea; my $check; require $ENV{DOCUMENT_ROOT}.'_adm/incs/clUsuarioEditorial.pm'; require $ENV{DOCUMENT_ROOT}.'_adm/incs/Generales.pm'; my $ref=Generales::Entrada(); my %para=%$ref; my $oEditorial=clUsuarioEditorial->new(); open (ARCHI, $ENV{DOCUMENT_ROOT}.'editoriales/tpl/tapa.htm')||print $!."- tapa.pl
\n"; while ($linea = ){ $html .= $linea; } close ARCHI; $html =Generales::sacaLineas($html); my @Row=$oEditorial->lista('','','', "tusuarioeditorial.bActivo=1"); my @RowCopy; foreach my $Puntero (@Row) { @RowCopy[int(rand 100000)]=$Puntero; } my $contador=0; my $tabla; foreach my $Puntero (@RowCopy) { if ($Puntero) { $contador++; if ($contador==1) { $tabla.=qq~~; }elsif ($contador>4) { $contador=1; $tabla.=qq~~; } my $foto; $foto=qq~ ~if $$Puntero[15]; $tabla.=qq~
"$$Puntero[1]"
[ ver catálogo ]
~; } } if ($contador==1) { $tabla.=qq~   ~ }elsif($contador==2){ $tabla.=qq~  ~ }elsif($contador==3){ $tabla.=qq~ ~ }elsif($contador==4){ $tabla.=qq~~ } $html=~ s//$tabla/gi; $html=~ s/().*()//gi; #Generales::Debug(@Row); ########################## IMPRIMISION ############################################ $html =Generales::procesarDinamico($html); $html =Generales::poneLineas($html); Generales::imprimir($html); #############################################################################################