--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | Intranet |
+// +--------------------------------------------------------------------+
+// | This file is part of Intranet. |
+// | |
+// | Intranet is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | Intranet is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: Mon Nov 3 16:53:37 2003
+// | Autor: Gonzalo Merayo <gmeray@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id: HTML_Mensaje.php 295 2004-01-30 17:20:58Z llucar $
+//
+
+require_once 'MECON/HTML/Image.php';
+require_once 'MECON/HTML/Link.php';
+require_once 'HTML/Table.php';
+
+/**
+ * Clase para mostrar mensajes en Intranet.
+ *
+ * @access public
+ */
+class HTML_Institucional extends HTML_Table {
+ /**
+ * @var int $ancho
+ * @access private
+ */
+ var $_ancho;
+
+ /**
+ * @var string $pagina
+ * @access private
+ */
+ var $_pagina;
+
+ /**
+ * @var string $texto
+ * @access private
+ */
+ var $_texto;
+
+ /**
+ * Ancho de la ventana js que se abre.
+ *
+ * @var int $ancho_js
+ * @access private
+ */
+ var $_ancho_js;
+
+ /**
+ * Alto de la ventana js que se abre.
+ *
+ * @var int $alto_js
+ * @access private
+ */
+ var $_alto_js;
+
+ /**
+ * Constructor.
+ *
+ * @param string $pagina Ruta a la página del institucional.
+ * @param string $texto Texto del mensaje.
+ * @param int $ancho Ancho del mensaje.
+ * @param int $ancho_js Ancho de la ventana nueva.
+ * @param int $alto_js Alto de la ventana nueva.
+ *
+ * @return void
+ * @access public
+ */
+ function HTML_Institucional($pagina, $texto, $ancho = 180, $ancho_js = 500,
+ $alto_js = 400)
+ {
+ $this->_pagina = $pagina;
+ $this->_texto = $texto;
+ $this->_ancho = $ancho;
+ $this->_ancho_js = $ancho_js;
+ $this->_alto_js = $alto_js;
+ }
+
+ /**
+ * Muestra el mensaje.
+ *
+ * @return string
+ * @access public
+ */
+ function toHtml()
+ {
+ //Ajusto el ancho del mensaje
+ $ancho_msg = $this->_ancho - 48 - 48;
+
+ //Imagenes
+ $IMG_Izquierda =& new MECON_HTML_Image(
+ '/sistemas/intranet/images/institucional_izquierda.gif');
+ $IMG_Texto =& new MECON_HTML_Image(
+ '/sistemas/intranet/images/institucional_fondo.gif');
+ $IMG_Derecha =& new MECON_HTML_Image(
+ '/sistemas/intranet/images/institucional_derecha.gif');
+
+ //Armo el link
+ $attrs = 'width='. $this->_ancho_js .',height='. $this->_alto_js
+ .',screenX=50,screenY=50,scrollbars=yes';
+
+ $attribute = "window.open('". $this->_pagina ."', '', '". $attrs
+ ."');return(false);";
+ $link = new MECON_HTML_Link('', $this->_texto);
+ $link->updateAttributes(array ('onClick' => $attribute));
+
+ //Armo la tabla contenedora
+ $tabla =& new HTML_Table (
+ array(
+ 'border' => '0',
+ 'cellpadding' => '0',
+ 'cellspacing' => '0',
+ 'width' => $this->_ancho
+ )
+ );
+ $tabla->addrow(
+ array(
+ $IMG_Izquierda,
+ $link,
+ $IMG_Derecha),
+ array ('valign'=>'top')
+ );
+ $tabla->updateColAttributes(0, array('width'=>'48'));
+ $tabla->updateColAttributes(1,
+ array(
+ 'width' => $ancho_msg,
+ 'align' => 'center',
+ 'valign' => 'middle'
+ )
+ );
+ $tabla->updateColAttributes(2, array('width'=>'48'));
+ $tabla->updateCellAttributes(0, 1,
+ array(
+ 'background'=>'/sistemas/intranet/images/institucional_fondo.gif',
+ 'class'=>'institucional'
+ )
+ );
+
+ return $tabla;
+ }
+
+ /**
+ * Obtener la hoja de estilos.
+ *
+ * @return string
+ * @access public
+ */
+ function getCSS()
+ {
+ $css = '/sistemas/intranet/css/institucional.css';
+ return $css;
+ }
+
+}
+?>