diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-03-05 10:21:02 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-03-05 10:21:02 +0000 |
| commit | 793897861b7e8218f1a74e718e8e4aebfed64471 (patch) | |
| tree | f80c76094124f2c27a2d6cd2911afc4cbde306fb /frontends/php/include/audit.inc.php | |
| parent | 03fca90c6a702e6b1a96348dfebb742b3ec0abac (diff) | |
| download | zabbix-793897861b7e8218f1a74e718e8e4aebfed64471.tar.gz zabbix-793897861b7e8218f1a74e718e8e4aebfed64471.tar.xz zabbix-793897861b7e8218f1a74e718e8e4aebfed64471.zip | |
- added frontends/php/include/audit.inc.php (Alexei)
- added frontends/php/include/users.inc.php (Alexei)
- added frontends/php/include/screens.inc.php (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1688 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/audit.inc.php')
| -rw-r--r-- | frontends/php/include/audit.inc.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/frontends/php/include/audit.inc.php b/frontends/php/include/audit.inc.php new file mode 100644 index 00000000..3f7a6b26 --- /dev/null +++ b/frontends/php/include/audit.inc.php @@ -0,0 +1,32 @@ +<?php +/* +** Zabbix +** Copyright (C) 2000,2001,2002,2003,2004 Alexei Vladishev +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +**/ +?> +<?php + function add_audit($action,$resource,$details) + { + global $USER_DETAILS; + + $details=addslashes($details); + $userid=$USER_DETAILS["userid"]; + $clock=time(); + $sql="insert into audit (userid,clock,action,resource,details) values ($userid,$clock,$action,$resource,'$details')"; + return DBexecute($sql); + } +?> |
