예제 #1
0
<div class="menu">
    <ul class="page-menu">
        <li>
            <?php 
FormHelpers::startForm('GET', '?page=contact');
?>
            <?php 
FormHelpers::createHidden('page', 'contact');
?>
            <?php 
FormHelpers::createSubmit('New Contact');
?>
            <?php 
FormHelpers::endForm();
?>
        </li>
    </ul>
</div>
<div class="section">
    <h1>Contacts</h1>
    <?php 
foreach (GuiHelpers::getAllChannels() as $id => $info) {
    $contact = new Contact($id);
    ?>
    <div class="info">
        <strong><?php 
    p($info['name']);
    ?>
</strong>
        <div class="right"><a href="?page=contact&id=<?php 
    p($contact->getId());
예제 #2
0
<?php

$monitor = Monitor::fetch(intval($_GET['id']));
if (FormHelpers::donePOST()) {
    $monitor->processDelete($_GET);
    ?>
<div class="message">
    The monitor has been deleted. <br />
    <a href="?page=monitors">Return to monitors</a>
</div>
        <?
    }
    else
    {
?>
<div class="form-field">
</div>
<?php 
    FormHelpers::startForm('POST', '?page=monitor-delete&id=' . $monitor->getId());
    FormHelpers::createHidden('confirmed', '1');
    ?>
<center>
    Are you sure you want to delete this monitor?<br />
    <?php 
    FormHelpers::createSubmit('Yes');
    ?>
</center>
<?php 
    FormHelpers::endForm();
}
예제 #3
0
                        </div>
                        <div class="descr"><?php 
                p($chandle);
                ?>
</div>
                    </div>
                <?php 
            }
        }
        ?>
    <div class="form-field">
    <?php 
        FormHelpers::startForm('GET', '?page=channel', 'name="newchan"');
        FormHelpers::createHidden('page', 'channel');
        FormHelpers::createHidden('contact_id', $contact->getId());
        $options = array();
        foreach ($GLOBALS['channel_types'] as $type) {
            $o = new $type();
            $options[] = FormHelpers::getOption($o->getName(), $type);
        }
        FormHelpers::createSelect('type', $options);
        FormHelpers::createSubmit('Add Notification Channel');
        FormHelpers::endForm();
        ?>
    </div>
    <?php 
    }
    ?>
</div>
<?php 
}
예제 #4
0
    p($c->getName());
    ?>
</div>
    <div class="form-field"><strong>Channel Type: </strong><?php 
    p($channel->getName());
    ?>
    <div class="form-field"><strong>Description: </strong><?php 
    p($channel->getDescription());
    ?>
</div>
    </div>

    <h2>Configuration</h2>
    <?php 
    if ($channel->getId() != null) {
        FormHelpers::startForm('POST', '?page=channel&id=' . $channel->getId());
    } else {
        FormHelpers::startForm('POST', '?page=channel&contact_id=' . $channel->getOwner() . '&type=' . $_GET['type']);
    }
    require_once PW2_PATH . '/frontend/forms/channels/' . get_class($channel) . '.php';
    ?>
    <div class="form-field"><center><?php 
    FormHelpers::createSubmit('Submit');
    ?>
</center></div>
    <?php 
    FormHelpers::endForm();
    ?>
</div>
<?php 
}
예제 #5
0
    </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
    <h1>phpWatch Installer</h1>
    <p>Thank you for choosing <strong>phpWatch</strong> as your service monitoring solution.  Before beginning the
    installation process, please assure that the following steps are compelete:</p>
    <ul>
        <li>The database for installation is emptied of tables from phpWatch 1.x.x or other applications.</li>
        <li>config.php is writable:
        <?php 
if (is_writable('../config.php')) {
    p('<div class="valid">Yes</div>');
} else {
    $errors = true;
    p('<div class="invalid">No</div>');
}
?>
        </li>
    </ul>
    <?php 
FormHelpers::startForm('POST', './index.php');
?>
    <?php 
FormHelpers::createHidden('page', 'database');
?>
    <center><?php 
FormHelpers::createSubmit('Continue', $errors ? 'disabled="disabled"' : null);
?>
</center>
    <?php 
FormHelpers::endForm();
?>
</div>
예제 #7
0
?>
<div class="menu">
    <ul class="page-menu">
        <li>
            <?php 
FormHelpers::startForm('GET', '?page=monitor');
FormHelpers::createHidden('page', 'monitor');
?>
            <?php 
$options = array();
foreach ($GLOBALS['monitor_types'] as $type) {
    $o = new $type();
    $options[] = FormHelpers::getOption($o->getName(), $type);
}
FormHelpers::createSelect('type', $options);
FormHelpers::createSubmit('New Monitor');
?>
            <?php 
FormHelpers::endForm();
?>
        </li>
    </ul>
        Display: <a href="?page=monitors">Expand All</a> - <a href="?page=monitors&expand=none">Collapse All</a>
</div>
<div class="section">
    <h1>Monitors</h1>
    <?php 
foreach (GuiHelpers::getMonitors() as $monitor) {
    ?>
    <?php 
    switch ($monitor->getStatus()) {