summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-08-24 07:26:15 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-08-24 07:26:15 +0000
commitf1a5c13a6d8cb10e69878c6cfa48ef66e005a482 (patch)
tree5e5436610f85b03fd3cec24287f75ff6d4ab07c4 /frontends/php/include
parent560e22e2931420fc9a803feb60b87549f4e8402a (diff)
downloadzabbix-f1a5c13a6d8cb10e69878c6cfa48ef66e005a482.tar.gz
zabbix-f1a5c13a6d8cb10e69878c6cfa48ef66e005a482.tar.xz
zabbix-f1a5c13a6d8cb10e69878c6cfa48ef66e005a482.zip
- new hos status: 'deleted' (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@937 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php33
-rw-r--r--frontends/php/include/defines.inc.php6
2 files changed, 24 insertions, 15 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 2e4ac0ea..ad5f841f 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -2785,22 +2785,25 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
function delete_host($hostid)
{
- $sql="select itemid from items where hostid=$hostid";
- $result=DBselect($sql);
- if(!$result)
- {
- return $result;
- }
- for($i=0;$i<DBnum_rows($result);$i++)
- {
- if(!delete_item(DBget_field($result,$i,0)))
- {
- return FALSE;
- }
- }
- delete_groups_by_hostid($hostid);
- $sql="delete from hosts where hostid=$hostid";
+ $sql="update hosts set status=".HOST_STATUS_DELETED." where hostid=$hostid";
return DBexecute($sql);
+
+// $sql="select itemid from items where hostid=$hostid";
+// $result=DBselect($sql);
+// if(!$result)
+// {
+// return $result;
+// }
+// for($i=0;$i<DBnum_rows($result);$i++)
+// {
+// if(!delete_item(DBget_field($result,$i,0)))
+// {
+// return FALSE;
+// }
+// }
+// delete_groups_by_hostid($hostid);
+// $sql="delete from hosts where hostid=$hostid";
+// return DBexecute($sql);
}
# Delete User permission
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
index e3f10158..870af978 100644
--- a/frontends/php/include/defines.inc.php
+++ b/frontends/php/include/defines.inc.php
@@ -19,6 +19,12 @@
**/
?>
<?php
+ define("HOST_STATUS_MONITORED", 0);
+ define("HOST_STATUS_NOT_MONITORED", 1);
+ define("HOST_STATUS_UNREACHABLE", 2);
+ define("HOST_STATUS_TEMPLATE", 3);
+ define("HOST_STATUS_DELETED", 4);
+
define("GRAPH_DRAW_TYPE_LINE",0);
define("GRAPH_DRAW_TYPE_FILL",1);
define("GRAPH_DRAW_TYPE_BOLDLINE",2);