2012-03-12 Vanessa Gil <vanessa.gil@artica.es>

* index.php: Fixed problem to display "sec" in menu.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5735 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-03-12 12:50:47 +00:00
parent 1c61156311
commit 76815609b4
2 changed files with 44 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2012-03-12 Vanessa Gil <vanessa.gil@artica.es>
* index.php: Fixed problem to display "sec" in menu.
2012-03-12 Vanessa Gil <vanessa.gil@artica.es>
* index.php
operation/users/user_edit.php: Customize home screen.

View File

@ -171,6 +171,46 @@ elseif (! isset ($config['id_user']) && isset ($_GET["login"])) {
if ($nick_in_db !== false) {
unset ($_GET["sec2"]);
$_GET["sec"] = "general/logon_ok";
$home_page ='';
if (isset($nick)) {
$user_info = users_get_user_by_id($nick);
$home_page = io_safe_output($user_info['section']);
$home_url = $user_info['data_section'];
if ($home_page != '') {
switch($home_page) {
case __('Event list'):
$_GET["sec"] = "eventos";
$_GET["sec2"] = "operation/events/events";
break;
case __('Group view'):
$_GET["sec"] = "estado";
break;
case __('Alert detail'):
$_GET["sec"] = "estado";
break;
case __('Tactical view'):
$_GET["sec"] = "estado";
break;
case __('Default'):
$_GET["sec"] = "general/logon_ok";
break;
case __('Dashboard'):
$_GET["sec"] = "dashboard";
break;
case __('Visual console'):
$_GET["sec"] = "visualc";
break;
case __('Other'):
$home_url = io_safe_output($home_url);
parse_str ($home_url, $res);
$_GET["sec"] = $res["sec"];
break;
}
} else {
$_GET["sec"] = "general/logon_ok";
}
}
db_logon ($nick_in_db, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $nick_in_db;
$config['id_user'] = $nick_in_db;