FROM tblhostingconfigoptions RIGHT JOIN mod_monitis_options ON mod_monitis_options.option_id = tblhostingconfigoptions.optionid LEFT JOIN tblhosting ON tblhosting.id = tblhostingconfigoptions.relid LEFT JOIN tblorders ON tblorders.id = tblhosting.orderid LEFT JOIN tblclients ON tblclients.id = tblhosting.userid WHERE tblhostingconfigoptions.optionid = ' . $optionId . ' AND tblhosting.domainstatus = "Active" '; $result = mysql_query($query); $monitors = array(); while ($row = mysql_fetch_assoc($result)) { $row['settings'] = html_entity_decode($row['settings']); $row['web_site'] = MonitisSeviceHelper::url_IP($row, $row['monitor_type']); $res = MonitisHookClass::createCreateConfigOptionMonitor($row); $row['response'] = $res['data'][0]['response']; array_push($monitors, $row); } ?> <style type="text/css"> .monitis-options-result .datatable{ width: 100%; border-spacing: 1px; } .monitis-options-result .datatable td { padding: 5px; } .monitis-options-result .datatable .status{ font-weight:bold;
private function client_serversIds($userid) { $userProducts = MonitisSeviceHelper::userProducts($userid); $result = array('status' => 'error', 'msg' => 'No active products'); $srvrs = array(); if ($userProducts) { for ($i = 0; $i < count($userProducts); $i++) { $product = $userProducts[$i]; //if( $product["status"] == 'Active' && $product["serverid"] > 0 && !$this->isServer( $product["serverid"], $srvrs) ) { if ($product["serverid"] > 0 && !$this->isServer($product["serverid"], $srvrs)) { $srvrs[] = array('serverid' => intval($product["serverid"]), 'pid' => intval($product["pid"]), 'name' => $product["name"], 'groupname' => $product["groupname"]); } } $addonsrvrs = $this->_userAddonsServices($userid); if ($addonsrvrs) { for ($i = 0; $i < count($addonsrvrs); $i++) { if (!$this->isServer($addonsrvrs[$i]['serverid'], $srvrs)) { $srvrs[] = array('serverid' => intval($addonsrvrs[$i]['serverid']), 'pid' => 0, 'name' => '', 'groupname' => ''); } } } if (count($srvrs) > 0) { $result["status"] = 'ok'; $result["data"] = $srvrs; return $result; } } return $result; }
public function createAddonsMonitorById($addonId) { $products = MonitisSeviceHelper::addonProductsList($addonId); $result = array(); if ($products && count($products) > 0) { for ($i = 0; $i < count($products); $i++) { $result[] = self::createAddonsMonitorByProduct($products[$i]); } } return $result; }