]> git.llucax.com Git - mecon/intranet.git/blobdiff - sistema/local_lib/HTML_Copete.php
- Le saque el XP al titulo
[mecon/intranet.git] / sistema / local_lib / HTML_Copete.php
index 3b45beff2af17add25b51f26d52345beb549629c..73802ca1756c3489f6f6fb0383824fd34175c25b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
 // +--------------------------------------------------------------------+
-// |                      Ministerio de Economía                        |
+// |                      Ministerio de Econom                        |
 // |                             Intranet                              |
 // +--------------------------------------------------------------------+
 // | This file is part of Intranet.                                    |
@@ -27,6 +27,7 @@
 // $Id: xmi2code.tpl.php 1 2003-06-23 18:29:20Z gmeray $
 //
 
+require_once 'MECON/HTML/Image.php';
 
 
 // +X2C includes
@@ -38,6 +39,18 @@ require_once 'HTML/Table.php';
  * @access public
  */
 class HTML_Copete extends HTML_Table {
+    /**
+     * @var    int $titulo
+     * @access private
+     */
+    var $titulo;
+
+    /**
+     * @var    int $seccion
+     * @access private
+     */
+    var $seccion;
+
     // ~X2C
 
     // +X2C Operation 163
@@ -48,47 +61,79 @@ class HTML_Copete extends HTML_Table {
      * @access public
      */
     function HTML_Copete($seccion) // ~X2C
+    {
+      $this->seccion = $seccion;
+    }
+    // -X2C
+
+    // +X2C Operation 169
+    /**
+     * @return void
+     * @access public
+     */
+    function getCSS() // ~X2C
+    {
+        return PATH_RAIZ."css/copete.css";
+    }
+    // -X2C
+
+    // +X2C Operation 175
+    /**
+     * @return void
+     * @access public
+     */
+    function toHTML() // ~X2C
     {
     $mapa = '<map name="intranet"
-               ><area shape="rect" coords="14,0,209,54"
-                     href="#" alt="Intranet" title="Intranet"
-              ><area shape="rect" coords="605,17,629,41"
+              ><area shape="rect" coords="686,17,710,41"
                      alt="E-mail" title="E-mail"
                      href="mailto:intranet2@mecon.gov.ar"
               ><area shape="rect" coords="645,17,669,41"
                      href="https://ldapmaster.mecon.ar/bbng/servlet/ServletDispatcher?hans=gui.FormPassUsr"
-                     alt="Cambio de Clave" title="Cambio de Clave"
-              ><area shape="rect" coords="685,17,709,41" href="#"
-                     alt="Ayuda" title="Ayuda"
-              ><area shape="rect" coords="726,17,750,41" alt="Logout"
-                     title="Logout" href="'.PATH_RAIZ.'logout.php"
-              ><area shape="poly" coords="473,19,473,43,475,45,561,45,563,43,563,19,561,17,475,17,473,19,473,19"
+                     alt="Cambio de Clave" title="Cambio de Clave" target="_blank"';
+    if(isset($_SESSION['usuario']))
+      $mapa .=   '><area shape="rect" coords="726,17,750,41" alt="Logout"
+                       title="Logout" href="'.PATH_RAIZ.'logout.php"';
+    $mapa .=   '><area shape="rect" coords="472,17,562,44"
                      href="'.PATH_RAIZ.'sistemas.php" alt="Sistemas"
                      title="Sistemas" 
-              ><area shape="poly" coords="366,19,366,43,368,45,454,45,456,43,456,19,454,17,368,17,366,19,366,19"
+              ><area shape="rect" coords="366,17,456,44"
                      href="'.PATH_RAIZ.'servicios.php" alt="Servicios"
                      title="Servicios"
-              ><area shape="poly" coords="258,20,258,44,260,46,346,46,348,44,348,20,346,18,260,18,258,20,258,20"
+              ><area shape="rect" coords="258,17,348,44"
                      href="'.PATH_RAIZ.'noticias.php"
                      alt="Noticias" title="Noticias"
             ></map>';
 
 
-parent::HTML_Table(array('width'  => '760',
+    parent::HTML_Table(array('width'  => '760',
                              'border' => '0',
                             'cellspacing' => '0',
                             'cellpadding' => '0'));
+    
     $anchos = array('12', '25', '712', '11');
     $fila = array();
     foreach($anchos as $a)
-      $fila[] = '<img src="'.PATH_RAIZ.'"images/blanco.gif" width="'.$a.'" height="1">';
+      $fila[] = '<img src="'.PATH_RAIZ.'images/blanco.gif" width="'.$a.'" height="1">';
     $this->addRow($fila);
-    $img_seccion = 'images/copete_'.$seccion.'.jpg';
+    
+    if(isset($_SESSION['usuario']))
+      $img_seccion = 'images/copete_'.$this->seccion.'_logout.jpg';
+    else
+      $img_seccion = 'images/copete_'.$this->seccion.'.jpg';
     $this->addRow(array('<img src="'.PATH_RAIZ.$img_seccion.'" width="760" height="66" border="0" usemap="#intranet">'.$mapa), array('colspan' => '4'));
+    
     $fila = array();
-    $fila[] = '<img src="'.PATH_RAIZ.'images/copete_inicio.gif" height="30" border="0">';
-    $fila[] = '<img src="'.PATH_RAIZ.'images/copete_flecha_azul.gif" height="30" border="0">';
-    switch($seccion)
+      $fila[] = new MECON_HTML_Image(PATH_RAIZ.'images/copete_inicio.gif',
+                                     null, 
+                                     array('height' => '30',
+                                           'border' => '0'));
+      $fila[] = new MECON_HTML_Image(PATH_RAIZ.'images/copete_flecha_azul.gif',
+                                     null, 
+                                     array('height' => '30',
+                                           'border' => '0'));
+/*
+    switch($this->seccion)
     {
       case 'noticias': $fila[] = 'Enlaces &uacute;tiles:
          <a href="http://www.mecon.gov.ar/" target="_blank" class="copete_TextBlue">
@@ -112,23 +157,30 @@ parent::HTML_Table(array('width'  => '760',
      case 'sistemas': $fila[] = '<span class="copete_titulo_uno">Sistemas</span>';
              break;
     }
-    $fila[] = '<img src="'.PATH_RAIZ.'images/copete_fin.gif" height="30" border="0">';
-    $this->addRow($fila, array('class' => 'copete_titulo_vinculos'));
-    {
+    */
+      $fila[] = $this->titulo;
+      $fila[] = new MECON_HTML_Image(PATH_RAIZ.'images/copete_fin.gif',
+                                     null, 
+                                     array('height' => '30',
+                                           'border' => '0'));
+      $this->addRow($fila, array('class' => 'copete_titulo_vinculos'));
+    
       for($n = 0; $n < 4; $n++)
         $this->updateCellAttributes(1, $n, array('width'=>$anchos[$n]));
-    }
+      return parent::toHTML();
     }
     // -X2C
 
-    // +X2C Operation 169
+    // +X2C Operation 176
     /**
+     * @param  int $contenido 
+     *
      * @return void
      * @access public
      */
-    function getCSS() // ~X2C
+    function setTitulo($contenido) // ~X2C
     {
-        return PATH_RAIZ."css/copete.css";
+      $this->titulo = $contenido;
     }
     // -X2C