#!/usr/bin/perl
use strict;
use CGI::Carp "fatalsToBrowser";
$ENV{DOCUMENT_ROOT}.='/' if $ENV{DOCUMENT_ROOT};
use Time::Local 'timelocal';
my $html;
my $linea;
my $check;
require $ENV{DOCUMENT_ROOT}.'_adm/incs/clBase.pm';
require $ENV{DOCUMENT_ROOT}.'_adm/incs/DestacadosNoticiaCVs.pm';
require $ENV{DOCUMENT_ROOT}.'_adm/incs/Generales.pm';
my $ref=Generales::Entrada();
my %para=%$ref;
my $idTapa_sec;
my $nombreTapa_sec;
my @Notas;
my $hoy = time;
my $oNoticiaCV;
my $Puntero;
my $oBase = clBase->new();
######################################################################
open (ARCHI, $ENV{DOCUMENT_ROOT}.'cvirtual/noticias/tpl/noticias.htm')||print $!."- noticias.pl
\n";
while ($linea = ){
$html .= $linea;
}
close ARCHI;
$html =Generales::sacaLineas($html);
my @NoticiaCVs = $oBase->Seleccionar(qq~SELECT idNoticiaCV FROM tnoticiaCV WHERE
isPub=2
AND cTapa!='2'
ORDER BY cOrden
~);
foreach $Puntero (@NoticiaCVs){
my $nota=$$Puntero[0];
$html = DestacadosNoticiaCVs::New($html, $nota);
}
$html=~ s/.*//;
########################## IMPRIMISION ############################################
$html =Generales::procesarDinamico($html);
$html =Generales::poneLineas($html);
Generales::imprimir($html);
#############################################################################################