X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/e0e275daf3624e7c6bfce0eb27717d14572273ce..ba466154033d54821e07ab851bccc42e8e344fe9:/sistema/www/login.php?ds=inline diff --git a/sistema/www/login.php b/sistema/www/login.php index 2a3ae8b..1ef3775 100644 --- a/sistema/www/login.php +++ b/sistema/www/login.php @@ -44,7 +44,7 @@ $MECON_DNI= $info[0]['uidnumber'][0]; $MECON_NOMBRE= $info[0]['sn'][0]." ".$info[0]['givenname'][0]; $MECON_LOGIN= $_POST['usuario']; - $usuario=& new MECON_USUARIO(); + $usuario=& new MECON_USUARIO($DB); $usuario->Insertar_Usuario($MECON_DNI,$MECON_LOGIN,$MECON_NOMBRE); // Fin Agregado MANAZAR } @@ -54,9 +54,7 @@ { if(!isset($_SESSION['usuario']) ) { - if((isset($_GET['redirect']) && $_GET['redirect'] == 'sistemas') || - (isset($_POST['redirect']) && $_POST['redirect'] == 'sistemas')) - { + if (preg_match('/sistemas/', @$_REQUEST['redirect']) || @$_REQUEST['embperl']) { $m = new HTML_DietMarco('sistemas', 'Sistemas'); // $m->addTitle('Sistemas'); } @@ -68,7 +66,7 @@ $login = new HTML_Login(); if(isset($error) && $error == 1) - $login->login_incorrecto = true;//FIXME terminar de prgramar cuando haya ldap + $login->login_incorrecto = true; $t = new HTML_Table(array('width' => 760, 'align' => 'center', 'cellspacing' => 0, @@ -85,15 +83,22 @@ } if(isset($_SESSION['usuario']) && ! @ $error && - (isset($_POST['redirect']) || isset($_GET['redirect']))) + (@$_REQUEST['redirect'])) { - @ $redirect = $_GET['redirect'].$_POST['redirect']; + $redirect = $_REQUEST['redirect']; $query = "SELECT link FROM servicio WHERE servicio = $redirect"; $link = $DB->getOne($query); - if(PEAR::isError($link)) - header('location: '.$redirect); + if(PEAR::isError($link)) { + + if (@$_REQUEST['embperl']) { + header('Location: /Php2Embperl_Session?redirect='.$redirect); + } + else { + header('Location: '.$redirect); + } + } else header('location: '.$link); }