X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/5c4a90780e6b44a93909ce459cfb8814d66c3a23..d04684a5f579cabd2a28c49e51324f72f6064712:/sistema/www/noticias.php?ds=sidebyside diff --git a/sistema/www/noticias.php b/sistema/www/noticias.php index 81c9931..de4e37c 100644 --- a/sistema/www/noticias.php +++ b/sistema/www/noticias.php @@ -1,27 +1,42 @@ - - display(); - $noticias = new HTML_Table(array('width' => '760', 'border' => '0')); + require_once '../local_lib/HTML_DietMarco.php'; require_once '../local_lib/intranetdb.php'; - require_once 'MECON/HTML/Arbol/ArbolDB.php'; + require_once 'MECON/HTML/ArbolDB.php'; + require_once '../local_lib/HTML_Titulares.php'; + + $m = new HTML_DietMarco('noticias'); + $m->addTitle('Noticias'); + + $noticias = new HTML_Table(array('width' => '760', 'border' => '0')); + if(isset($_GET['grupo'])) + { + $grupo = $_GET['grupo']; + $dias = null; + } + else + { + $grupo = null; + $dias = 7; + } + //Esto va a cambiar... $db = IntranetDB::connect(); $dbdata = array( 'db' => $db, 'tabla' => 'grupo_secciones', 'id' => 'grupo', + 'id_activo' => $grupo, 'nombre' => 'nombre', 'id_padre' => 'grupo_padre', 'prepend_link' => 'noticias.php?grupo='); - $arbol = new HTML_ArbolDB($dbdata, '/MECON/images/arbol_noticias.gif'); + $arbol = new MECON_HTML_ArbolDB($dbdata, 'NOTICIAS'); - require_once '../local_lib/HTML_Titulares.php'; - $titulares = new HTML_Titulares(null, 7); + $titulares = new HTML_Titulares($grupo, $dias); $noticias->addRow(array($arbol,$titulares)); + $m->addStyleSheet($arbol->getCSS()); + $m->addStyleSheet($titulares->getCSS()); $noticias->updateCellAttributes(0, 0, array('valign'=>'top', 'width'=>'160')); - $noticias->updateCellAttributes(0, 1, array('width'=>'600')); - $noticias->display(); + $noticias->updateCellAttributes(0, 1, array('valign'=>'top', 'width'=>'600')); + + $m->addBodyContent($noticias); + $m->display(); ?> -