X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddressbook.php;h=2df29cdba9e572719b4cb41ca60edbe8ac30a5b1;hb=8ed0d71a42bdb66faf6ecc9db45ec594d479a610;hp=9f55e23884cf4a8f41b760e3cd37ee7234dc36d6;hpb=355861846a51d35efe50848869d680fd3b4a5316;p=squirrelmail.git
diff --git a/src/addressbook.php b/src/addressbook.php
index 9f55e238..2df29cdb 100644
--- a/src/addressbook.php
+++ b/src/addressbook.php
@@ -3,7 +3,7 @@
/**
* addressbook.php
*
- * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Copyright (c) 1999-2002 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Manage personal address book.
@@ -11,117 +11,78 @@
* $Id$
*/
-/*****************************************************************/
-/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/
-/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/
-/*** + Base level indent should begin at left margin, as ***/
-/*** the require_once below looks. ***/
-/*** + All identation should consist of four space blocks ***/
-/*** + Tab characters are evil. ***/
-/*** + all comments should use "slash-star ... star-slash" ***/
-/*** style -- no pound characters, no slash-slash style ***/
-/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/
-/*** ALWAYS USE { AND } CHARACTERS!!! ***/
-/*** + Please use ' instead of ", when possible. Note " ***/
-/*** should always be used in _( ) function calls. ***/
-/*** Thank you for your help making the SM code more readable. ***/
-/*****************************************************************/
-
require_once('../src/validate.php');
require_once('../functions/array.php');
require_once('../functions/display_messages.php');
require_once('../functions/addressbook.php');
+require_once('../functions/strings.php');
+
+/* Make an input field */
+function adressbook_inp_field($label, $field, $name, $size, $values, $add) {
+ global $color;
+ echo '
' .
+ $label . ':
' .
+ '
' .
+ '' . $add . '
' . "\n";
+}
- // Sort array by the key "name"
- function alistcmp($a,$b) {
- if($a['backend'] > $b['backend'])
- return 1;
- else if($a['backend'] < $b['backend'])
- return -1;
+/* Output form to add and modify address data */
+function address_form($name, $submittext, $values = array()) {
+ global $color;
- return (strtolower($a['name']) > strtolower($b['name'])) ? 1 : -1;
- }
+ echo '
' ."\n";
- // Output form to add and modify address data
- function address_form($name, $submittext, $values = array()) {
- global $color;
- echo "
\n";
-
- // Display the "new address" form again
- printf("';
-
- $abortform = true;
+ if ($delfailed) {
+ $showaddrlist = true;
+ $defselected = $orig_sel;
}
- }
-
- // Should not get here...
- else {
- plain_error_message(_("Unknown error"), $color);
- $abortform = true;
- }
- } // End of edit address
-
-
- // Some times we end output before forms are printed
- if($abortform) {
- print "