/**
** addressbook.php
**
+ ** Copyright (c) 1999-2000 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
** Manage personal address book.
**
**/
session_start();
- if(!isset($logged_in)) {
- echo _("You must login first.");
- exit;
- }
- if(!isset($username) || !isset($key)) {
- echo _("You need a valid user and password to access this page!");
- exit;
- }
-
if (!isset($config_php))
include("../config/config.php");
if (!isset($array_php))
include("../functions/array.php");
+ if (!isset($auth_php))
+ include("../functions/auth.php");
if (!isset($strings_php))
include("../functions/strings.php");
- if (!isset($imap_php))
- include("../functions/imap.php");
if (!isset($page_header_php))
include("../functions/page_header.php");
if (!isset($display_messages_php))
if (!isset($addressbook_php))
include("../functions/addressbook.php");
+ is_logged_in();
// Sort array by the key "name"
function alistcmp($a,$b) {
}
- // IMAP Login
- $imapConnection = sqimap_login ($username, $key,
- $imapServerAddress, $imapPort, 10);
include("../src/load_prefs.php");
- sqimap_logout ($imapConnection);
-
// Open addressbook, with error messages on but without LDAP (the
// second "true"). Don't need LDAP here anyway
// Display the "new address" form
- printf("<FORM ACTION=\"%s\" METHOD=\"POST\">\n", $PHP_SELF);
+ printf("<FORM ACTION=\"%s\" NAME=f_add METHOD=\"POST\">\n", $PHP_SELF);
print "<TABLE WIDTH=100% COLS=1 ALIGN=CENTER>\n";
print "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>\n<STRONG>";
printf(_("Add to %s"), $abook->localbackendname);
address_form("addaddr", _("Add address"), $defdata);
print "</FORM>";
+ // Add hook for anything that wants on the bottom
+ do_hook("addressbook_bottom");
?>
</BODY></HTML>