Ejemplo n.º 1
0
        }
    }
    $addresses[$current_backend]['Addresses'] = $new_address_list;
}
if ($showaddrlist) {
    $oTemplate->assign('show_all', $show_all);
    $oTemplate->assign('page_number', $page_number);
    $oTemplate->assign('page_size', $page_size);
    $oTemplate->assign('total_addresses', $total_addresses);
    $oTemplate->assign('abook_compact_paginator', $abook_compact_paginator);
    $oTemplate->assign('abook_page_selector', $abook_page_selector);
    $oTemplate->assign('current_page_args', $current_page_args);
    $oTemplate->assign('abook_page_selector_max', $abook_page_selector_max);
    $oTemplate->assign('addresses', $addresses);
    $oTemplate->assign('current_backend', $current_backend);
    $oTemplate->assign('backends', $list_backends);
    $oTemplate->assign('abook_has_extra_field', $abook->add_extra_field);
    $oTemplate->assign('compose_new_win', $compose_new_win);
    $oTemplate->assign('compose_height', $compose_height);
    $oTemplate->assign('compose_width', $compose_width);
    $oTemplate->assign('form_action', $form_url);
    $oTemplate->display('addressbook_list.tpl');
}
/* Display the "new address" form */
//FIXME: Remove HTML from here! (echo abook_create_form() is OK, since it is all template based output
echo '<a name="AddAddress"></a>' . "\n";
echo abook_create_form($form_url, 'addaddr', _("Add to address book"), _("Add address"), $current_backend, $defdata);
echo "</form>\n";
/* Hook for extra address book blocks */
do_hook('addressbook_bottom', $null);
$oTemplate->display('footer.tpl');
Ejemplo n.º 2
0
                if ($abook->backends[$row['backend']]->writeable) {
                    echo html_tag('td', '<small>' . addCheckBox('sel[]', $selected, $row['backend'] . ':' . $row['nickname']) . '</small>', 'center', '', 'valign="top" width="1%"');
                } else {
                    echo html_tag('td', '&nbsp;', 'center', '', 'valign="top" width="1%"');
                }
                echo html_tag('td', '&nbsp;' . $row['nickname'] . '&nbsp;', 'left', '', 'valign="top" width="1%" nowrap') . html_tag('td', '&nbsp;' . $row['name'] . '&nbsp;', 'left', '', 'valign="top" width="1%" nowrap') . html_tag('td', '', 'left', '', 'valign="top" width="1%" nowrap') . '&nbsp;';
            }
            $email = $abook->full_address($row);
            echo makeComposeLink('src/compose.php?send_to=' . rawurlencode($email), htmlspecialchars($row['email'])) . '&nbsp;</td>' . "\n" . html_tag('td', '&nbsp;' . htmlspecialchars($row['label']) . '&nbsp;', 'left', '', 'valign="top" width="1%"') . "</tr>\n";
            $line++;
        }
        echo "</table>" . "\n<!-- end of address book table -->\n";
        /* End of list. Add edit/delete select buttons */
        if ($headerprinted) {
            echo html_tag('table', html_tag('tr', html_tag('td', addSubmit(_("Edit selected"), 'editaddr') . addSubmit(_("Delete selected"), 'deladdr'), 'center', '', 'colspan="5"')), 'center');
        }
        echo "</form>\n";
    }
}
/* end of addresslist */
/* Display the "new address" form */
echo '<a name="AddAddress"></a>' . "\n";
abook_create_form($form_url, 'addaddr', _("Add to address book"), _("Add address"), $defdata);
echo "</form>\n";
/* Add hook for anything that wants on the bottom */
echo "<!-- start of addressbook_bottom hook-->\n";
do_hook('addressbook_bottom');
echo "\n<!-- end of addressbook_bottom hook-->\n";
?>
</body></html>