X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddressbook.php;h=ab148752457edb1dc1877e9c2c16444be75b8e83;hb=08185f2a7631c3a12cb1ac085fec3be471b56b00;hp=ac99586a20053fdaf8c450cc9818589e8ce25151;hpb=5177fb2b1f84da8a9e45a4fcb45156d13d44b4cb;p=squirrelmail.git
diff --git a/src/addressbook.php b/src/addressbook.php
index ac99586a..ab148752 100644
--- a/src/addressbook.php
+++ b/src/addressbook.php
@@ -11,42 +11,49 @@
* $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');
+/* 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) {
global $color;
- echo '
' .
- $label . ': | ' .
- '' .
- '' . $add . ' |
' . "\n";
+ $td_str .= '">' . $add . '';
+ return html_tag( 'tr' ,
+ html_tag( 'td', $label . ':', 'right', $color[4]) .
+ html_tag( 'td', $td_str, 'left', $color[4])
+ )
+ . "\n";
}
/* Output form to add and modify address data */
function address_form($name, $submittext, $values = array()) {
global $color;
-
- echo '' ."\n";
-
- adressbook_inp_field(_("Nickname"), 'nickname', $name, 15, $values,
- '' . _("Must be unique") . '');
- adressbook_inp_field(_("E-mail address"), 'email', $name, 45, $values, '');
- adressbook_inp_field(_("First name"), 'firstname', $name, 45, $values, '');
- adressbook_inp_field(_("Last name"), 'lastname', $name, 45, $values, '');
- adressbook_inp_field(_("Additional info"), 'label', $name, 45, $values, '');
-
- echo '' . "\n" .
- ' |
' .
- "\n
\n";
+ echo html_tag( 'table',
+ adressbook_inp_field(_("Nickname"), 'nickname', $name, 15, $values,
+ '' . _("Must be unique") . '') .
+ adressbook_inp_field(_("E-mail address"), 'email', $name, 45, $values, '') .
+ adressbook_inp_field(_("First name"), 'firstname', $name, 45, $values, '') .
+ adressbook_inp_field(_("Last name"), 'lastname', $name, 45, $values, '') .
+ adressbook_inp_field(_("Additional info"), 'label', $name, 45, $values, '') .
+ html_tag( 'tr',
+ html_tag( 'td',
+ '',
+ 'center', $color[4], 'colspan="2"')
+ )
+ , 'center', '', 'border="0" cellpadding="1" cols="2" width="90%"') ."\n";
}
@@ -162,11 +169,13 @@ if($REQUEST_METHOD == 'POST') {
/* Display the "new address" form */
echo '';
+ echo '';
}
} /* end of addresslist */
/* Display the "new address" form */
echo '' . "\n" .
- '';