X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddressbook.php;h=923f85ec7552a2c5c251185fec9b452d96fc7776;hb=44c046311a3f62a461a82d31f792f3fc4421f820;hp=43e3677751264b29386ae5244770ce412d9ae449;hpb=bd9bbfefba8fa274260a37c965f7510bb6670599;p=squirrelmail.git
diff --git a/src/addressbook.php b/src/addressbook.php
index 43e36777..923f85ec 100644
--- a/src/addressbook.php
+++ b/src/addressbook.php
@@ -11,41 +11,49 @@
* $Id$
*/
-require_once('../src/validate.php');
-require_once('../functions/array.php');
-require_once('../functions/display_messages.php');
-require_once('../functions/addressbook.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" width="90%"') ."\n";
}
@@ -161,11 +169,13 @@ if($REQUEST_METHOD == 'POST') {
/* Display the "new address" form */
echo '';
}
- echo ''
} /* end of addresslist */
/* Display the "new address" form */
echo '' . "\n" .
- '';