if (!isset($sr)) {
//error reading / authenticating - return false
- echo "Error leyendo!\n";
+ $error = true;
}
else
{
// Fin Agregado MANAZAR
}
- }else{
+ }
+ {
if(!isset($_SESSION['usuario']))
{
if((isset($_GET['redirect']) && $_GET['redirect'] == 'sistemas') ||
(isset($_POST['redirect']) && $_POST['redirect'] == 'sistemas'))
{
- $m = new HTML_DietMarco('sistemas');
+ $m = new HTML_DietMarco('sistemas', 'Sistemas');
$m->addTitle('Sistemas');
}
else
{
- $m = new HTML_DietMarco('servicios');
+ $m = new HTML_DietMarco('servicios', 'Servicios');
$m->addTitle('Servicios');
}
$login = new HTML_Login();
+ if(isset($error) && $error == 1)
+ $login->login_incorrecto = true;//FIXME terminar de prgramar cuando haya ldap
$t = new HTML_Table(array('width' => 760,
'align' => 'center',
'cellspacing' => 0,
if(isset($_SESSION['usuario']) &&
(isset($_POST['redirect']) || isset($_GET['redirect'])))
{
- if((isset($_GET['redirect']) && $_GET['redirect'] == 'sistemas') ||
- (isset($_POST['redirect']) && $_POST['redirect'] == 'sistemas'))
- {
- header('location: sistemas.php');
- exit;
- }
+ @ $redirect = $_GET['redirect'].$_POST['redirect'];
+ $db = DB::Connect('mysql://intranet:intranet@bal747f/intranet');
+ $query = "SELECT link
+ FROM servicio
+ WHERE servicio = $redirect";
+ $link = $db->getOne($query);
+ if(PEAR::isError($link))
+ header('location: '.$redirect);
else
- {
- $db = DB::Connect('mysql://intranet:intranet@bal747f/intranet');
- $query = "SELECT link
- FROM servicio
- WHERE servicio = ";
- if(isset($_POST['redirect'])) $query .= $_POST['redirect'];
- else $query .= $_GET['redirect'];
- $link = $db->getOne($query);
header('location: '.$link);
- }
}
?>