1 <?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 foldmethod=marker:
2 -------------------------------------------------------------------------------
3 Ministerio de EconomÃa
5 -------------------------------------------------------------------------------
6 This file is part of agenda.
8 agenda is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2 of the License, or (at your option)
13 agenda is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License; if not,
18 write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 Boston, MA 02111-1307 USA
20 -------------------------------------------------------------------------------
21 Creado: lun ago 11 14:10:35 ART 2003
22 Autor: Martin Marrese <mmarre@mecon.gov.ar>
23 -------------------------------------------------------------------------------
25 -----------------------------------------------------------------------------*/
28 require_once 'HTML/Table.php';
29 require_once '../../../local_lib/HTML_DietMarco.php';
30 require_once 'MECON/HTML/QuickForm.php';
31 require_once 'HTML/Image.php';
32 require_once 'HTML/Link.php';
34 //CREO LOS OBJETOS NECESARIOS {{{
35 $MARCO = new HTML_DietMarco('servicios');
36 $FORM = new MECON_HTML_QuickForm('agenda', 'post', 'agenda2.php');
37 $TABLA = new HTML_Table('width="760"');
38 $IMG1 = new HTML_Image('../../images/servicios_agenda_lupa.gif');
39 $IMG2 = new HTML_Image('../../images/servicios_agenda_mail.gif');
40 $TELECO = new HTML_Image('../../images/servicios_agenda_teleco.gif');
41 $LINK_1 = new HTML_Link('mailto:teleco@mecon.gov.ar', $IMG2);
42 $LINK_2 = new HTML_Link('mailto:teleco@mecon.gov.ar', 'Consultas', array(), array ('class' => 'txt2'));
44 //OBTENER DATOS DE LAS BASES {{{
45 $EDIFICIOS = ''; //TODO llamar a la funcion estatica que me devuelva esta info
47 //AGREGO LOS ELEMENTOS AL FORM {{{
48 $header =& $FORM->addElement('header', 'comun' , $IMG1->toHtml().'Búsqueda de Internos');
49 $interno =& $FORM->addElement('text' , 'Interno' , 'Interno' , array ("size" => '10 , "maxlength" => "4"'));
50 $usuario =& $FORM->addElement('text' , 'Usuario' , 'Usuario' , array ("size" => '40'));
51 $codep =& $FORM->addElement('text' , 'Codep' , 'Codep' , array ("size" => '40', "maxlength" => "10"));
52 $dependencia =& $FORM->addElement('text' , 'Dependencia', 'Dependencia', array ("size" => '40', "value" => "--Ingrese una palabra clave--"));
53 $edificio =& $FORM->addElement('select', 'Edificio' , 'Edificio' , $EDIFICIOS, array('size' => '1'));
54 $piso =& $FORM->addElement('text' , 'Piso' , 'Piso' , array ("size" => '10', "maxlength" => "5"));
55 $oficina =& $FORM->addElement('text' , 'Oficina' , 'Oficina' , array ("size" => '10', "maxlength" => "5"));
58 $grupo[] =& HTML_QuickForm::createElement('radio', 'op1', '', 'interno');
59 $grupo[] =& HTML_QuickForm::createElement('radio', 'op1', '', 'usuario');
60 $grupo[] =& HTML_QuickForm::createElement('radio', 'op1', '', 'dependencia');
61 $grupo[] =& HTML_QuickForm::createElement('radio', 'op1', '', 'edificio');
62 $ordenar =& $FORM->addGroup($grupo, 'Ordenado por', 'Ordenado por', ' ', true);
65 $grupo2[] =& HTML_QuickForm::createElement('submit', 'aceptar' , 'Buscar');
66 $grupo2[] =& HTML_QuickForm::createElement('button', 'cancelar', 'Cancelar', array ('onClick' => 'javascript:window.location =\'sistemas\';return false;'));
67 $botones =& $FORM->addGroup($grupo2, 'botones');
70 $MARCO->addStyleSheet(PATH_RAIZ.'css/servicios_agenda.css'); //EL PROBLEMA QUE ESTO LO NECESITO PARA QUE FUNCIONE EL RENDERER NUEVO
71 $FORM->setRenderer('MECON_HTML_QuickForm_Renderer_Tabla_Servicios');
72 $FORM->setRendererOpts('width="500"');
75 $TABLA->addRow(array($LINK_1->toHtml(), $LINK_2->toHtml(), $TELECO->toHtml()));
76 $TABLA->updateColAttributes(0,'width="24"');
77 $TABLA->updateColAttributes(1,'width="60"');
78 $TABLA->updateColAttributes(2,'width="676" class="txt_derecha"');
79 $TABLA->addRow(array($FORM), 'colspan="3"');
82 $MARCO->addTitle('Agenda Telefonica');
83 $MARCO->addBodyContent($TABLA);