2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
3 // +--------------------------------------------------------------------+
4 // | Ministerio de Economía |
6 // +--------------------------------------------------------------------+
7 // | This file is part of Intranet. |
9 // | Intranet is free software; you can redistribute it and/or modify |
10 // | it under the terms of the GNU General Public License as published |
11 // | by the Free Software Foundation; either version 2 of the License, |
12 // | or (at your option) any later version. |
14 // | Intranet is distributed in the hope that it will be useful, but |
15 // | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 // | General Public License for more details. |
19 // | You should have received a copy of the GNU General Public License |
20 // | along with Hooks; if not, write to the Free Software Foundation, |
21 // | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 // +--------------------------------------------------------------------+
23 // | Creado: Mon Nov 3 16:53:37 2003
24 // | Autor: Gonzalo Merayo <gmeray@mecon.gov.ar> |
25 // +--------------------------------------------------------------------+
27 // $Id: HTML_Mensaje.php 295 2004-01-30 17:20:58Z llucar $
30 require_once 'MECON/HTML/Image.php';
31 require_once 'MECON/HTML/Link.php';
32 require_once 'HTML/Table.php';
35 * Clase para mostrar mensajes en Intranet.
39 class HTML_Institucional extends HTML_Table {
59 * Ancho de la ventana js que se abre.
67 * Alto de la ventana js que se abre.
77 * @param string $pagina Ruta a la página del institucional.
78 * @param string $texto Texto del mensaje.
79 * @param int $ancho Ancho del mensaje.
80 * @param int $ancho_js Ancho de la ventana nueva.
81 * @param int $alto_js Alto de la ventana nueva.
86 function HTML_Institucional($pagina, $texto, $ancho = 180, $ancho_js = 500,
89 $this->_pagina = $pagina;
90 $this->_texto = $texto;
91 $this->_ancho = $ancho;
92 $this->_ancho_js = $ancho_js;
93 $this->_alto_js = $alto_js;
104 //Ajusto el ancho del mensaje
105 $ancho_msg = $this->_ancho - 48 - 48;
108 $IMG_Izquierda =& new MECON_HTML_Image(
109 '/sistemas/intranet/images/institucional_izquierda.gif');
110 $IMG_Texto =& new MECON_HTML_Image(
111 '/sistemas/intranet/images/institucional_fondo.gif');
112 $IMG_Derecha =& new MECON_HTML_Image(
113 '/sistemas/intranet/images/institucional_derecha.gif');
116 $attrs = 'width='. $this->_ancho_js .',height='. $this->_alto_js
117 .',screenX=50,screenY=50,scrollbars=yes';
119 $attribute = "window.open('". $this->_pagina ."', '', '". $attrs
120 ."');return(false);";
121 $link = new MECON_HTML_Link('', $this->_texto);
122 $link->updateAttributes(array ('onClick' => $attribute));
124 //Armo la tabla contenedora
125 $tabla =& new HTML_Table (
128 'cellpadding' => '0',
129 'cellspacing' => '0',
130 'width' => $this->_ancho
138 array ('valign'=>'top')
140 $tabla->updateColAttributes(0, array('width'=>'48'));
141 $tabla->updateColAttributes(1,
143 'width' => $ancho_msg,
148 $tabla->updateColAttributes(2, array('width'=>'48'));
149 $tabla->updateCellAttributes(0, 1,
151 'background'=>'/sistemas/intranet/images/institucional_fondo.gif',
152 'class'=>'institucional'
156 return $tabla->toHtml();
160 * Obtener la hoja de estilos.
167 $css = '/sistemas/intranet/css/institucional.css';