$newTimezone = $rules['timeZone']; if ($newTimezone != $hTimezone) { $params = array('contactId' => $contactId, 'textType' => '0', 'timezone' => $newTimezone * 60); $resp = monitisClientApi::editContact($params, $userid); if ($resp["status"] == 'ok') { monitisClientUi::successMessage('Contact timezone updated'); $hTimezone = $newTimezone; } else { monitisClientUi::errorMessage($resp['error']); } } break; } } if ($userid > 0) { $oService = new monitisClientUi(); $monitors = $oService->clientProductMonitors($userid); if ($monitors) { /* all user's notification rules */ $alerts = monitisClientApi::getNotificationRules(array('monitorType' => 'external'), $userid); /* default notification rule - type "All" */ $allAlert = MonitisHelper::in_array($alerts, 'monitorId', 'All'); $rule = ''; $allRuleid = 0; $allContactId = 0; if ($allAlert) { $rule = $allAlert['rule']; $allRuleid = $allAlert['id']; $allContactId = $allAlert['contactId']; } else { $rule = MONITIS_NOTIFICATION_RULE;
if (isset($_SESSION) && isset($_SESSION['uid']) && $_SESSION['uid'] > 0) { //$userid = $this->_tpl_vars['clientsdetails']['userid']; $userid = $_SESSION['uid']; } include_once 'modules/addons/monitis_addon/lang/' . $language . '.php'; ?> <div class="page-header"> <div class="styled_title"><h1><?php echo $MLANG['network_status']; ?> </h1></div> </div> <?php //echo "************ userid = $userid"; if (isset($userid) && $userid > 0) { $oClient = new monitisClientUi(); $monitors = $oClient->userNetworkStatus($userid); $isMonitor = false; if ($monitors && $monitors["status"] == 'ok') { echo '<section class="monitis_monitors">'; $mons = $monitors["data"]; for ($i = 0; $i < count($mons); $i++) { $item = $mons[$i]; if (isset($item['external']) && count($item['external']) > 0 || isset($item["internal"]) && count($item["internal"]) > 0) { echo '<h3>' . $item["groupname"] . ' - ' . $item["name"] . '</h3>'; $isMonitor = true; } if (isset($item['external']) && count($item['external']) > 0) { echo '<figure>' . monitis_embed_module($item['external'][0]['publickey'], 770, 350) . '</figure>'; $isMonitor = true; }