<XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
</XMI.header>
<XMI.content>
- <docsettings viewid="412" documentation="" uniqueid="533" />
+ <docsettings viewid="412" documentation="" uniqueid="536" />
<umlobjects>
<UML:Class stereotype="" package="AI_Local" xmi.id="503" abstract="0" documentation="Base de datos del Administrador de Intranet." name="AI_DB" static="0" scope="200" >
<UML:Operation stereotype="" package="" xmi.id="506" type="&mixed" abstract="0" documentation="" name="connect" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="3" value="''" type="string" abstract="0" documentation="Postfijo del archivo." name="append" static="0" scope="200" />
</UML:Operation>
</UML:Class>
+ <UML:Class stereotype="" package="MECON" xmi.id="534" abstract="0" documentation="x2c:external
+x2c:include:MECON/HTML/Arbol/ArbolDB.php" name="HTML_ArbolDB" static="0" scope="200" />
+ <UML:Class stereotype="" package="AI_Local" xmi.id="535" abstract="0" documentation="Arbol para generar los menúes." name="AI_Arbol" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="536" type="void" abstract="0" documentation="Constructor." name="AI_Arbol" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="mixed" abstract="0" documentation="Objeto del cual generar el árbol. Puede ser AI_GrupoSecciones, AI_Servicio o AI_Sistema." name="objeto" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="3" value="" type="&DB" abstract="0" documentation="Base de datos de donde sacar los datos para el árbol." name="db" static="0" scope="200" />
+ </UML:Operation>
+ </UML:Class>
</umlobjects>
<diagrams>
<diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="412" documentation="" type="402" showops="1" showpackage="0" name="Clases" localid="30000" showstereotype="0" showscope="1" font="Helvetica,8,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
<widgets>
- <UML:ConceptWidget usesdiagramfillcolour="0" width="210" showattsigs="601" usesdiagramusefillcolour="0" x="23" linecolour="#ff0000" y="100" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="35" usefillcolor="1" showattributes="1" xmi.id="503" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="46" showattsigs="601" usesdiagramusefillcolour="0" x="105" linecolour="#ff0000" y="30" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="24" usefillcolor="1" showattributes="0" xmi.id="504" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="358" showattsigs="601" usesdiagramusefillcolour="0" x="250" linecolour="#ff0000" y="100" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="49" usefillcolor="1" showattributes="1" xmi.id="507" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="146" showattsigs="601" usesdiagramusefillcolour="0" x="356" linecolour="#ff0000" y="30" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="24" usefillcolor="1" showattributes="0" xmi.id="508" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="0" width="410" showattsigs="601" usesdiagramusefillcolour="0" x="81" linecolour="#ff0000" y="183" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="35" usefillcolor="1" showattributes="1" xmi.id="532" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="210" showattsigs="601" usesdiagramusefillcolour="0" x="20" linecolour="#ff0000" y="109" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" xmi.id="503" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="46" showattsigs="601" usesdiagramusefillcolour="0" x="102" linecolour="#ff0000" y="30" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="23" usefillcolor="1" showattributes="0" xmi.id="504" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="358" showattsigs="601" usesdiagramusefillcolour="0" x="263" linecolour="#ff0000" y="96" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="45" usefillcolor="1" showattributes="1" xmi.id="507" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="146" showattsigs="601" usesdiagramusefillcolour="0" x="369" linecolour="#ff0000" y="30" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="23" usefillcolor="1" showattributes="0" xmi.id="508" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="410" showattsigs="601" usesdiagramusefillcolour="0" x="211" linecolour="#ff0000" y="170" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" xmi.id="532" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="91" showattsigs="601" usesdiagramusefillcolour="0" x="88" linecolour="#ff0000" y="170" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="23" usefillcolor="1" showattributes="0" xmi.id="534" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="226" showattsigs="601" usesdiagramusefillcolour="0" x="20" linecolour="#ff0000" y="240" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" xmi.id="535" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
</widgets>
<messages/>
<associations>
<UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="508" widgetaid="507" documentation="" type="500" >
<linepath>
- <startpoint startx="429" starty="100" />
- <endpoint endx="429" endy="54" />
+ <startpoint startx="442" starty="96" />
+ <endpoint endx="442" endy="53" />
</linepath>
</UML:AssocWidget>
<UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="504" widgetaid="503" documentation="" type="500" >
<linepath>
- <startpoint startx="128" starty="100" />
- <endpoint endx="128" endy="54" />
+ <startpoint startx="125" starty="109" />
+ <endpoint endx="125" endy="53" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="534" widgetaid="535" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="133" starty="240" />
+ <endpoint endx="133" endy="193" />
</linepath>
</UML:AssocWidget>
</associations>
<listitem open="1" type="800" id="-1" label="Views" >
<listitem open="1" type="801" id="-1" label="Logical View" >
<listitem open="1" type="803" id="-1" label="AI Local" >
+ <listitem open="0" type="813" id="535" label="AI_Arbol" >
+ <listitem open="0" type="815" id="536" label="AI_Arbol" />
+ </listitem>
<listitem open="0" type="813" id="503" label="AI_DB" >
<listitem open="0" type="815" id="506" label="connect" />
</listitem>
</listitem>
<listitem open="0" type="807" id="412" label="Clases" />
<listitem open="0" type="803" id="-1" label="Externo" >
+ <listitem open="1" type="813" id="534" label="HTML_ArbolDB" />
<listitem open="1" type="813" id="504" label="DB" />
<listitem open="1" type="813" id="508" label="MECON_HTML_QuickForm" />
</listitem>
<listitem open="0" type="814" id="517" label="conf" />
<listitem open="0" type="815" id="521" label="guardar" />
</listitem>
- <listitem open="1" type="813" id="524" label="AI_DBTreeObject" >
+ <listitem open="0" type="813" id="524" label="AI_DBTreeObject" >
<listitem open="0" type="815" id="526" label="AI_DBTreeObject" />
<listitem open="0" type="815" id="529" label="borrar" />
<listitem open="0" type="815" id="527" label="cargarHijos" />
<listitem open="0" type="815" id="470" label="AI_Error" />
<listitem open="0" type="815" id="530" label="isError" />
</listitem>
- <listitem open="1" type="813" id="486" label="AI_GrupoSecciones" >
+ <listitem open="0" type="813" id="486" label="AI_GrupoSecciones" >
<listitem open="0" type="815" id="495" label="AI_GrupoSecciones" />
<listitem open="0" type="814" id="492" label="antiguedad" />
<listitem open="0" type="815" id="498" label="borrar" />
<listitem open="0" type="814" id="488" label="nombre" />
<listitem open="0" type="814" id="491" label="secciones" />
</listitem>
- <listitem open="1" type="813" id="413" label="AI_Servicio" >
+ <listitem open="0" type="813" id="413" label="AI_Servicio" >
<listitem open="0" type="815" id="465" label="AI_Servicio" />
<listitem open="0" type="814" id="433" label="descripcion" />
<listitem open="0" type="815" id="458" label="guardar" />
<listitem open="0" type="814" id="428" label="servicio" />
<listitem open="0" type="814" id="452" label="servicio_padre" />
</listitem>
- <listitem open="1" type="813" id="416" label="AI_Sistema" >
+ <listitem open="0" type="813" id="416" label="AI_Sistema" >
<listitem open="0" type="815" id="466" label="AI_Sistema" />
<listitem open="0" type="815" id="536" label="cargar" />
<listitem open="0" type="814" id="514" label="descripcion" />
--- /dev/null
+<?php
+// vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
+// +--------------------------------------------------------------------+
+// | 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: Mon Jul 28 13:52:40 2003 |
+// | Autor: Leandro Lucarella <llucar@mecon.gov.ar> |
+// +--------------------------------------------------------------------+
+//
+// $Id$
+//
+
+// +X2C includes
+require_once 'MECON/HTML/Arbol/ArbolDB.php';
+// ~X2C
+
+// +X2C Class 535 :AI_Arbol
+/**
+ * Arbol para generar los menes.
+ *
+ * @package AI_Local
+ * @access public
+ */
+class AI_Arbol extends HTML_ArbolDB {
+ // ~X2C
+
+ // +X2C Operation 536
+ /**
+ * Constructor.
+ *
+ * @param mixed $objeto Objeto del cual generar el ?bol. Puede ser AI_GrupoSecciones, AI_Servicio o AI_Sistema.
+ * @param DB &$db Base de datos de donde sacar los datos para el ?bol.
+ *
+ * @return void
+ * @access public
+ */
+ function AI_Arbol($objeto, &$db) // ~X2C
+ {
+ switch (get_class($objeto)) {
+ case 'ai_gruposecciones':
+ $tipo = 'grupo';
+ $titulo = 'NOTICIAS';
+ $tabla = 'grupo_secciones';
+ break;
+ case 'ai_servicio':
+ $tipo = 'servicio';
+ $titulo = 'SERVICIOS';
+ $tabla = $tipo;
+ break;
+ case 'ai_sistema':
+ $tipo = 'sistema';
+ $titulo = 'SISTEMAS';
+ $tabla = $tipo;
+ break;
+ }
+ $dbdata = array(
+ 'db' => &$db,
+ 'tabla' => $tabla,
+ 'id' => $tipo,
+ 'nombre' => 'nombre',
+ 'order' => 'asc',
+ 'id_activo' => $objeto->$tipo,
+ );
+ if ($tipo == 'grupo' or $tipo == 'servicio') {
+ $dbdata['id_padre'] = $tipo . '_padre';
+ } elseif ($tipo == 'sistema') { // FIXME - horrible!!!
+ $dbdata =
+ array(
+ 'tabla' => "intranet.$tabla as A, samurai.sistema as S",
+ 'id' => "A.$tipo",
+ 'nombre' => 'S.nombre_sistema',
+ 'where' => 'S.id_sistema = A.sistema AND S.estado = 1',
+ )
+ + $dbdata;
+ }
+ parent::HTML_ArbolDB($dbdata, $titulo, $tipo.'?accion='.AI_MODIF.'&id=');
+ }
+ // -X2C
+
+} // -X2C Class :AI_Arbol
+
+?>
\ No newline at end of file
$require = 'AI/GrupoSecciones.php';
$tabla = 'grupo_secciones';
$nombre = "grupo de secciones";
- $arbol = 'NOTICIAS';
} elseif ($tmp == 'servicio') {
$tipo = $tmp;
$clase = 'AI_Servicio';
$require = 'AI/Servicio.php';
$tabla = $tipo;
$nombre = $tipo;
- $arbol = 'SERVICIOS';
} elseif ($tmp == 'sistema') {
$tipo = $tmp;
$clase = 'AI_Sistema';
$require = 'AI/Sistema.php';
$tabla = $tipo;
$nombre = $tipo;
- $arbol = 'SISTEMAS';
} else { // No hay un objeto válido para administrar.
header('Location: '.$_SERVER['SCRIPT_NAME']);
}
// }}}
// Creo el árbol con el tipo de objeto que manejo y lo agrego a la página. {{{
- require_once 'MECON/HTML/Arbol/ArbolDB.php';
- $dbdata = array(
- 'db' => &$db,
- 'tabla' => $tabla,
- 'id' => $tipo,
- 'nombre' => 'nombre',
- 'order' => 'asc',
- );
- // Activo el id del objeto que estamos modificando.
- if ($accion & (AI_BAJA | AI_MODIF)) {
- $dbdata['id_activo'] = $obj->$tipo;
- }
- if ($tipo == 'grupo' or $tipo == 'servicio') {
- $dbdata['id_padre'] = $tipo . '_padre';
- } elseif ($tipo == 'sistema') { // FIXME - horrible!!!
- $dbdata =
- array(
- 'tabla' => "intranet.$tabla as A, samurai.sistema as S",
- 'id' => "A.$tipo",
- 'nombre' => 'S.nombre_sistema',
- 'where' => 'S.id_sistema = A.sistema AND S.estado = 1',
- )
- + $dbdata;
- }
- $arbol = new HTML_ArbolDB($dbdata, $arbol, $tipo.'?accion='.AI_MODIF.'&id=');
+ require_once 'AI/Arbol.php';
+ $arbol = new AI_Arbol($obj, $db);
// }}}
// Inicio el formulario, cargando datos de ser necesario. {{{