X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddressbook.php;h=d269fe5a95f156df3aa17e692bfb85a8b056aa37;hb=7aaa81fcf8383ee72ee0e4fd3cb2fd8d5f9708b5;hp=c69fee4617235b27125fb841b658d0e7708786aa;hpb=b43bdb85628410337ed91464adbde5eb848f4254;p=squirrelmail.git
diff --git a/src/addressbook.php b/src/addressbook.php
index c69fee46..d269fe5a 100644
--- a/src/addressbook.php
+++ b/src/addressbook.php
@@ -2,27 +2,23 @@
/**
** 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.
**
**/
- 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;
- }
+ session_start();
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))
@@ -30,6 +26,7 @@
if (!isset($addressbook_php))
include("../functions/addressbook.php");
+ is_logged_in();
// Sort array by the key "name"
function alistcmp($a,$b) {
@@ -81,12 +78,7 @@
}
- // 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
@@ -96,13 +88,6 @@
exit();
}
- print "\n";
- print "