예제 #1
0
파일: service.php 프로젝트: Evolix/lilac
                echo $lilac->element_desc("contact_groups", "nagios_services_desc");
                ?>
<br />
				<br />
				</form>
				</td>
			</tr>
			</table>
			<?php 
            } else {
                if ($_GET['section'] == 'servicegroups') {
                    $inherited_list = $service->getInheritedServiceGroups();
                    $numOfInheritedGroups = count($inherited_list);
                    $c = new Criteria();
                    $c->add(NagiosServiceGroupMemberPeer::SERVICE, $service->getId());
                    $servicegroups_list = NagiosServiceGroupMemberPeer::doSelect($c);
                    $numOfServiceGroups = count($servicegroups_list);
                    ?>
			<table width="100%" border="0">
			<tr>
				<td width="100" align="center" valign="top">
				<img src="<?php 
                    echo $path_config['image_root'];
                    ?>
contact.gif" />
				</td>
				<td valign="top">
						<?php 
                    if ($numOfInheritedGroups) {
                        ?>
							<table width="100%" align="center" cellspacing="0" cellpadding="2" border="0">
예제 #2
0
            echo $_GET['id'];
            ?>
&section=extended&edit=1">Edit</a> ]
					<?php 
        }
        ?>
				</td>
			</tr>
			</table>
			<br />
			<?php 
    } else {
        if ($_GET['section'] == 'members') {
            $c = new Criteria();
            $c->add(NagiosServiceGroupMemberPeer::SERVICE_GROUP, $_GET['id']);
            $member_list = NagiosServiceGroupMemberPeer::doSelect($c);
            $numOfMembers = count($member_list);
            ?>
			<table width="100%" border="0">
			<tr>
				<td width="100" align="center" valign="top">
				<img src="<?php 
            echo $path_config['image_root'];
            ?>
services.gif" />
				</td>
				<td valign="top">
				<table width="100%" align="center" cellspacing="0" cellpadding="2" border="0">
					<tr class="altTop">
					<td colspan="2">Members:</td>
					</tr>
예제 #3
0
 /**
  * Gets an array of NagiosServiceGroupMember objects which contain a foreign key that references this object.
  *
  * If this collection has already been initialized with an identical Criteria, it returns the collection.
  * Otherwise if this NagiosServiceGroup has previously been saved, it will retrieve
  * related NagiosServiceGroupMembers from storage. If this NagiosServiceGroup is new, it will return
  * an empty collection or the current collection, the criteria is ignored on a new object.
  *
  * @param      PropelPDO $con
  * @param      Criteria $criteria
  * @return     array NagiosServiceGroupMember[]
  * @throws     PropelException
  */
 public function getNagiosServiceGroupMembers($criteria = null, PropelPDO $con = null)
 {
     if ($criteria === null) {
         $criteria = new Criteria(NagiosServiceGroupPeer::DATABASE_NAME);
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collNagiosServiceGroupMembers === null) {
         if ($this->isNew()) {
             $this->collNagiosServiceGroupMembers = array();
         } else {
             $criteria->add(NagiosServiceGroupMemberPeer::SERVICE_GROUP, $this->id);
             NagiosServiceGroupMemberPeer::addSelectColumns($criteria);
             $this->collNagiosServiceGroupMembers = NagiosServiceGroupMemberPeer::doSelect($criteria, $con);
         }
     } else {
         // criteria has no effect for a new object
         if (!$this->isNew()) {
             // the following code is to determine if a new query is
             // called for.  If the criteria is the same as the last
             // one, just return the collection.
             $criteria->add(NagiosServiceGroupMemberPeer::SERVICE_GROUP, $this->id);
             NagiosServiceGroupMemberPeer::addSelectColumns($criteria);
             if (!isset($this->lastNagiosServiceGroupMemberCriteria) || !$this->lastNagiosServiceGroupMemberCriteria->equals($criteria)) {
                 $this->collNagiosServiceGroupMembers = NagiosServiceGroupMemberPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastNagiosServiceGroupMemberCriteria = $criteria;
     return $this->collNagiosServiceGroupMembers;
 }
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(NagiosServiceGroupMemberPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(NagiosServiceGroupMemberPeer::DATABASE_NAME);
         $criteria->add(NagiosServiceGroupMemberPeer::ID, $pks, Criteria::IN);
         $objs = NagiosServiceGroupMemberPeer::doSelect($criteria, $con);
     }
     return $objs;
 }