/**
* addressbook.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Manage personal address book.
/* SquirrelMail required files. */
require_once(SM_PATH . 'include/validate.php');
-require_once(SM_PATH . 'functions/array.php');
require_once(SM_PATH . 'functions/display_messages.php');
require_once(SM_PATH . 'functions/addressbook.php');
require_once(SM_PATH . 'functions/strings.php');
require_once(SM_PATH . 'functions/html.php');
+/* lets get the global vars we may need */
+$key = $_COOKIE['key'];
+
+$username = $_SESSION['username'];
+$onetimepad = $_SESSION['onetimepad'];
+$base_uri = $_SESSION['base_uri'];
+$delimiter = $_SESSION['delimiter'];
+
+/* From the address form */
+if ( isset($_POST['addaddr']) ) {
+ $addaddr = &$_POST['addaddr'];
+}
+if ( isset($_POST['editaddr']) ) {
+ $editaddr = &$_POST['editaddr'];
+}
+if ( isset($_POST['deladdr']) ) {
+ $deladdr = &$_POST['deladdr'];
+}
+$sel = &$_POST['sel'];
+
+if (isset($_POST['oldnick'])) {
+ $oldnick = $_POST['oldnick'];
+}
+if (isset($_POST['backend'])) {
+ $backend = $_POST['backend'];
+}
+if (isset($_POST['doedit'])) {
+ $doedit = $_POST['doedit'];
+}
+
/* Make an input field */
function adressbook_inp_field($label, $field, $name, $size, $values, $add) {
global $color;
/* Handle user's actions */
-if($REQUEST_METHOD == 'POST') {
+if($_SERVER['REQUEST_METHOD'] == 'POST') {
/**************************************************
* Add new address *
do_hook('addressbook_bottom');
?>
-</BODY></HTML>
\ No newline at end of file
+</BODY></HTML>