p(GuiHelpers::getStatistic('monitor_count')); ?> </p> <p class="side-title">Total Contacts:</p> <p><?php p(GuiHelpers::getStatistic('contact_count')); ?> </p> <p class="side-title">Total Log Entries:</p> <p><?php p(GuiHelpers::getStatistic('log_count')); ?> </p> <p class="side-title">Last Offline:</p> <p><?php p(GuiHelpers::formatDateLong(GuiHelpers::getStatistic('last_offline'))); ?> </li> </div> <div> <p class="side-title">Version Check:</p> <?php if (isset($_GET['update'])) { list($good, $info) = GuiHelpers::checkVersion(); p($info); } else { p('<p class="center"><strong><a href="?page=monitors&update=1">Check for Updates</a></strong></p>'); } ?> </div>
foreach ($contacts as $i => $c) { if ($i > 0) { p(', '); } p('<a href="?page=contact&id=' . $c['id'] . '">' . $c['name'] . '</a>'); } } else { p('None'); } ?> <li><strong>Last Query:</strong> <?php if ($monitor->getStatus() == STATUS_UNPOLLED) { p('N/A'); } else { p(GuiHelpers::formatDateLong($monitor->getLastQuery())); } ?> </li> <?php list($total, $week, $day) = Statistics::get('monitor' . $monitor->getId()); ?> <li> <strong>Uptime (Day):</strong> <?php p($day['total'] > 0 ? round(100 * $day['online'] / $day['total'], 2) . '% (' . $day['online'] . ' of ' . $day['total'] . ')' : 'N/A'); ?> </li> <li> <strong>Uptime (Week):</strong> <?php p($week['total'] > 0 ? round(100 * $week['online'] / $week['total'], 2) . '% (' . $week['online'] . ' of ' . $week['total'] . ')' : 'N/A'); ?>