Subversion-Projekte lars-tiefland.nagios-php

Revision

Revision 128 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 128 Revision 129
Zeile 2... Zeile 2...
2
 
2
 
3
    /**
3
    /**
4
     * @package nagios-php
4
     * @package nagios-php
5
     * @author Lars Tiefland <ltiefland@gmail.com>
5
     * @author Lars Tiefland <ltiefland@gmail.com>
6
     * @copyright 2013
6
     * @copyright 2013
7
     * @version $Rev: 128 $
7
     * @version $Rev: 129 $
Zeile 8... Zeile 8...
8
     */
8
     */
Zeile 9... Zeile 9...
9
 
9
 
10
    // $Id: service.php 128 2013-01-12 17:41:35Z lars $
10
    // $Id: service.php 129 2013-01-12 17:43:17Z lars $
11
 
11
 
12
    /**
12
    /**
13
     * service
13
     * service
14
     * 
14
     * 
15
     * @package nagios-php
15
     * @package nagios-php
16
     * @author Lars Tiefland
16
     * @author Lars Tiefland
17
     * @copyright 2012
17
     * @copyright 2012
18
     * @version $Rev: 128 $
18
     * @version $Rev: 129 $
19
     * @access public
19
     * @access public
20
     */
20
     */
Zeile 42... Zeile 42...
42
        public function __construct( $id )
42
        public function __construct( $id )
43
        {
43
        {
44
            $sql = "SELECT
44
            $sql = "SELECT
45
                    service_id,
45
                    service_id,
46
                    display_name,
46
                    display_name,
47
                    service_object_id,
47
                    s.service_object_id,
48
                    notes,
48
                    notes,
49
                    notes_url,
49
                    notes_url,
50
                    action_url,
50
                    action_url,
51
                    icon_image,
51
                    icon_image,
52
                    icon_image_alt,
52
                    icon_image_alt,
53
                    current_state,
53
                    current_state,
54
                    status_update_time,
54
                    status_update_time,
55
                    current_check_attempt,
55
                    current_check_attempt,
56
                    max_check_attempts
56
                    s.max_check_attempts
57
                FROM
57
                FROM
58
                    services s
58
                    services s
59
                JOIN
59
                JOIN
60
                    servicestatus ss
60
                    servicestatus ss
61
                ON
61
                ON
62
                    ss.service_object_id = s.service_object_id
62
                    ss.service_object_id = s.service_object_id
63
                WHERE
63
                WHERE
64
                    service_id = $id
64
                    service_id = $id
65
                AND
65
                AND
66
                    instance_id = " . $GLOBALS["cfg"]["instance"] . "
66
                    s.instance_id = " . $GLOBALS["cfg"]["instance"] . "
67
            ";
67
            ";
68
            $res = $GLOBALS["db"]->query( $sql );
68
            $res = $GLOBALS["db"]->query( $sql );
69
            $row = $res->fetchRow();
69
            $row = $res->fetchRow();
70
            //$this->host_id=$row["host_id"];
70
            //$this->host_id=$row["host_id"];
71
            foreach ( $row as $feld => $wert )
71
            foreach ( $row as $feld => $wert )