]> git.llucax.com Git - mecon/intranet.git/blob - sistema/local_lib/HTML_Login.php
Arreglo del login
[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: xmi2code.tpl.php 1 2003-06-23 18:29:20Z gmeray $
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  * @package sistema_local_lib
40  * @access public
41  */
42 class HTML_Login extends HTML_Table {
43     // ~X2C
44
45     // +X2C Operation 172
46     /**
47      * @return void
48      * @access public
49      */
50     function HTML_Login() // ~X2C
51     {
52       parent::HTML_Table(array('bgColor'     => '#FFFFFF',
53                                'border'      => 1,
54                                'borderColor' => '#003060',
55                                'cellPadding' => 0,
56                                'cellSpacing' => 0,
57                                'width'       => 600));
58     }
59     // -X2C
60
61     // +X2C Operation 173
62     /**
63      * @return void
64      * @access public
65      */
66     function getCSS() // ~X2C
67     {
68         return "css/login.css";
69     }
70     // -X2C
71
72     // +X2C Operation 174
73     /**
74      * @return void
75      * @access public
76      */
77     function toHTML() // ~X2C
78     {
79       $int = new HTML_Table(array('border'      => 0,
80                                   'cellPadding' => 0,
81                                   'cellSpacing' => 2,
82                                   'width'       => '100%'));
83       $img = new MECON_HTML_Image('images/login_candados.gif');
84       $img2 = new MECON_HTML_Image('images/login_flechita.gif');
85       $int->addRow(array($img->toHTML().'Usuarios',
86                          $img2->toHTML().'Usuario:',
87                          '<INPUT maxLength=50 name=usuario size=10>',
88                          $img2->toHTML().'Contrasea:',
89                          '<INPUT maxLength=50 name=password size=10 type=password>'.
90                          '<INPUT value="'.@$_GET['redirect'].@$_POST['redirect'].'" name=redirect type=hidden>',
91                          '<INPUT name = Submit type=submit value=Enviar>'));
92       $int->updateColAttributes(0, array('class'   => 'titulo_tabla',
93                                          'bgColor' => '#003366'));
94       $int->updateColAttributes(1, array('class'   => 'titulo'));
95       $int->updateColAttributes(3, array('class'   => 'titulo'));
96       if(isset($this->login_incorrecto) && $this->login_incorrecto == true)
97       {
98         $login_incorrecto = new MECON_HTML_Image('images/login_incorrecto.gif');
99         $login_incorrecto = '<div align=left>'.$login_incorrecto->toHTML().'</div>';
100       }else $login_incorrecto='';
101       $this->addRow(array($int));
102       return $login_incorrecto.'<FORM ACTION = "login.php" METHOD = "POST">'.parent::toHTML().'</FORM>';
103     }
104     // -X2C
105
106 } // -X2C Class :HTML_Login
107 ?>