Subversion-Projekte lars-tiefland.nagios-php

Revision

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

Revision 109 Revision 110
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: 109 $
7
     * @version $Rev: 110 $
Zeile 8... Zeile 8...
8
     */
8
     */
Zeile 9... Zeile 9...
9
 
9
 
10
    // $Id: servicegroup.php 109 2013-01-03 10:16:06Z lars $
10
    // $Id: servicegroup.php 110 2013-01-03 10:16:59Z lars $
11
 
11
 
12
    /**
12
    /**
13
     * serviceGroup
13
     * serviceGroup
14
     * 
14
     * 
15
     * @package nagios-php
15
     * @package nagios-php
16
     * @author Lars Tiefland
16
     * @author Lars Tiefland
17
     * @copyright 2013
17
     * @copyright 2013
18
     * @version $Id: servicegroup.php 109 2013-01-03 10:16:06Z lars $
18
     * @version $Id: servicegroup.php 110 2013-01-03 10:16:59Z lars $
19
     * @access public
19
     * @access public
20
     */
20
     */
Zeile 32... Zeile 32...
32
         */
32
         */
33
        public function __construct($id)
33
        public function __construct($id)
34
        {
34
        {
35
            $sql = "SELECT
35
            $sql = "SELECT
36
                    alias,
36
                    alias,
37
                    hostgroup_id
37
                    servicegroup_id
38
                FROM
38
                FROM
39
                    hostgroups
39
                    servicegroups
40
                WHERE
40
                WHERE
41
                    instance_id = " . $GLOBALS["cfg"]["instance"] . "
41
                    instance_id = " . $GLOBALS["cfg"]["instance"] . "
42
                AND
42
                AND
43
                    hostgroup_id = $id
43
                    servicegroup_id = $id
44
            ";
44
            ";
45
            $res = $GLOBALS["db"]->query( $sql );
45
            $res = $GLOBALS["db"]->query( $sql );
46
            $row = $res->fetchRow();
46
            $row = $res->fetchRow();
47
            foreach ( $row as $feld => $wert )
47
            foreach ( $row as $feld => $wert )
48
            {
48
            {