FormHelpers::createRadio('match_method', HttpValidationMonitor::$MATCH_REGEX, $monitor->getMatchMethod() == HttpValidationMonitor::$MATCH_REGEX ? 'checked="checked"' : '');
?>
 Use regular expressions (Will error if
    invalid pattern.  See <a href="http://www.php.net/manual/en/pcre.pattern.php" target="_new">Reference</a>)</li>
    </ul>
    <div class="error"><?php 
FormHelpers::checkError('match_method', $errors);
?>
</div>
</div
><div class="form-field">
    <strong>Condition:</strong>
    <div class="descr">What condition must be met for the monitor to be considered online?</div>
    <ul class="options">
    <li><?php 
FormHelpers::createRadio('mode', HttpValidationMonitor::$MODE_DOES_CONTAIN, $monitor->getMode() == HttpValidationMonitor::$MODE_DOES_CONTAIN ? 'checked="checked"' : '');
?>
 The monitor <strong>must</strong> contain
    the pattern.</li>
    <li><?php 
FormHelpers::createRadio('mode', HttpValidationMonitor::$MODE_DOESNT_CONTAIN, $monitor->getMode() == HttpValidationMonitor::$MODE_DOESNT_CONTAIN ? 'checked="checked"' : '');
?>
 The monitor must <strong>not</strong>
    contain the pattern.</li>
    </ul>
    <div class="error"><?php 
FormHelpers::checkError('mode', $errors);
?>
</div>
</div>
示例#2
0
FormHelpers::checkError('message', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Phone Number:</strong>
    <div class="descr">Phone number, no dashes (e.g. 1234567890).</div>
    <?php 
FormHelpers::createText('number', $channel->getNumber());
?>
    <div class="error"><?php 
FormHelpers::checkError('number', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Carrier:</strong>
    <div class="descr">Mobile carrier.</div>
    <?php 
$options = array();
foreach (array_keys(SmsChannel::$carriers) as $c) {
    $options[] = FormHelpers::getOption($c, $c, $channel->getCarrier() == $c ? 'selected="selected"' : null);
}
FormHelpers::createSelect('carrier', $options);
?>
    <div class="error"><?php 
FormHelpers::checkError('number', $errors);
?>
</div>
</div>
示例#3
0
    <h1><?php 
    p($contact->getId() > 0 ? 'Edit' : 'Add');
    ?>
 Contact</h1>
    <h2>General Settings</h2>
    <?php 
    FormHelpers::startForm('POST', '?page=contact&id=' . $contact->getId(), 'name="general"');
    ?>
        <div class="form-field">
            <strong>Name:</strong>
            <div class="descr">Name of contact.</div>
            <?php 
    FormHelpers::createText('name', $contact->getName(), 'size="30"');
    ?>
            <div class="error"><?php 
    FormHelpers::checkError('name', $errors);
    ?>
</div>
        </div>
    <div class="form-field"><center><?php 
    FormHelpers::createButton('Submit', 'onClick="document.general.submit()"');
    ?>
</center></div>
    <?php 
    FormHelpers::endForm();
    if ($contact->getId() != null) {
        ?>
    <h2>Notification Channels</h2>
    <strong>Description:</strong>
    <div class="type-descr">Additions, deletions, and modifications of channels will be saved automatically.</div>
    <?php 
示例#4
0
    ?>
 Schedule Downtime - Starting in
            <?php 
    list($start_h, $start_m) = GuiHelpers::getHoursMinutes($monitor->getDowntimeStart());
    list($end_h, $end_m) = GuiHelpers::getHoursMinutes($monitor->getDowntimeEnd());
    FormHelpers::createText('downtime_start_hours', $start_h, 'size="2"');
    p(' hours, ');
    FormHelpers::createText('downtime_start_minutes', $start_m, 'size="2"');
    p(' minutes, lasting for ');
    FormHelpers::createText('downtime_end_hours', $end_h, 'size="2"');
    p(' hours, ');
    FormHelpers::createText('downtime_end_minutes', $end_m, 'size="2"');
    p(' minutes.');
    ?>
            <div class="error"><?php 
    FormHelpers::checkError('interval', $errors);
    ?>
</div>
            <div class="descr">Do not query, log uptime, nor send notifications for this monitor starting at the
            specified time for the specified interval.</div>
            </li>
        </ul>
    </div>

    <h2>"<?php 
    p($monitor->getName());
    ?>
" Specific Settings</h2>
    <strong>Description:</strong>
    <div class="type-descr"><?php 
    p($monitor->getDescription());
示例#5
0
?>
</div>
    </div>
<div class="form-field">
    <strong>Message Format:</strong>
    <div class="descr">Format of message to send.</div>
    <?php 
if ($channel->getMessageFormat()) {
    $msg = $channel->getMessageFormat();
} else {
    $msg = '%s:%d (%s) is offline.';
}
FormHelpers::createTextArea('message', $msg, 'rows="5" cols="100"');
?>
    <div class="error"><?php 
FormHelpers::checkError('message', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Address:</strong>
    <div class="descr">Properly formatted e-mail address.</div>
    <?php 
FormHelpers::createText('address', $channel->getAddress(), 'size="40"');
?>
    <div class="error"><?php 
FormHelpers::checkError('address', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Timeout:</strong>
    <div class="descr">The number of seconds until a connection attempt times out.</div>
    <?php 
FormHelpers::createText('timeout', $monitor->getTimeout(), 'size="3"');
?>
    <div class="error"><?php 
FormHelpers::checkError('timeout', $errors);
?>
</div>
</div>
示例#7
0
FormHelpers::checkError('message', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Phone Number:</strong>
    <div class="descr">Phone number, no dashes (e.g. 1234567890).</div>
    <?php 
FormHelpers::createText('number', $channel->getNumber());
?>
    <div class="error"><?php 
FormHelpers::checkError('number', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Carrier:</strong>
    <div class="descr">Mobile carrier.</div>
    <?php 
$options = array();
foreach (array_keys(SmsChannel::$carriers) as $c) {
    $options[] = FormHelpers::getOption($c, urlencode($c), $channel->getCarrier() == $c ? 'selected="selected"' : null);
}
FormHelpers::createSelect('carrier', $options);
?>
    <div class="error"><?php 
FormHelpers::checkError('carrier', $errors);
?>
</div>
</div>