예제 #1
0
    <?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 
        if ($contact->getId() != null) {
            $existing = GuiHelpers::getAllChannels($contact->getId());
            $existing = $existing[$contact->getId()]['channels'];
            foreach ($existing as $e) {
                $chandle = Channel::fetch(intval($e['id']));