X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/f79e92f4a5ebf90ddb33469110e19f80f3383eab..8189a05e7624ce3ba99481d14d1887a636bac093:/sistema/www/login.php diff --git a/sistema/www/login.php b/sistema/www/login.php index 5430c5d..a4965dc 100644 --- a/sistema/www/login.php +++ b/sistema/www/login.php @@ -1,14 +1,13 @@ addTitle('Sistemas'); } @@ -86,16 +83,22 @@ } if(isset($_SESSION['usuario']) && ! @ $error && - (isset($_POST['redirect']) || isset($_GET['redirect']))) + (@$_REQUEST['redirect'])) { - @ $redirect = $_GET['redirect'].$_POST['redirect']; - $db = DB::Connect('mysql://intranet:intranet@bal747f/intranet'); + $redirect = $_REQUEST['redirect']; $query = "SELECT link FROM servicio WHERE servicio = $redirect"; - $link = $db->getOne($query); - if(PEAR::isError($link)) - header('location: '.$redirect); + $link = $DB->getOne($query); + if(PEAR::isError($link)) { + + if (@$_REQUEST['embperl']) { + header('Location: /Php2Embperl_Session?redirect='.$redirect); + } + else { + header('Location: '.$redirect); + } + } else header('location: '.$link); }