Exemplo n.º 1
0
            <?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());
    ?>
">Edit</a> - <a
        href="?page=contact-delete&id=<?php 
    p($contact->getId());
    ?>
">Delete</a></div>
Exemplo n.º 2
0
</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 
        if ($contact->getId() != null) {
            $existing = GuiHelpers::getAllChannels($contact->getId());
            $existing = $existing[$contact->getId()]['channels'];
            foreach ($existing as $e) {
                $chandle = Channel::fetch(intval($e['id']));
                ?>
                    <div class="info">
                        <?php 
                p($chandle->getName());
                ?>
 
                        <div class="right">
                            <a href="?page=channel&id=<?php 
                p($e['id']);
                ?>
">Edit</a> -
                            <a href="?page=channel-delete&id=<?php