summaryrefslogtreecommitdiffstats
path: root/frontends/php/index.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-01-10 16:09:31 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-01-10 16:09:31 +0000
commit4126039bc0cad4231822bbd07fe9dda5301ab423 (patch)
tree66eecffa8c7b5ec91b18ae8265a2f65873982e5e /frontends/php/index.php
parent8434d0ec57d5d159708c53dc26158647ab1dfd0e (diff)
downloadzabbix-4126039bc0cad4231822bbd07fe9dda5301ab423.tar.gz
zabbix-4126039bc0cad4231822bbd07fe9dda5301ab423.tar.xz
zabbix-4126039bc0cad4231822bbd07fe9dda5301ab423.zip
- [DEV-94] added processing of the "database down" event (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5238 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/index.php')
-rw-r--r--frontends/php/index.php26
1 files changed, 16 insertions, 10 deletions
diff --git a/frontends/php/index.php b/frontends/php/index.php
index ccaafce0..8524d3d4 100644
--- a/frontends/php/index.php
+++ b/frontends/php/index.php
@@ -52,7 +52,8 @@
unset($sessionid);
Redirect("index.php");
- return;
+ die();
+// return;
}
if(isset($_REQUEST["enter"])&&($_REQUEST["enter"]=="Enter"))
@@ -60,12 +61,13 @@
$name = get_request("name","");
$password = md5(get_request("password",""));
- $row = DBfetch(DBselect("select u.userid,u.alias,u.name,u.surname,u.url,u.refresh from users u where".
- " u.alias=".zbx_dbstr($name)." and u.passwd=".zbx_dbstr($password).
- ' and '.DBin_node('u.userid', $ZBX_LOCALNODEID)));
+ $row = DBfetch(DBselect('SELECT u.userid,u.alias,u.name,u.surname,u.url,u.refresh '.
+ ' FROM users u '.
+ ' WHERE u.alias='.zbx_dbstr($name).
+ ' AND u.passwd='.zbx_dbstr($password).
+ ' AND '.DBin_node('u.userid', $ZBX_LOCALNODEID)));
- if($row)
- {
+ if($row){
$sessionid = md5(time().$password.$name.rand(0,10000000));
zbx_setcookie('zbx_sessionid',$sessionid);
@@ -74,12 +76,16 @@
add_audit(AUDIT_ACTION_LOGIN,AUDIT_RESOURCE_USER,"Correct login [".$name."]");
- if(empty($row["url"]))
- {
- $row["url"] = "index.php";
+ if(empty($row["url"])){
+ global $USER_DETAILS;
+ $USER_DETAILS["alias"] = $row['alias'];
+ $USER_DETAILS['userid'] = $row['userid'];
+ $row["url"] = get_profile('web.menu.view.last','index.php');
+ unset($USER_DETAILS);
}
Redirect($row["url"]);
- return;
+ die();
+// return;
}
else
{