X-Git-Url: https://git.llucax.com/mecon/samurai.git/blobdiff_plain/a40527415e52e730e1a2e16ed3e46b32adf17512..0b4c46600fea05f1d7a5f1a423fb771c13deab66:/lib_perl/Perm.epl?ds=sidebyside diff --git a/lib_perl/Perm.epl b/lib_perl/Perm.epl index 99e8af9..346cc67 100644 --- a/lib_perl/Perm.epl +++ b/lib_perl/Perm.epl @@ -46,7 +46,8 @@ $SAMURAI_Perm->{new} = sub $udat{SAMURAI_Perm_vars}{id_sistema} = @_[1]; ##Conexion con la base #TODO Cambiar los parametros de conexion segun corresponda. - my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet"); + + my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=localhost',"samurai","25fdd50c0e4d68"); ##Obtengo los permisos de la base $re = $dbh->prepare($sql); $re->execute($udat{SAMURAI_Perm_vars}{login}); @@ -151,7 +152,7 @@ $SAMURAI_Perm->{getObservaciones} = sub $udat{SAMURAI_Perm_vars}{observaciones} = ''; $sql = 'SELECT ps.observaciones AS observaciones FROM samurai.perm_sist AS ps WHERE ps.id_permiso = ? AND ps.id_sistema = ?'; #TODO cambiar los parametros de conexion segun corresponda - my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet"); + my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=localhost',"samurai","25fdd50c0e4d68"); $re = $dbh->prepare($sql); $re->execute($perm, $sistema); while ($r = $re->fetchrow_hashref()) { @@ -177,7 +178,7 @@ $SAMURAI_Perm->{asignarPerfil} = sub my $sql = "REPLACE INTO perfil_sist_usuario (login,id_perfil,id_sistema,responsable) VALUES ('$login',$id_perfil,$id_sistema,'$resp')"; ##Conexion con la base #TODO Cambiar los parametros de conexion segun corresponda. - my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet"); + my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=localhost',"samurai","25fdd50c0e4d68"); my $result=$dbh->do($sql); #Desconexion con la base $dbh->disconnect; @@ -195,7 +196,7 @@ $SAMURAI_Perm->{quitarPerfil} = sub my $sql = "DELETE FROM perfil_sist_usuario where (login='$login') AND (id_perfil=$id_perfil) AND (id_sistema=$id_sistema)"; ##Conexion con la base #TODO Cambiar los parametros de conexion segun corresponda. - my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet"); + my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=localhost',"samurai","25fdd50c0e4d68"); my $result=$dbh->do($sql); #Desconexion con la base $dbh->disconnect;