Subversion-Projekte lars-tiefland.nagios-php

Revision

Revision 9 | Revision 44 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 9 Revision 42
Zeile 1... Zeile 1...
1
<?php
1
<?php
Zeile 2... Zeile 2...
2
 
2
 
3
    class host
3
    class host
-
 
4
    {
-
 
5
        public $display_name;
-
 
6
        public $host_id;
-
 
7
        public $host_object_id;
-
 
8
 
-
 
9
        public function __construct($id)
-
 
10
        {
-
 
11
            $sql="SELECT
-
 
12
                    host_id,
-
 
13
                    display_name,
-
 
14
                    host_object_id
-
 
15
                FROM
-
 
16
                    hosts
-
 
17
                WHERE
-
 
18
                    host_id = $id
-
 
19
                AND
-
 
20
                    instance_id = " . $GLOBALS["cfg"]["instance"] . "
-
 
21
            ";
-
 
22
            $res = $GLOBALS["db"]->query($sql);
-
 
23
            $row = $res->fetchObject("host");
4
    {
24
        }
5
        public static function getStatusList()
25
        public static function getStatusList()
6
        {
26
        {
7
            $sql = "SELECT
27
            $sql = "SELECT
8
					count(current_state) AS anz
28
					count(current_state) AS anz