/* Output form to add and modify address data */
function address_form($name, $submittext, $values = array()) {
- global $color;
+ global $color, $squirrelmail_language;
+ if ($squirrelmail_language == 'ja_JP')
+ {
+ echo html_tag( 'table',
+ adressbook_inp_field(_("Nickname"), 'nickname', $name, 15, $values,
+ ' <SMALL>' . _("Must be unique") . '</SMALL>') .
+ adressbook_inp_field(_("E-mail address"), 'email', $name, 45, $values, '') .
+ adressbook_inp_field(_("Last name"), 'lastname', $name, 45, $values, '') .
+ adressbook_inp_field(_("First name"), 'firstname', $name, 45, $values, '') .
+ adressbook_inp_field(_("Additional info"), 'label', $name, 45, $values, '') .
+ html_tag( 'tr',
+ html_tag( 'td',
+ '<INPUT TYPE=submit NAME="' . $name . '[SUBMIT]" VALUE="' .
+ $submittext . '">',
+ 'center', $color[4], 'colspan="2"')
+ )
+ , 'center', '', 'border="0" cellpadding="1" width="90%"') ."\n";
+ } else {
echo html_tag( 'table',
adressbook_inp_field(_("Nickname"), 'nickname', $name, 15, $values,
' <SMALL>' . _("Must be unique") . '</SMALL>') .
)
, 'center', '', 'border="0" cellpadding="1" width="90%"') ."\n";
}
+}
/* Open addressbook, with error messages on but without LDAP (the *
* second "true"). Don't need LDAP here anyway */
/**************************************************
* Add new address *
**************************************************/
- if (!empty($addaddr['nickname'])) {
+ if (isset($addaddr)) {
foreach( $addaddr as $k => $adr ) {
$addaddr[$k] = strip_tags( $adr );
}
echo html_tag( 'table',
html_tag( 'tr',
html_tag( 'td',
- "\n". '<br><strong><font color="' . $color[2] .
+ "\n". '<strong><font color="' . $color[2] .
'">' . _("ERROR") . ': ' . $abook->error . '</font></strong>' ."\n",
'center' )
),
html_tag( 'table',
html_tag( 'tr',
html_tag( 'td',
- "\n". '<br><strong>' . _("Update address") . '</strong>' ."\n",
+ "\n". '<strong>' . _("Update address") . '</strong>' ."\n",
'center', $color[0] )
),
- 'center', '', 'width="100%"' ) .
+ 'center', '', 'width="100%"' );
address_form("editaddr", _("Update address"), $newdata);
echo '<INPUT TYPE=hidden NAME=oldnick VALUE="' .
htmlspecialchars($oldnick) . "\">\n" .
/* Print one row */
$tr_bgcolor = '';
if ($line % 2) { $tr_bgcolor = $color[0]; }
+ if ($squirrelmail_language == 'ja_JP')
+ {
+ echo html_tag( 'tr', '') .
+ html_tag( 'td',
+ '<SMALL>' .
+ '<INPUT TYPE=checkbox ' . $selected . ' NAME="sel[]" VALUE="' .
+ $row['backend'] . ':' . $row['nickname'] . '"></SMALL>' ,
+ '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' ) .
+ html_tag( 'td', '', 'left', '', 'valign="top" width="1%" nowrap' ) . ' ';
+ } else {
echo html_tag( 'tr', '') .
html_tag( 'td',
'<SMALL>' .
html_tag( 'td', ' ' . $row['nickname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) .
html_tag( 'td', ' ' . $row['name'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) .
html_tag( 'td', '', 'left', '', 'valign="top" width="1%" nowrap' ) . ' ';
+ }
$email = $abook->full_address($row);
- if ($compose_new_win == '1') {
- echo '<a href="javascript:void(0)" onclick=comp_in_new(false,"compose.php?send_to='.rawurlencode($email).'")>';
- }
- else {
- echo '<A HREF="compose.php?send_to=' . rawurlencode($email).'">';
- }
- echo htmlspecialchars($row['email']) . '</A> </td>'."\n".
+ echo makeComposeLink('src/compose.php?send_to='.rawurlencode($email),
+ htmlspecialchars($row['email']) ) .
+ ' </td>'."\n".
html_tag( 'td', ' ' . htmlspecialchars($row['label']) . ' ', 'left', '', 'valign="top" width="1%"' ) .
"</tr>\n";
$line++;