/**
* 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/global.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 */
+sqgetGlobalVar('key', $key, SQ_COOKIE);
+
+sqgetGlobalVar('username', $username, SQ_SESSION);
+sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION);
+sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
+sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
+
+/* From the address form */
+sqgetGlobalVar('addaddr', $addaddr, SQ_POST);
+sqgetGlobalVar('editaddr', $editaddr, SQ_POST);
+sqgetGlobalVar('deladdr', $deladdr, SQ_POST);
+sqgetGlobalVar('sel', $sel, SQ_POST);
+sqgetGlobalVar('oldnick', $oldnick, SQ_POST);
+sqgetGlobalVar('backend', $backend, SQ_POST);
+sqgetGlobalVar('doedit', $doedit, SQ_POST);
+
/* 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(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'POST') {
/**************************************************
* Add new address *
do_hook('addressbook_bottom');
?>
-</BODY></HTML>
\ No newline at end of file
+</BODY></HTML>