From: tokul Date: Thu, 8 Apr 2004 12:48:24 +0000 (+0000) Subject: bugfix. table was incorrectly closed when system had more than one backend listing. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=fc93f97cf33e677789c3affcd0e45d5e95e3b3bd bugfix. table was incorrectly closed when system had more than one backend listing. tags coverted to lowercase. added new lines to make nicer formating. made it xhtml friendly. do we port all changes to stable or only bugfix? git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7045 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/addressbook.php b/src/addressbook.php index c1f23075..a02cc4e6 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -351,7 +351,7 @@ if ($showaddrlist) { /* List addresses */ if (count($alist) > 0) { - echo '
' . "\n"; + echo '' . "\n"; while(list($undef,$row) = each($alist)) { /* New table header for each backend */ @@ -360,10 +360,10 @@ if ($showaddrlist) { echo html_tag( 'table', html_tag( 'tr', html_tag( 'td', - '\n" . - '\n", + '\n" . + '\n", 'center', '', 'colspan="5"' ) ) . html_tag( 'tr', @@ -376,8 +376,9 @@ if ($showaddrlist) { html_tag( 'tr', html_tag( 'td', "\n" . '' . $row['source'] . '' . "\n", 'center', $color[0] ) ) , - 'center', '', 'width="95%"' ) ."\n" - . html_tag( 'table', '', 'center', '', 'border="0" cellpadding="1" cellspacing="0" width="90%"' ) . + 'center', '', 'width="95%"' ) ."\n" . + "\n" . + html_tag( 'table', '', 'center', '', 'border="0" cellpadding="1" cellspacing="0" width="90%"' ) . html_tag( 'tr', "\n" . html_tag( 'th', ' ', 'left', '', 'width="1%"' ) . html_tag( 'th', _("Nickname"), 'left', '', 'width="1%"' ) . @@ -389,7 +390,7 @@ if ($showaddrlist) { $line = 0; $headerprinted = true; } /* End of header */ - + $prevbackend = $row['backend']; /* Check if this user is selected */ @@ -402,9 +403,9 @@ if ($showaddrlist) { { echo html_tag( 'tr', '', '', $tr_bgcolor) . html_tag( 'td', - '' . + '' . addCheckBox('sel[]', $selected, $row['backend'].':'.$row['nickname']). - '' , + '' , 'center', '', 'valign="top" width="1%"' ) . html_tag( 'td', ' ' . $row['nickname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . html_tag( 'td', ' ' . $row['lastname'] . ' ' . $row['firstname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . @@ -412,9 +413,9 @@ if ($showaddrlist) { } else { echo html_tag( 'tr', '', '', $tr_bgcolor) . html_tag( 'td', - '' . - '' , + '' . + '' , 'center', '', 'valign="top" width="1%"' ) . html_tag( 'td', ' ' . $row['nickname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . html_tag( 'td', ' ' . $row['name'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . @@ -427,27 +428,31 @@ if ($showaddrlist) { html_tag( 'td', ' ' . htmlspecialchars($row['label']) . ' ', 'left', '', 'valign="top" width="1%"' ) . "\n"; $line++; + echo "\n". + "\n"; } - /* End of list. Close table. */ + /* End of list. Add edit/delete select buttons */ if ($headerprinted) { - echo html_tag( 'tr', + echo html_tag( 'table', + html_tag( 'tr', html_tag( 'td', - '\n" . - '\n", + '\n" . + '\n", 'center', '', 'colspan="5"' ) - ); + ), + 'center' ); } - echo '
'; + echo "\n"; } } /* end of addresslist */ /* Display the "new address" form */ echo '' . "\n" . - '
' . "\n" . + '' . "\n" . html_tag( 'table', html_tag( 'tr', html_tag( 'td', "\n". '' . _("Add to address book") . '' . "\n", @@ -456,10 +461,10 @@ echo '' . "\n" . ) , 'center', '', 'width="100%"' ) ."\n"; address_form('addaddr', _("Add address"), $defdata); -echo '
'; +echo "\n"; /* Add hook for anything that wants on the bottom */ do_hook('addressbook_bottom'); ?> - + \ No newline at end of file