]> git.llucax.com Git - mecon/samurai.git/commitdiff
Cambios. No se utiliza mas $_SESSION[samurai][id_sistema] desde dentro de las libreri...
authorMartín Marrese <marrese@gmail.com>
Tue, 16 Sep 2003 16:13:18 +0000 (16:13 +0000)
committerMartín Marrese <marrese@gmail.com>
Tue, 16 Sep 2003 16:13:18 +0000 (16:13 +0000)
doc/uml/Samurai.xmi
lib/SAMURAI/Perfil.php
lib/SAMURAI/Sistema.php
lib/SAMURAI/Usuario.php
sistema/www/perfiles/perfiles-abm.php
sistema/www/perfiles/perfiles-datos.php
sistema/www/usuarios/usuarios-abm.php
sistema/www/usuarios/usuarios-datos.php

index c52f11aa08dc2bc99866f8c48f1eb3079565572d..f1776927a37a27b824d1281ec6ccdc2ab16a2a1d 100644 (file)
@@ -6,16 +6,17 @@
    <XMI.exporterVersion>1.1.5</XMI.exporterVersion>
    <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
   </XMI.documentation>
-  <XMI.model xmi.name="Samurai" href="/home/luca/public_html/samurai/doc/uml/Samurai.xmi" />
+  <XMI.model xmi.name="Samurai" href="/home/martin/public_html/samurai/doc/uml/Samurai.xmi" />
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
-  <docsettings viewid="336" documentation="" uniqueid="391" />
+  <docsettings viewid="336" documentation="" uniqueid="394" />
   <umlobjects>
    <UML:Class stereotype="" package="" xmi.id="207" abstract="0" documentation="Clase para el manejo de los usuarios." name="SAMURAI_Usuario" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="216" type="void" abstract="0" documentation="Constructor.Recibe como parametro opcional el login del usuario. y busca en la base la informacion referida a el." name="SAMURAI_Usuario" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="2" value="" type="&amp;SAMURAI_DB" abstract="0" documentation="Objeto conexion." name="db" static="0" scope="200" />
      <UML:Parameter stereotype="" package="" xmi.id="3" value="null" type="string" abstract="0" documentation="Login del usuario" name="login" static="0" scope="200" />
+     <UML:Parameter stereotype="" package="" xmi.id="4" value="null" type="int" abstract="0" documentation="Identificador del sistema en el cual se esta trabajando" name="idSistema" static="0" scope="201" />
     </UML:Operation>
     <UML:Operation stereotype="" package="" xmi.id="365" type="array(string)" abstract="0" documentation="Devuleve un array con los login's de los usuarios asociados al sistema" name="getLoginUsuarios" static="1" scope="202" >
      <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;SAMURAI_DB" abstract="0" documentation="Base de Datos" name="db" static="0" scope="200" />
@@ -54,11 +55,13 @@ x2c: get set" name="nombre" static="0" scope="202" />
     <UML:Attribute stereotype="" package="" xmi.id="273" value="" type="SAMURAI_DB" abstract="0" documentation="Objeto Samurai_DB" name="db" static="0" scope="202" />
     <UML:Attribute stereotype="" package="" xmi.id="369" value="" type="array(int)" abstract="0" documentation="Array con los identificadores de los perfiles asociados a un usuario
 x2c:get set" name="perfiles" static="0" scope="202" />
+    <UML:Attribute stereotype="" package="" xmi.id="394" value="" type="int" abstract="0" documentation="Identificador del sistema en el cual se esta trabajando." name="idSistema" static="0" scope="202" />
    </UML:Class>
    <UML:Class stereotype="" package="" xmi.id="208" abstract="0" documentation="Clase para el manejo de los perfies." name="SAMURAI_Perfil" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="229" type="void" abstract="0" documentation="Constructor. Si recibe un identificador como parametro, busca la informacion en la base. " name="SAMURAI_Perfil" static="0" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="2" value="" type="&amp;SAMURAI_DB" abstract="0" documentation="Objeto conexion" name="db" static="0" scope="200" />
      <UML:Parameter stereotype="" package="" xmi.id="3" value="null" type="int" abstract="0" documentation="Identificador del perfil." name="id" static="0" scope="200" />
+     <UML:Parameter stereotype="" package="" xmi.id="4" value="null" type="int" abstract="0" documentation="Identificador del sistema en el que se esta trabajando" name="idSistema" static="0" scope="201" />
     </UML:Operation>
     <UML:Operation stereotype="" package="" xmi.id="360" type="bool" abstract="0" documentation="Valida la existencia de una asociacion entre el perfil y el sistema seleccionado. Devuelve true si existe y false en caso contraro." name="existeAsociacion" static="1" scope="200" >
      <UML:Parameter stereotype="" package="" xmi.id="3" value="" type="SAMURAI_DB" abstract="0" documentation="Base de Datos" name="db" static="0" scope="200" />
@@ -104,6 +107,7 @@ x2c: get set" name="tipo" static="0" scope="202" />
 x2c: get set" name="responsable" static="0" scope="202" />
     <UML:Attribute stereotype="" package="" xmi.id="361" value="" type="array(int)" abstract="0" documentation="Array con los permisos asignados al perfil. Solo se cargan cuando se esta trabajando con el abm puesto que varian segun cada sistema.
 x2c: get set" name="permisos" static="0" scope="201" />
+    <UML:Attribute stereotype="" package="" xmi.id="392" value="" type="int" abstract="0" documentation="Identificador del sistema en el cual se esta trabajando" name="idSistema" static="0" scope="202" />
    </UML:Class>
    <UML:Class stereotype="" package="" xmi.id="209" abstract="0" documentation="Clase para el manejo de los sistemas." name="SAMURAI_Sistema" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="243" type="void" abstract="0" documentation="Constructor. Si recibe como parametro el identificador busca en la DB los datos. " name="SAMURAI_Sistema" static="0" scope="200" >
@@ -195,8 +199,7 @@ x2c: get set" name="permisos" static="0" scope="201" />
     <UML:Attribute stereotype="" package="" xmi.id="272" value="" type="SAMURAI_DB" abstract="0" documentation="Objeto Samurai_DB" name="db" static="0" scope="202" />
     <UML:Attribute stereotype="" package="" xmi.id="289" value="" type="string" abstract="0" documentation="Login del responsable de los ultimos cambios del sistema." name="responsable" static="0" scope="202" />
     <UML:Attribute stereotype="" package="" xmi.id="300" value="" type="array" abstract="0" documentation="Array asociativo (id - descripcion) con los permisos asociados al sistema." name="permisos" static="0" scope="202" />
-    <UML:Attribute stereotype="" package="" xmi.id="310" value="" type="array" abstract="0" documentation="Array con los permisos asociados al sistema
-x2c:get set" name="asociaciones" static="0" scope="202" />
+    <UML:Attribute stereotype="" package="" xmi.id="310" value="" type="array" abstract="0" documentation="" name="asociaciones" static="0" scope="202" />
    </UML:Class>
    <UML:Class stereotype="" package="" xmi.id="210" abstract="0" documentation="Clase para el manejo de los Permisos." name="SAMURAI_Permiso" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="259" type="void" abstract="0" documentation="Constructor. Si recibe como parametro el identificador del permiso, busca la informacion en la DB." name="SAMURAI_Permiso" static="0" scope="200" >
@@ -268,14 +271,14 @@ x2c:set" name="sistema" static="0" scope="202" />
    <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="500" rolea="265" roleb="264" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
   </umlobjects>
   <diagrams>
-   <diagram snapgrid="1" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="911" snapy="10" showatts="1" xmi.id="206" documentation="" type="402" showops="1" showpackage="0" name="Clases y Relaciones" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,12,-1,5,48,0,0,0,0,0" linecolor="#ff0000" canvasheight="648" >
+   <diagram snapgrid="1" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="911" snapy="10" showatts="1" xmi.id="206" documentation="" type="402" showops="1" showpackage="0" name="Clases y Relaciones" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="helvetica,4,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="644" >
     <widgets>
-     <UML:ClassWidget usesdiagramfillcolour="0" width="157" showattsigs="601" usesdiagramusefillcolour="0" x="750" linecolour="#ff0000" y="290" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="234" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="207" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="110" showattsigs="601" usesdiagramusefillcolour="0" x="640" linecolour="#ff0000" y="10" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="273" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="208" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="148" showattsigs="601" usesdiagramusefillcolour="0" x="200" linecolour="#ff0000" y="10" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="585" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="209" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="118" showattsigs="601" usesdiagramusefillcolour="0" x="480" linecolour="#ff0000" y="310" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="195" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="210" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="35" showattsigs="601" usesdiagramusefillcolour="0" x="490" linecolour="#ff0000" y="10" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#d5d5cf" height="25" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="264" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="79" showattsigs="601" usesdiagramusefillcolour="0" x="480" linecolour="#ff0000" y="120" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="265" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="157" showattsigs="601" usesdiagramusefillcolour="0" x="750" linecolour="#ff0000" y="290" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="266" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="207" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="110" showattsigs="601" usesdiagramusefillcolour="0" x="640" linecolour="#ff0000" y="10" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="308" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="208" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="148" showattsigs="601" usesdiagramusefillcolour="0" x="200" linecolour="#ff0000" y="10" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="630" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="209" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="118" showattsigs="601" usesdiagramusefillcolour="0" x="480" linecolour="#ff0000" y="310" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="210" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="210" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="35" showattsigs="601" usesdiagramusefillcolour="0" x="490" linecolour="#ff0000" y="10" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#d5d5cf" height="28" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="264" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="79" showattsigs="601" usesdiagramusefillcolour="0" x="480" linecolour="#ff0000" y="120" showopsigs="600" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="35" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="265" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
     </widgets>
     <messages/>
     <associations>
@@ -285,7 +288,7 @@ x2c:set" name="sistema" static="0" scope="202" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
        <startpoint startx="506" starty="120" />
-       <endpoint endx="507" endy="35" />
+       <endpoint endx="507" endy="38" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="3" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="210" roleBdoc="" widgetaid="265" roleAdoc="" documentation="" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
@@ -297,7 +300,7 @@ x2c:set" name="sistema" static="0" scope="202" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
-       <startpoint startx="506" starty="152" />
+       <startpoint startx="506" starty="155" />
        <endpoint endx="539" endy="310" />
       </linepath>
      </UML:AssocWidget>
@@ -310,47 +313,47 @@ x2c:set" name="sistema" static="0" scope="202" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
-       <startpoint startx="480" starty="136" />
-       <endpoint endx="348" endy="302" />
+       <startpoint startx="480" starty="137" />
+       <endpoint endx="348" endy="325" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="3" indexa="2" visibilityB="200" totalcountb="2" indexb="1" widgetbid="208" roleBdoc="" widgetaid="265" roleAdoc="" documentation="" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
-      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="10" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="709" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
-      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="10" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
-      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="10" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
        <startpoint startx="532" starty="120" />
-       <endpoint endx="640" endy="146" />
+       <endpoint endx="640" endy="164" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="3" indexa="2" visibilityB="200" totalcountb="2" indexb="1" widgetbid="207" roleBdoc="" widgetaid="265" roleAdoc="" documentation="" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
-      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="10" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="20" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="709" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
-      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="10" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="20" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="+" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="711" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
-      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="10" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+      <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="20" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
-       <startpoint startx="532" starty="152" />
-       <endpoint endx="750" endy="407" />
+       <startpoint startx="532" starty="155" />
+       <endpoint endx="750" endy="423" />
       </linepath>
      </UML:AssocWidget>
     </associations>
    </diagram>
-   <diagram snapgrid="1" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="901" snapy="10" showatts="1" xmi.id="336" documentation="" type="402" showops="1" showpackage="0" name="Clases" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,12,-1,5,48,0,0,0,0,0" linecolor="#ff0000" canvasheight="1129" >
+   <diagram snapgrid="1" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="1" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="901" snapy="10" showatts="1" xmi.id="336" documentation="" type="402" showops="1" showpackage="0" name="Clases" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="helvetica,4,-1,0,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1184" >
     <widgets>
-     <UML:ClassWidget usesdiagramfillcolour="0" width="35" showattsigs="601" usesdiagramusefillcolour="0" x="470" linecolour="#ff0000" y="20" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#d5d5cf" height="25" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="264" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="429" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="240" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="273" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="208" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="360" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="10" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="195" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="210" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="87" showattsigs="601" usesdiagramusefillcolour="0" x="450" linecolour="#ff0000" y="80" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="265" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="430" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="540" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="585" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="209" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="447" showattsigs="601" usesdiagramusefillcolour="0" x="450" linecolour="#ff0000" y="230" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="234" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="207" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="287" showattsigs="601" usesdiagramusefillcolour="0" x="570" linecolour="#ff0000" y="20" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="130" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="377" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="35" showattsigs="601" usesdiagramusefillcolour="0" x="470" linecolour="#ff0000" y="20" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#d5d5cf" height="28" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="264" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="429" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="230" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="308" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="208" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="360" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="10" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="210" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="210" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="87" showattsigs="601" usesdiagramusefillcolour="0" x="450" linecolour="#ff0000" y="80" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="35" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="265" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="430" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="550" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="630" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="209" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="447" showattsigs="601" usesdiagramusefillcolour="0" x="450" linecolour="#ff0000" y="230" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="266" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="207" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="287" showattsigs="601" usesdiagramusefillcolour="0" x="570" linecolour="#ff0000" y="20" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="140" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="377" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="helvetica,8,-1,0,50,0,0,0,0,0" />
     </widgets>
     <messages/>
     <associations>
@@ -360,15 +363,15 @@ x2c:set" name="sistema" static="0" scope="202" />
       <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="0" linecolour="none" y="0" operation="" instancename="" posttext="" usesdiagramlinecolour="1" role="712" fillcolour="none" height="0" usefillcolor="1" seqnum="" pretext="" isinstance="0" xmi.id="-1" text="" font="helvetica,12,-1,5,50,0,0,0,0,0" />
       <linepath>
        <startpoint startx="493" starty="80" />
-       <endpoint endx="487" endy="45" />
+       <endpoint endx="487" endy="48" />
       </linepath>
      </UML:AssocWidget>
     </associations>
    </diagram>
   </diagrams>
   <listview>
-   <listitem open="1" type="800" id="-1" label="Vistas" >
-    <listitem open="1" type="801" id="-1" label="Vista lógica" >
+   <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="Diagramas" >
       <listitem open="1" type="807" id="336" label="Clases" />
       <listitem open="1" type="807" id="206" label="Clases y Relaciones" />
@@ -391,10 +394,11 @@ x2c:set" name="sistema" static="0" scope="202" />
       <listitem open="0" type="813" id="265" label="SAMURAI_DB" >
        <listitem open="0" type="815" id="269" label="connect" />
       </listitem>
-      <listitem open="0" type="813" id="208" label="SAMURAI_Perfil" >
+      <listitem open="1" type="813" id="208" label="SAMURAI_Perfil" >
        <listitem open="0" type="814" id="271" label="db" />
        <listitem open="0" type="814" id="226" label="descripcion" />
        <listitem open="0" type="814" id="225" label="id" />
+       <listitem open="0" type="814" id="392" label="idSistema" />
        <listitem open="0" type="814" id="361" label="permisos" />
        <listitem open="0" type="814" id="330" label="responsable" />
        <listitem open="0" type="814" id="227" label="tipo" />
@@ -429,7 +433,7 @@ x2c:set" name="sistema" static="0" scope="202" />
        <listitem open="0" type="815" id="319" label="modificarDb" />
        <listitem open="0" type="815" id="295" label="obtenerDatosDb" />
       </listitem>
-      <listitem open="0" type="813" id="209" label="SAMURAI_Sistema" >
+      <listitem open="1" type="813" id="209" label="SAMURAI_Sistema" >
        <listitem open="0" type="814" id="310" label="asociaciones" />
        <listitem open="0" type="814" id="242" label="contacto" />
        <listitem open="0" type="814" id="272" label="db" />
@@ -477,6 +481,7 @@ x2c:set" name="sistema" static="0" scope="202" />
       </listitem>
       <listitem open="1" type="813" id="207" label="SAMURAI_Usuario" >
        <listitem open="0" type="814" id="273" label="db" />
+       <listitem open="0" type="814" id="394" label="idSistema" />
        <listitem open="0" type="814" id="211" label="login" />
        <listitem open="0" type="814" id="213" label="nombre" />
        <listitem open="0" type="814" id="212" label="nrodoc" />
@@ -496,7 +501,7 @@ x2c:set" name="sistema" static="0" scope="202" />
       </listitem>
      </listitem>
     </listitem>
-    <listitem open="0" type="802" id="-1" label="Vista de caso de uso" />
+    <listitem open="0" type="802" id="-1" label="Use Case View" />
     <listitem open="1" type="821" id="-1" label="Component View" />
     <listitem open="0" type="823" id="-1" label="Diagrams" />
     <listitem open="1" type="827" id="-1" label="Deployment View" />
index acbce4ed588ec9fcb4ed85a3225295c6ca8eba48..4a7edf03c0eb15ad3ea38e1a9f84e73ba3c2e421 100644 (file)
@@ -81,6 +81,12 @@ class SAMURAI_Perfil {
      */
     var $_permisos;
 
+    /**
+     * @var    int $idSistema
+     * @access protected
+     */
+    var $_idSistema;
+
     /**
      * Gets Id.
      *
@@ -204,15 +210,17 @@ class SAMURAI_Perfil {
      *
      * @param  SAMURAI_DB &$db Objeto conexion
      * @param  int $id Identificador del perfil.
+     * @param  int $idSistema Identificador del sistema en el que se esta trabajando
      *
      * @return void
      * @access public
      */
-    function SAMURAI_Perfil(&$db, $id = null) // ~X2C
+    function SAMURAI_Perfil(&$db, $id = null, $idSistema = null) // ~X2C
     {
         $this->_db = $db;
         if (!is_null($id)) {
             $this->setId($id);
+            $this->_idSistema = $idSistema;
             $this->_obtenerDatosDb();
         }
         else {
@@ -221,6 +229,7 @@ class SAMURAI_Perfil {
             $this->_descripcion = null; 
             $this->_tipo        = null;
             $this->_permisos    = null;
+            $this->_idSistema   = null;
         }
     }
     // -X2C
@@ -256,7 +265,7 @@ class SAMURAI_Perfil {
         //OBTENGO EL TIPO DE PERFIL
         $tmp = $sql['verificar_asociacion'];
         $dbh = $this->_db->prepare($tmp);
-        $tmp = array ($this->getId(), $_SESSION['samurai']['id_sistema']);
+        $tmp = array ($this->getId(), $this->_idSistema);
         $res = $this->_db->execute($dbh,$tmp);        
         $re = $res->fetchrow(DB_FETCHMODE_ASSOC);
         $this->setTipo($re['tipo_perfil']);
@@ -264,7 +273,7 @@ class SAMURAI_Perfil {
         //OBTENGO LOS PERMISOS QUE TIENE ASIGNADO EL PERFIL DESDE PERM_PERFIL_SIST
         $tmp = $sql['obtener_permisos'];
         $dbh = $this->_db->prepare($tmp);
-        $tmp = array ($this->getId(), $_SESSION['samurai']['id_sistema']);
+        $tmp = array ($this->getId(), $this->_idSistema);
         $res = $this->_db->execute($dbh,$tmp);        
         $rta = array ();
         while ($re = $res->fetchrow(DB_FETCHMODE_ASSOC)) {
@@ -339,7 +348,7 @@ class SAMURAI_Perfil {
         }
         //GRABO EN PERFIL_SIST
         $datos = array ('id_perfil'   => $this->getId(),
-                        'id_sistema'  => $_SESSION['samurai']['id_sistema'],
+                        'id_sistema'  => $this->_idSistema,
                         'tipo_perfil' => $this->getTipo(),
                         'responsable' => $this->getResponsable(),
                     );
@@ -360,7 +369,7 @@ class SAMURAI_Perfil {
         //Verifico en perfil_sist_usuario
         $tmp = $sql['verif_perfil_sist_usuario'];
         $dbh = $this->_db->prepare($tmp);
-        $datos = array ($this->getId(), $_SESSION['samurai']['id_sistema']);
+        $datos = array ($this->getId(), $this->_idSistema);
         $res = $this->_db->execute($dbh, $datos);
         if (($re  = $res->fetchRow(DB_FETCHMODE_ASSOC)) && !$re['cuenta'] == 0) {
             return new PEAR_Error("Hay usuarios asociados al perfil seleccionado");
@@ -373,7 +382,7 @@ class SAMURAI_Perfil {
         //Borro perfil_sist
         $tmp = $sql['borrar_perfil_sist'];
         $dbh = $this->_db->prepare($tmp);
-        $datos = array ($this->getId(), $_SESSION['samurai']['id_sistema']);
+        $datos = array ($this->getId(), $this->_idSistema);
         $res = $this->_db->execute($dbh, $datos);
         if (PEAR::isError($res)) {         
             return $res;               
@@ -411,7 +420,9 @@ class SAMURAI_Perfil {
                     'tipo_perfil' => $this->getTipo(),
                     'responsable' => $this->getResponsable(),
         );
-        $res = $this->_db->autoExecute('perfil_sist', $datos, DB_AUTOQUERY_UPDATE, 'id_perfil ='.$this->getId().' AND id_sistema='.$_SESSION['samurai']['id_sistema']);
+        $res = $this->_db->autoExecute('perfil_sist', $datos,
+                DB_AUTOQUERY_UPDATE, 'id_perfil ='.$this->getId().' AND
+                id_sistema='.$this->_idSistema);
         if (PEAR::isError($res)) {         
             return $res;               
         }
@@ -487,7 +498,7 @@ class SAMURAI_Perfil {
     {
         $rta = array ();
         foreach (SAMURAI_Perfil::_getIdPerfiles($db, $filtro, $id_sistema) as $id) {
-            $tmp = new SAMURAI_Perfil($db,$id);
+            $tmp = new SAMURAI_Perfil($db,$id, $id_sistema);
             array_push($rta, $tmp);
         }
         return $rta;
@@ -594,7 +605,7 @@ class SAMURAI_Perfil {
         $re = $this->_db->autoPrepare('perm_perfil_sist', $datos, DB_AUTOQUERY_INSERT);
         foreach ($this->getPermisos() as $permiso) {
             list($id, $obs) = split ('##',$permiso);
-            $datos = array ($id, $this->getId(), $_SESSION['samurai']['id_sistema'], $obs, $this->getResponsable());
+            $datos = array ($id, $this->getId(), $this->_idSistema, $obs, $this->getResponsable());
             $res = $this->_db->execute($re, $datos);
             if (PEAR::isError($res)) {
                 return $res;
@@ -615,7 +626,7 @@ class SAMURAI_Perfil {
         $sql = parse_ini_file(dirname(__FILE__) . '/Perfil/consultas.ini', true);
         $tmp = $sql['borrar_permisos'];
         $dbh = $this->_db->prepare($tmp);
-        $tmp = array ($this->getId(), $_SESSION['samurai']['id_sistema']);
+        $tmp = array ($this->getId(), $this->_idSistema);
         return $this->_db->execute($dbh,$tmp);        
     }
     // -X2C
@@ -633,7 +644,7 @@ class SAMURAI_Perfil {
         $sql = parse_ini_file(dirname(__FILE__) . '/Perfil/consultas.ini', true);
         $tmp = $sql['verif_perm_perfil_sist'];
         $dbh = $this->_db->prepare($tmp);
-        $tmp = array ($_SESSION['samurai']['id_sistema']);
+        $tmp = array ($this->_idSistema);
         $res = $this->_db->execute($dbh,$tmp);
         $perm = array();
         while ($re  = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
@@ -643,7 +654,7 @@ class SAMURAI_Perfil {
             $rta1 = array_diff($p, $this->getPermisos());
             $rta2 = array_diff($this->getPermisos(), $p);
             if (!$rta1 && !$rta2) {
-                $perf = new SAMURAI_Perfil($this->_db, $key);
+                $perf = new SAMURAI_Perfil($this->_db, $key, $this->_idSistema);
                 if ($perf->getDescripcion() != $this->getDescripcion()) {
                     return new PEAR_Error("El perfil \"".$perf->getDescripcion()."\" contiene los mismos permisos.");
                 }
@@ -655,4 +666,4 @@ class SAMURAI_Perfil {
 
 } // -X2C Class :SAMURAI_Perfil
 
-?>
\ No newline at end of file
+?>
index e4143d8974d99340f91edbfb95f2eb55b186409c..8cf5f9788d100b5428e40d68c20e5a5695989b2d 100644 (file)
@@ -116,36 +116,11 @@ class SAMURAI_Sistema {
     var $_permisos;
 
     /**
-     * Array con los permisos asociados al sistema
-     *
      * @var    array $asociaciones
      * @access protected
      */
     var $_asociaciones;
 
-    /**
-     * Gets Asociaciones.
-     *
-     * @return array
-     * @access public
-     */
-    function getAsociaciones()
-    {
-        return $this->_asociaciones;
-    }
-    /**
-     * Sets Asociaciones.
-     *
-     * @param  array $asociaciones Asociaciones.
-     *
-     * @return void
-     * @access public
-     */
-    function setAsociaciones($asociaciones)
-    {
-        $this->_asociaciones = $asociaciones;
-    }
-
     // ~X2C
 
     // +X2C Operation 243
@@ -637,7 +612,7 @@ class SAMURAI_Sistema {
             return $res;
         }
 
-        if ($idSistema == $_SESSION['samurai']['id_sistema']){
+        if ($idSistema == @$_SESSION['samurai']['id_sistema']){
             $_SESSION['samurai']['id_sistema'] = '';
         }
     }
@@ -993,4 +968,4 @@ class SAMURAI_Sistema {
 
 } // -X2C Class :SAMURAI_Sistema
 
-?>
\ No newline at end of file
+?>
index 939f72060fb51f1e02e94651be6d3d12e3aafe81..86cc24a639f8bf17c3458851a2692a43948c2403 100644 (file)
@@ -84,6 +84,12 @@ class SAMURAI_Usuario {
      */
     var $_perfiles;
 
+    /**
+     * @var    int $idSistema
+     * @access protected
+     */
+    var $_idSistema;
+
     /**
      * Gets Login.
      *
@@ -184,11 +190,12 @@ class SAMURAI_Usuario {
      *
      * @param  SAMURAI_DB &$db Objeto conexion.
      * @param  string $login Login del usuario
+     * @param  int $idSistema Identificador del sistema en el cual se esta trabajando
      *
      * @return void
      * @access public
      */
-    function SAMURAI_Usuario(&$db, $login = null) // ~X2C
+    function SAMURAI_Usuario(&$db, $login = null, $idSistema = null) // ~X2C
     {
         $this->_db = $db; 
         $this->setLogin($login);
@@ -196,6 +203,7 @@ class SAMURAI_Usuario {
             $tmp =& new MECON_Usuario(null, $login);
             $this->setNrodoc($tmp->getDni());
             $this->setNombre($tmp->getNombre());
+            $this->_idSistema = $idSistema;
             $this->_obtenerDatosDb();
         }
     }
@@ -274,7 +282,7 @@ class SAMURAI_Usuario {
     {
         $rta = array ();
         foreach (SAMURAI_Usuario::_getLoginUsuarios($db, $id_sistema) as $login) {
-            $tmp = new SAMURAI_Usuario($db,$login);
+            $tmp = new SAMURAI_Usuario($db, $login, $id_sistema);
             array_push($rta, $tmp);
         }
         return $rta;
@@ -294,11 +302,13 @@ class SAMURAI_Usuario {
         
         $tmp = $sql['obtener_perfiles_usuario'];
         $dbh = $this->_db->prepare($tmp);
-        $res = $this->_db->execute($dbh,array($this->getLogin(), $_SESSION['samurai']['id_sistema']));
+        $res = $this->_db->execute($dbh,array($this->getLogin(),
+                    $this->_idSistema));
         $rta = array();
 
         while ($re  = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
-            $tmp = new SAMURAI_Perfil($this->_db, $re['id_perfil']);
+            $tmp = new SAMURAI_Perfil($this->_db, $re['id_perfil'],
+                    $this->_idSistema);
             $rta[] = $tmp->getId();
         }
         $this->setPerfiles($rta);
@@ -346,7 +356,7 @@ class SAMURAI_Usuario {
         foreach ($this->getPerfiles() as $perfil) {
             $datos = array ($this->getLogin(),
                             $perfil,
-                            $_SESSION['samurai']['id_sistema']
+                            $this->_idSistema
                             $_SESSION['usuario']);
             $res = $this->_db->execute($re, $datos);
             if (PEAR::isError($res)) {
@@ -368,7 +378,7 @@ class SAMURAI_Usuario {
         $sql = parse_ini_file(dirname(__FILE__) . '/Usuario/consultas.ini', true);
         $tmp = $sql['borrar'];
         $dbh = $this->_db->prepare($tmp);
-        $tmp = array ($this->getLogin(), $_SESSION['samurai']['id_sistema']);
+        $tmp = array ($this->getLogin(), $this->_idSistema);
         return $this->_db->execute($dbh,$tmp);        
     }
     // -X2C
@@ -424,7 +434,8 @@ class SAMURAI_Usuario {
         $sql = parse_ini_file(dirname(__FILE__) . '/Usuario/consultas.ini', true);
         $tmp = $sql['verificar_login2'];
         $dbh = $this->_db->prepare($tmp);
-        $res = $this->_db->execute($dbh,array($this->getLogin(), $_SESSION['samurai']['id_sistema']));
+        $res = $this->_db->execute($dbh,array($this->getLogin(),
+                    $this->_idSistema));
         $re  = $res->fetchRow(DB_FETCHMODE_ASSOC);
         if ($re['login']) {
             return new PEAR_Error('El usuario seleccionado ya esta cargado. Modifique sus opciones.');
index 52bf17287fd312b3ce20d4113c259439ccf3c22e..001aae0093b18bd3a65f169c35b18898b89f7304 100644 (file)
@@ -44,7 +44,8 @@ $SAMURAI_PERM->chequear(SAMURAI_ALTA_PERFIL,SAMURAI_BAJA_PERFIL,SAMURAI_MODI_PER
     }
     $FORM = new MECON_HTML_QuickForm ('perfiles_abm','post','perfiles-abm');
     $SISTEMA = new SAMURAI_Sistema ($DB, $_SESSION['samurai']['id_sistema']);
-    $PERFIL = new SAMURAI_Perfil ($DB, $id_perfil);
+    $PERFIL = new SAMURAI_Perfil ($DB, $id_perfil,
+            $_SESSION['samurai']['id_sistema']);
 
     if ($PERFIL->getResponsable()) {
         $responsable = $PERFIL->getResponsable();
index 37c5e6c67cd36d7540040ed5f008a2d2e88d22eb..7083e0774f7af24e51c9c6dc13e3e740c008ccce 100644 (file)
@@ -50,7 +50,8 @@ $SAMURAI_PERM->chequear(SAMURAI_ALTA_PERFIL,SAMURAI_BAJA_PERFIL,SAMURAI_MODI_PER
                                         'simple'   => 'true'));
         $PAGE->addStyleSheet('/MECON/css/general_estilos.css');
         $FORM    = new MECON_HTML_QuickForm ('perfil_datos','post','perfil-datos');
-        $PERFIL  = new SAMURAI_Perfil($DB, $_GET['id_perfil']);
+        $PERFIL  = new SAMURAI_Perfil($DB, $_GET['id_perfil'],
+                $_SESSION['samurai']['id_sistema']);
         $SISTEMA = new SAMURAI_Sistema ($DB, $_SESSION['samurai']['id_sistema']);
     }
 // }}}
index 7b5f162f37f2f007c554aa067cb04f17ac8b2b80..24ddb7fc03a4a1ed087292c15bc1d41b1b84a9ac 100644 (file)
@@ -53,7 +53,7 @@ if (!@$_SESSION['samurai']['id_sistema']) {
     $TABLA   = new MECON_HTML_Tabla ('cellspacing=0');
     $FORM    = new MECON_HTML_QuickForm ('usuarios_abm','post','usuarios-abm');
     $SISTEMA = new SAMURAI_Sistema($DB, $_SESSION['samurai']['id_sistema']);
-    $USUARIO = new SAMURAI_Usuario($DB, $login);
+    $USUARIO = new SAMURAI_Usuario($DB, $login, $_SESSION['samurai']['id_sistema']);
 // }}}
 //OBTENGO LOS DATOS DE LA BASE {{{
     $tmps = SAMURAI_Perfil::getPerfiles($DB, null, $_SESSION['samurai']['id_sistema']);
index dc2dd2d3380d0183e26c96caecf020dcada82a72..7b8aea41c10859e315d89f6243f37c3fa2b19518 100644 (file)
@@ -47,7 +47,8 @@ $SAMURAI_PERM->chequear(SAMURAI_ALTA_USUARIO, SAMURAI_BAJA_USUARIO, SAMURAI_MODI
                                         'simple'   => 'true'));
         $PAGE->addStyleSheet('/MECON/css/general_estilos.css');
         $FORM    = new MECON_HTML_QuickForm ('usuarios_datos','post','usuarios-datos');
-        $USUARIO = new SAMURAI_Usuario($DB, $_GET['login']);
+        $USUARIO = new SAMURAI_Usuario($DB, $_GET['login'],
+                $_SESSION['samurai']['id_sistema']);
     }
 // }}}