Claus Jensen & Kent B. Hansen
[squirrelmail.git] / src / addressbook.php
index 9f8e039e6da044b11671ad102b4e8bb96bef1813..923f85ec7552a2c5c251185fec9b452d96fc7776 100644 (file)
  * $Id$
  */
 
-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');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* 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');
 
 /* Make an input field */
 function adressbook_inp_field($label, $field, $name, $size, $values, $add) {
@@ -49,7 +53,7 @@ function address_form($name, $submittext, $values = array()) {
                                        $submittext . '">',
                                    'center', $color[4], 'colspan="2"')
                        )
-    , 'center', '', 'border="0" cellpadding="1" cols="2" width="90%"') ."\n";
+    , 'center', '', 'border="0" cellpadding="1" width="90%"') ."\n";
 }
 
 
@@ -171,7 +175,7 @@ if($REQUEST_METHOD == 'POST') {
                                       "\n". '<strong>' . _("Update address") . '</strong>' ."\n",
                                       'center', $color[0] )
                                    ),
-                             'center', '', 'width="100%" cols="1"' ) .
+                             'center', '', 'width="100%" ' );
                         address_form("editaddr", _("Update address"), $olddata);
                         echo '<INPUT TYPE=hidden NAME=oldnick VALUE="' . 
                              htmlspecialchars($olddata["nickname"]) . "\">\n" .
@@ -197,7 +201,7 @@ if($REQUEST_METHOD == 'POST') {
                                       '">' . _("ERROR") . ': ' . $abook->error . '</font></strong>' ."\n",
                                       'center' )
                                    ),
-                             'center', '', 'width="100%" cols="1"' );
+                             'center', '', 'width="100%"' );
 
                             /* Display the "new address" form again */
                             echo '<FORM ACTION="' . $PHP_SELF .
@@ -208,7 +212,7 @@ if($REQUEST_METHOD == 'POST') {
                                                     "\n". '<br><strong>' . _("Update address") . '</strong>' ."\n",
                                          'center', $color[0] )
                                      ),
-                                 'center', '', 'width="100%" cols="1"' ) .
+                                 'center', '', 'width="100%"' ) .
                             address_form("editaddr", _("Update address"), $newdata);
                             echo '<INPUT TYPE=hidden NAME=oldnick VALUE="' .
                                  htmlspecialchars($oldnick) . "\">\n" .
@@ -251,7 +255,7 @@ if (!empty($formerror)) {
                    '">' . _("ERROR") . ': ' . $formerror . '</font></strong>' ."\n",
             'center' )
         ),
-    'center', '', 'width="100%" cols="1"' );
+    'center', '', 'width="100%"' );
 }
 
 
@@ -297,8 +301,8 @@ if ($showaddrlist) {
                                 html_tag( 'tr',
                                     html_tag( 'td', "\n" . '<strong>' . $row['source'] . '</strong>' . "\n", 'center', $color[0] )
                                 ) ,
-                        'center', '', 'width="95%" cols="1"' ) ."\n"
-                . html_tag( 'table', '', 'center', '', 'cols="5" border="0" cellpadding="1" cellspacing="0" width="90%"' ) .
+                        'center', '', 'width="95%"' ) ."\n"
+                . html_tag( 'table', '', 'center', '', 'border="0" cellpadding="1" cellspacing="0" width="90%"' ) .
                       html_tag( 'tr', "\n" .
                           html_tag( 'th', '&nbsp;', 'left', '', 'width="1%"' ) .
                           html_tag( 'th', _("Nickname"), 'left', '', 'width="1%"' ) .
@@ -370,7 +374,7 @@ echo '<a name="AddAddress"></a>' . "\n" .
                 'center', $color[0]
             )
         )
-    , 'center', '', 'width="100%" cols="1"' ) ."\n";
+    , 'center', '', 'width="100%"' ) ."\n";
 address_form('addaddr', _("Add address"), $defdata);
 echo '</FORM>';