Began rework of options page. Also added 3 plugins (filters, translate, and squirrels...
[squirrelmail.git] / src / addressbook.php
index 8201f4c92431db5c76c515ff0c82d2e7b69d3fb2..e769db09bada5a444dbb70959b2a598304e6f3d2 100644 (file)
     **  $Id$
     **/
 
-   include('../src/validate.php');
-   include('../functions/array.php');
-   include('../functions/page_header.php');
-   include('../functions/display_messages.php');
-   include('../functions/addressbook.php');
+   require_once('../src/validate.php');
+   require_once('../functions/array.php');
+   require_once('../functions/display_messages.php');
+   require_once('../functions/addressbook.php');
 
    // Sort array by the key "name"
    function alistcmp($a,$b) {   
@@ -76,8 +75,6 @@
    }
 
 
-   include('../src/load_prefs.php');
-
    // Open addressbook, with error messages on but without LDAP (the
    // second "true"). Don't need LDAP here anyway
    $abook = addressbook_init(true, true);
       $prevbackend = -1;
       $headerprinted = false;
 
+      echo "<p align=center><a href=\"#AddAddress\">" .
+         _("Add address") . "</a></p>\n";
+
       // List addresses
       printf("<FORM ACTION=\"%s\" METHOD=\"POST\">\n", $PHP_SELF);
       while(list($undef,$row) = each($alist)) {
         // New table header for each backend
         if($prevbackend != $row["backend"]) {
            if($prevbackend >= 0) {
+              print "<TR><TD COLSPAN=5 ALIGN=center>\n";
+              printf("<INPUT TYPE=submit NAME=editaddr VALUE=\"%s\">\n",
+                 _("Edit selected"));
+              printf("<INPUT TYPE=submit NAME=deladdr VALUE=\"%s\">\n",
+                 _("Delete selected"));
+              echo "</tr>\n";
               print '<TR><TD COLSPAN="5" ALIGN=center>';
               print "&nbsp;<BR></TD></TR></TABLE>\n";
            }
 
 
    // Display the "new address" form
+   echo "<a name=\"AddAddress\"></a>\n";
    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>";