コード例 #1
0
<div class="form-field">
    <strong>Path:</strong>
    <div class="descr">The path to a page on the host above without a leading slash.  For example, "index.html".</div>
    <?php 
FormHelpers::createText('path', $monitor->getPath());
?>
    <div class="error"><?php 
FormHelpers::checkError('path', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Pattern:</strong>
    <div class="descr">The pattern to find in the response.</div>
    <?php 
FormHelpers::createText('match_str', $monitor->getMatchString(), 'size="50"');
?>
    <div class="error"><?php 
FormHelpers::checkError('match_str', $errors);
?>
</div>
</div>
<div class="form-field">
    <strong>Match Method:</strong>
    <div class="descr">The method by which the pattern will be checked.</div>
    <ul class="options">
    <li><?php 
FormHelpers::createRadio('match_method', HttpValidationMonitor::$MATCH_FIND, $monitor->getMatchMethod() == HttpValidationMonitor::$MATCH_FIND ? 'checked="checked"' : '');
?>
 Basic match</li>
    <li><?php 
コード例 #2
0
ファイル: SmsChannel.php プロジェクト: ryanaverill/phpwatch
    $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>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);
コード例 #3
0
ファイル: contact.php プロジェクト: jalopezsuarez/phpwatch
if ($show_form) {
    ?>
<div class="section">
    <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>
コード例 #4
0
ファイル: monitor.php プロジェクト: jalopezsuarez/phpwatch
            <div class="descr">Do not query, log uptime, nor send notifications for this monitor indefinitely.</div>
            <li>
            <?php 
    FormHelpers::createRadio('status', STATUS_DOWNTIME, $monitor->getStatus() == STATUS_DOWNTIME ? 'checked="checked"' : '');
    ?>
 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());
    ?>
コード例 #5
0
ファイル: database.php プロジェクト: jalopezsuarez/phpwatch
    </div>
    <div class="form-field">
        <strong>Database Name:</strong>
        <div class="descr">Name of database.</div>
        <?php 
FormHelpers::createText('db_name', '');
?>
    </div>
    <div class="form-field">
        <strong>Database User:</strong>
        <div class="descr">User with at least SELECT, INSERT, UPDATE, DELETE, and CREATE privilages.</div>
        <?php 
FormHelpers::createText('db_user', '');
?>
    </div>
    <div class="form-field">
        <strong>User Password:</strong>
        <div class="descr">Password for user above.</div>
        <?php 
FormHelpers::createText('db_pass', '');
?>
    </div>
    <div class="form-field"><center><?php 
FormHelpers::createSubmit('Continue');
?>
</center></div>
    <?php 
FormHelpers::endForm();
?>
</div>
コード例 #6
0
ファイル: EmailChannel.php プロジェクト: ryanaverill/phpwatch
?>
</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>
コード例 #7
0
<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>