]> git.llucax.com Git - mecon/intranet.git/blob - sistema/local_lib/HTML_Login.php
Se realizan correcciones varias derivadas del primer testing.
[mecon/intranet.git] / sistema / local_lib / HTML_Login.php
1 <?php
2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
3 // +--------------------------------------------------------------------+
4 // |                      Ministerio de Econom�                        |
5 // |                             Intranet                              |
6 // +--------------------------------------------------------------------+
7 // | This file is part of Intranet.                                    |
8 // |                                                                    |
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.                             |
13 // |                                                                    |
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.                           |
18 // |                                                                    |
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 Aug 4 17:33:07 2003                                   |
24 // | Autor:  Gonzalo Merayo <gmeray@mecon.gov.ar>                                                    |
25 // +--------------------------------------------------------------------+
26 //
27 // $Id$
28 //
29
30
31 require_once 'MECON/HTML/Image.php';
32
33 // +X2C includes
34 require_once 'HTML/Table.php';
35 // ~X2C
36
37 // +X2C Class 171 :HTML_Login
38 /**
39  * @access public
40  */
41 class HTML_Login extends HTML_Table {
42     // ~X2C
43
44     // +X2C Operation 172
45     /**
46      * @return void
47      * @access public
48      */
49     function HTML_Login() // ~X2C
50     {
51       parent::HTML_Table(array('bgColor'     => '#FFFFFF',
52                                'border'      => 1,
53                                'borderColor' => '#003060',
54                                'cellPadding' => 0,
55                                'cellSpacing' => 0,
56                                'width'       => 600));
57     }
58     // -X2C
59
60     // +X2C Operation 173
61     /**
62      * @return void
63      * @access public
64      */
65     function getCSS() // ~X2C
66     {
67         return "/sistemas/intranet/css/login.css";
68     }
69     // -X2C
70
71     // +X2C Operation 174
72     /**
73      * @return void
74      * @access public
75      */
76     function toHTML() // ~X2C
77     {
78       $int = new HTML_Table(array('border'      => 0,
79                                   'cellPadding' => 0,
80                                   'cellSpacing' => 2,
81                                   'width'       => '100%'));
82       $img = new MECON_HTML_Image('/sistemas/intranet/images/login_candados.gif');
83       $img2 = new MECON_HTML_Image('/sistemas/intranet/images/login_flechita.gif');
84       $int->addRow(array($img->toHTML().'Usuarios',
85                          $img2->toHTML().'Usuario@organismo:',
86                          '<INPUT maxLength=50 name=usuario size=10>',
87                          $img2->toHTML().'Contrase&ntilde;a:',
88                          '<INPUT maxLength=50 name=password size=10 type=password>'.
89                          '<INPUT value="'.@$_GET['redirect'].@$_POST['redirect'].'" name=redirect type=hidden>',
90                          '<INPUT name = Submit type=submit value=Enviar>'));
91       $int->updateColAttributes(0, array('class'   => 'titulo_tabla',
92                                          'bgColor' => '#003366'));
93       $int->updateColAttributes(1, array('class'   => 'titulo'));
94       $int->updateColAttributes(3, array('class'   => 'titulo'));
95       if(isset($this->login_incorrecto) && $this->login_incorrecto == true)
96       {
97         $login_incorrecto = new MECON_HTML_Image('/sistemas/intranet/images/login_incorrecto.gif');
98         $login_incorrecto = '<div align=left>'.$login_incorrecto->toHTML().'</div>';
99       }else $login_incorrecto='';
100       $this->addRow(array($int));
101       return $login_incorrecto.'<FORM ACTION = "login" METHOD = "POST">'.parent::toHTML().'</FORM>';
102     }
103     // -X2C
104
105 } // -X2C Class :HTML_Login
106 ?>