- Se crea un .htaccess y prepend.php para hacer el trabajo común.
- Se crea la configuración para Marco.
- Se crean links de prueba (sólo noticias.php tiene algo de funcionalidad).
- Se borran varios README (con el del sistema basta).
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | AI (Administrador de Intranet) |
+// +--------------------------------------------------------------------+
+// | This file is part of AI. |
+// | |
+// | AI is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | AI is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: vie jun 27 16:23:01 ART 2003 |
+// | Autor: Leandro Lucarella <llucar@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+return array (
+ // Directorios web del sistema, salvo el root, todos son opcionales.
+ // Si no se ponen, o están vacíos se asume lo que dice el comentario al lado de cada uno.
+ 'directorios' => array ('root' => '/sistemas/ai'),
+ 'titulo_sistema' => 'AI (Administrador de Intranet)',
+ 'pie_sistema' => '??????????????????????????????',
+ 'secciones' => array (
+ // Las únicas claves obligatorias son nombre, imagenComun y link
+
+ // {{{ Sección de Noticias
+ array (
+ 'nombre' => 'Noticias', // Nombre de la sección
+ 'imagenComun' => 'noticias', // Imagen común
+ 'imagenMouseOn' => '', //
+ 'imagenSelect' => '', //
+ 'link' => 'noticias', // Link de la sección
+ 'tipoMenu' => 'oculto', // Tipo del menú de hijos [vertical, horizontal, oculto]
+ 'hijos' => array ( // Hijos para el menú
+ array (
+ 'nombre' => 'Filtrar Usuario', // Nombre
+ 'link' => 'usuarios-filtrar', // Link del hijo
+ 'subhijos' => array (
+ 'sarasa1',
+ 'sarasa2',
+ 'sarasa3',
+ 'sarasa4',
+ ),
+ ),
+ ),
+ ),
+ // }}}
+
+ // {{{ Sección de Servicios
+ array (
+ 'nombre' => 'Servicios',
+ 'imagenComun' => 'servicios',
+ 'imagenMouseOn' => '',
+ 'imagenSelect' => '',
+ 'link' => 'servicios',
+ 'tipoMenu' => 'oculto',
+ ),
+ // }}}
+
+ // {{{ Sección de Sistemas
+ array (
+ 'nombre' => 'Sistemas',
+ 'imagenComun' => 'sistemas',
+ 'imagenMouseOn' => '',
+ 'imagenSelect' => '',
+ 'link' => 'sistemas',
+ 'tipoMenu' => 'oculto',
+ 'hijos' => array ( // Hijos para el menú
+ ),
+ ),
+ // }}}
+ ),
+);
+
+?>
+++ /dev/null
-Descripción de los directorios:
-===============================
-
-$Id$
-
-Archivos de configuración del sistema.
-
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | AI (Administrador de Intranet) |
+// +--------------------------------------------------------------------+
+// | This file is part of AI. |
+// | |
+// | AI is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | AI is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: vie jun 27 16:49:40 ART 2003 |
+// | Autor: Leandro Lucarella <llucar@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// Directorio raíz real del sistema.
+$ROOTDIR = '/var/www/sistemas/ai';
+
+// Agrego un include path.
+require_once 'MECON/general.php';
+prepend_include_path("$ROOTDIR/local_lib");
+
+// Uso siempre a Marco.
+require_once 'MECON/Marco.php';
+$MARCO = new Marco("$ROOTDIR/conf/Marco.php");
+#$MARCO->setEspacios(false);
+
+// Siempre le agrego una barra al costado.
+require_once 'HTML/Table.php';
+$LAYOUT = new HTML_Table(
+ array(
+ 'width' => '100%',
+ 'align' => 'center',
+ 'valign' => 'top',
+ 'border' => 0,
+ 'cellspacing' => 0,
+ 'cellpadding' => 0,
+ )
+);
+$LAYOUT->setAutoGrow(true);
+$LAYOUT->setCellAttributes(0, 0, array('width' => '1'));
+$LAYOUT->setCellAttributes(0, 1, array('width' => '10'));
+$LAYOUT->setCellContents(0, 1, ' ');
+
+?>
--- /dev/null
+php_value auto_prepend_file "/var/www/sistemas/ai/local_lib/prepend.php"
+++ /dev/null
-Descripción de los directorios:
-===============================
-
-$Id$
-
-Directorio público. Aquí se encuentra todo lo que deba ser visible desde
-el servidor web (incluyendo scripts PHP, imágenes, scripts JavaScript y
-hojas de estilo).
-
-.
-|-- css: Hojas de estilo específicas del sistema.
-|
-|-- images: Imágenes específicas del sistema.
-|
-`-- js: JavaScript específico del sistema.
-
+++ /dev/null
-Descripción de los directorios:
-===============================
-
-$Id$
-
-Hojas de estilo específicas del sistema.
-
+++ /dev/null
-Descripción de los directorios:
-===============================
-
-$Id$
-
-Imágenes específicas del sistema.
-
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | AI (Administrador de Intranet) |
+// +--------------------------------------------------------------------+
+// | This file is part of AI. |
+// | |
+// | AI is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | AI is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: vie jun 27 17:08:18 ART 2003 |
+// | Autor: Leandro Lucarella <llucar@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+$MARCO->addBody("INDEX");
+$MARCO->display();
+
+?>
+++ /dev/null
-Descripción de los directorios:
-===============================
-
-$Id$
-
-JavaScript específico del sistema.
-
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | AI (Administrador de Intranet) |
+// +--------------------------------------------------------------------+
+// | This file is part of AI. |
+// | |
+// | AI is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | AI is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: vie jun 27 17:08:18 ART 2003 |
+// | Autor: Leandro Lucarella <llucar@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+require_once 'DB.php';
+require_once 'MECON/HTML/Arbol/ArbolDB.php';
+require_once 'GrupoSecciones.php';
+
+$db = DB::connect('mysql://intranet:intranet@bal747f/intranet'); # FIXME - hacer la subclase de DB
+$dbdata = array(
+ 'db' => $db,
+ 'tabla' => 'grupo_secciones',
+ 'id' => 'grupo',
+ 'nombre' => 'nombre',
+ 'id_padre' => 'grupo_padre',
+ 'prepend_link' => 'noticias?grupo='
+);
+$arbol = new HTML_ArbolDB($dbdata, '/MECON/images/arbol_noticias.gif');
+
+if (@$_REQUEST['grupo']) {
+ $grupo = new GrupoSecciones($_REQUEST['grupo']);
+ $grupo->cargar($db);
+ $body = '';
+ foreach ($grupo as $key => $val) {
+ if (is_array($val)) {
+ $val = join(',', $val);
+ }
+ $body .= "$key = $val<BR>";
+ }
+} else {
+ $body = 'Seleccione un grupo de secciones de noticias para trabajar.';
+}
+
+$LAYOUT->setCellContents(0, 0, $arbol);
+$LAYOUT->setCellContents(0, 2, $body);
+$MARCO->addBody($LAYOUT);
+$MARCO->display();
+
+?>
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | AI (Administrador de Intranet) |
+// +--------------------------------------------------------------------+
+// | This file is part of AI. |
+// | |
+// | AI is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | AI is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: vie jun 27 17:08:18 ART 2003 |
+// | Autor: Leandro Lucarella <llucar@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+$MARCO->addBody("SERVICIOS");
+$MARCO->display();
+
+?>
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+// +--------------------------------------------------------------------+
+// | Ministerio de Economía |
+// | AI (Administrador de Intranet) |
+// +--------------------------------------------------------------------+
+// | This file is part of AI. |
+// | |
+// | AI is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published |
+// | by the Free Software Foundation; either version 2 of the License, |
+// | or (at your option) any later version. |
+// | |
+// | AI is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with Hooks; if not, write to the Free Software Foundation, |
+// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+// +--------------------------------------------------------------------+
+// | Creado: vie jun 27 17:08:18 ART 2003 |
+// | Autor: Leandro Lucarella <llucar@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+$MARCO->addBody("SISTEMAS");
+$MARCO->display();
+
+?>