diff options
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/php/audit.php | 18 | ||||
-rw-r--r-- | frontends/php/include/audit.inc.php | 4 | ||||
-rw-r--r-- | frontends/php/include/db.inc.php | 12 |
3 files changed, 17 insertions, 17 deletions
diff --git a/frontends/php/audit.php b/frontends/php/audit.php index 166473db..cd98b459 100644 --- a/frontends/php/audit.php +++ b/frontends/php/audit.php @@ -74,12 +74,12 @@ if(!isset($_REQUEST["start"])) { - $sql="select u.alias,a.clock,a.action,a.resource,a.details from auditlog a, users u". + $sql="select u.alias,a.clock,a.action,a.resourcetype,a.details from auditlog a, users u". " where u.userid=a.userid and a.auditid>$maxauditid-200 order by clock desc limit 200"; } else { - $sql="select u.alias,a.clock,a.action,a.resource,a.details from auditlog a, users u". + $sql="select u.alias,a.clock,a.action,a.resourcetype,a.details from auditlog a, users u". " where u.userid=a.userid and a.auditid>$maxauditid-".($_REQUEST["start"]+200). " order by clock desc limit ".($_REQUEST["start"]+200); @@ -95,19 +95,19 @@ if(isset($_REQUEST["start"])&&($i<$_REQUEST["start"])) continue; if($i>100) break; - if($row["resource"]==AUDIT_RESOURCE_USER) + if($row["resourcetype"]==AUDIT_RESOURCE_USER) $resource=S_USER; - else if($row["resource"]==AUDIT_RESOURCE_ZABBIX_CONFIG) + else if($row["resourcetype"]==AUDIT_RESOURCE_ZABBIX_CONFIG) $resource=S_CONFIGURATION_OF_ZABBIX; - else if($row["resource"]==AUDIT_RESOURCE_MEDIA_TYPE) + else if($row["resourcetype"]==AUDIT_RESOURCE_MEDIA_TYPE) $resource=S_MEDIA_TYPE; - else if($row["resource"]==AUDIT_RESOURCE_HOST) + else if($row["resourcetype"]==AUDIT_RESOURCE_HOST) $resource=S_HOST; - else if($row["resource"]==AUDIT_RESOURCE_ACTION) + else if($row["resourcetype"]==AUDIT_RESOURCE_ACTION) $resource=S_ACTION; - else if($row["resource"]==AUDIT_RESOURCE_GRAPH) + else if($row["resourcetype"]==AUDIT_RESOURCE_GRAPH) $resource=S_GRAPH; - else if($row["resource"]==AUDIT_RESOURCE_GRAPH_ELEMENT) + else if($row["resourcetype"]==AUDIT_RESOURCE_GRAPH_ELEMENT) $resource=S_GRAPH_ELEMENT; else $resource=S_UNKNOWN_RESOURCE; diff --git a/frontends/php/include/audit.inc.php b/frontends/php/include/audit.inc.php index c01f9c3d..b23d0fa3 100644 --- a/frontends/php/include/audit.inc.php +++ b/frontends/php/include/audit.inc.php @@ -19,13 +19,13 @@ **/ ?> <?php - function add_audit($action,$resource,$details) + function add_audit($action,$resourcetype,$details) { global $USER_DETAILS; $userid=$USER_DETAILS["userid"]; $clock=time(); - $sql="insert into auditlog (userid,clock,action,resource,details) values ($userid,$clock,$action,$resource,".zbx_dbstr($details).")"; + $sql="insert into auditlog (userid,clock,action,resourcetype,details) values ($userid,$clock,$action,$resourcetype,".zbx_dbstr($details).")"; return DBexecute($sql); } ?> diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php index f6cb1340..86ecc24e 100644 --- a/frontends/php/include/db.inc.php +++ b/frontends/php/include/db.inc.php @@ -23,15 +23,15 @@ // DATABASE CONFIGURATION // $DB_TYPE ="POSTGRESQL"; -// $DB_TYPE ="MYSQL"; - $DB_TYPE ="ORACLE"; + $DB_TYPE ="MYSQL"; +// $DB_TYPE ="ORACLE"; $DB_SERVER ="localhost"; -// $DB_DATABASE ="zabbix"; + $DB_DATABASE ="zabbix"; // $DB_DATABASE ="osmiy"; - $DB_DATABASE ="demo"; +// $DB_DATABASE ="demo"; // $DB_DATABASE ="martinsj"; - $DB_USER ="scott"; - $DB_PASSWORD ="tiger"; + $DB_USER ="root"; + $DB_PASSWORD =""; // END OF DATABASE CONFIGURATION // $USER_DETAILS =""; |