From 3c621ba1116356a3a8e2616ef6d267f5edb3ea06 Mon Sep 17 00:00:00 2001 From: jervfors Date: Wed, 11 Aug 2004 05:10:19 +0000 Subject: [PATCH] XHTML fixes git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7881 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 30 ++++++------ plugins/bug_report/system_specs.php | 4 +- src/printer_friendly_bottom.php | 4 +- src/read_body.php | 60 +++++++++++------------ src/right_main.php | 6 +-- src/signout.php | 16 +++--- src/vcard.php | 75 +++++++++++++++-------------- src/view_header.php | 18 +++---- src/view_text.php | 20 ++++---- 9 files changed, 117 insertions(+), 116 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index d7ea053e..e342f75b 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -41,7 +41,7 @@ function mime_structure ($bodystructure, $flags=array()) { /* removed urldecode because $_GET is auto urldecoded ??? */ displayPageHeader( $color, $mailbox ); $errormessage = _("SquirrelMail could not decode the bodystructure of the message"); - $errormessage .= '
'._("the provided bodystructure by your imap-server").':

'; + $errormessage .= '
'._("the provided bodystructure by your imap-server").':

'; $errormessage .= '
' . htmlspecialchars($read) . '
'; plain_error_message( $errormessage, $color ); echo ''; @@ -137,16 +137,16 @@ function mime_fetch_body($imap_stream, $id, $ent_id=1, $fetch_size=0) { '&message=' . urlencode($message) . '&topline=' . urlencode($topline); - echo '
' . + echo '
' . '' . - '' . '" . '" . '" . '" . - "
' . + '
' . _("Body retrieval error. The reason for this is most probably that the message is malformed.") . '
' . _("Command:") . "$cmd
' . _("Response:") . "$response
' . _("Message:") . "$message
' . _("FETCH line:") . "$topline


"; + "

"; $data = sqimap_run_command ($imap_stream, "FETCH $passed_id BODY[]", true, $response, $message, TRUE); array_shift($data); @@ -233,7 +233,7 @@ function mime_print_body_lines ($imap_stream, $id, $ent_id=1, $encoding) { */ function listEntities ($message) { if ($message) { - echo "" . $message->entity_id . ' : ' . $message->type0 . '/' . $message->type1 . ' parent = '. $message->parent->entity_id. '
'; + echo "" . $message->entity_id . ' : ' . $message->type0 . '/' . $message->type1 . ' parent = '. $message->parent->entity_id. '
'; for ($i = 0; isset($message->entities[$i]); $i++) { echo "$i : "; $msg = listEntities($message->entities[$i]); @@ -414,7 +414,7 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma if($text != '') { $body .= ' | ' . $text . ''; } - $body .= '
' . "\n"; + $body .= '
' . "\n"; } return $body; } @@ -522,14 +522,14 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) { $links = $hookresults[1]; $defaultlink = $hookresults[6]; - $attachments .= '' . - ''.decodeHeader($display_filename).' ' . - '' . show_readable_size($header->size) . - '  ' . - '[ '.htmlspecialchars($type0).'/'.htmlspecialchars($type1).' ] ' . - ''; + $attachments .= '' . + ''.decodeHeader($display_filename).' ' . + '' . show_readable_size($header->size) . + '  ' . + '[ '.htmlspecialchars($type0).'/'.htmlspecialchars($type1).' ] ' . + ''; $attachments .= '' . $description . ''; - $attachments .= ' '; + $attachments .= ' '; $skipspaces = 1; foreach ($links as $val) { @@ -541,7 +541,7 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) { $attachments .= '' . $val['text'] . ''; } unset($links); - $attachments .= "\n"; + $attachments .= "\n"; } $attachmentadd = do_hook_function('attachments_bottom',$attachments); if ($attachmentadd != '') @@ -2059,4 +2059,4 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX') { } // end fn SendDownloadHeaders -?> +?> \ No newline at end of file diff --git a/plugins/bug_report/system_specs.php b/plugins/bug_report/system_specs.php index c270de14..984dd69c 100644 --- a/plugins/bug_report/system_specs.php +++ b/plugins/bug_report/system_specs.php @@ -117,11 +117,11 @@ if (isset($warning) && $warning) { $warning_html .= "
* $corr_val
\n"; } } - $warning_html .= "\n

$warning_num warning(s) reported.

\n
\n"; + $warning_html .= "\n

$warning_num warning(s) reported.

\n
\n"; $body_top .= "\n$warning_num warning(s) reported.\n"; $body_top .= "----------------------------------------------\n"; } $body = htmlspecialchars($body_top . $body); -?> +?> \ No newline at end of file diff --git a/src/printer_friendly_bottom.php b/src/printer_friendly_bottom.php index ee49b2fb..a4280087 100644 --- a/src/printer_friendly_bottom.php +++ b/src/printer_friendly_bottom.php @@ -144,7 +144,7 @@ echo '
' . "\n" . $body, 'left', '', 'colspan="2"' ) + html_tag( 'td', '

' . "\n" . $body, 'left', '', 'colspan="2"' ) ) . "\n" . '' . "\n" . @@ -191,4 +191,4 @@ function pf_clean_string ( $unclean_string, $num_leading_spaces ) { /* --end pf-specific functions */ -?> +?> \ No newline at end of file diff --git a/src/read_body.php b/src/read_body.php index 31cd0a47..c3b73903 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -347,15 +347,15 @@ function formatRecipientString($recipients, $item ) { foreach($recipients as $r) { $add = decodeHeader($r->getAddress(true)); if ($string) { - $string .= '
' . $add; + $string .= '
' . $add; } else { $string = $add; if ($cnt > 1) { - $string .= ' ()'; + $string .= '">'._("less").')'; } else { - $string .= '">'._("more").')'; + $string .= '">'._("more").')'; break; } } @@ -425,26 +425,26 @@ function formatEnvheader($aMailbox, $passed_id, $passed_ent_id, $message, } } - $s = ''; + $s = '
'; foreach ($env as $key => $val) { if ($val) { - $s .= ''; - $s .= html_tag('TD', '' . $key . ':  ', 'RIGHT', '', 'VALIGN="TOP" WIDTH="20%"') . "\n"; - $s .= html_tag('TD', $val, 'left', '', 'VALIGN="TOP" WIDTH="80%"') . "\n"; - $s .= ''; + $s .= ''; + $s .= html_tag('td', '' . $key . ':  ', 'right', '', 'valign="top" width="20%"') . "\n"; + $s .= html_tag('td', $val, 'left', '', 'valign="top" width="80%"') . "\n"; + $s .= ''; } } - echo '
'."\n"; - echo ''."\n"; - echo '
'."\n"; + echo ''."\n"; + echo '
'."\n"; echo $s; do_hook('read_body_header'); formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color); - echo '
'; - echo '
'; + echo ''; + echo ''."\n"; + echo ''; } /** @@ -715,9 +715,9 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) { $url = $base_uri.'src/view_header.php?'.$query_string; - $s = "\n" . - html_tag( 'td', '', 'right', '', 'VALIGN="MIDDLE" WIDTH="20%"' ) . '' . _("Options") . ":  \n" . - html_tag( 'td', '', 'left', '', 'VALIGN="MIDDLE" WIDTH="80%"' ) . '' . + $s = "\n" . + html_tag( 'td', '', 'right', '', 'valign="middle" width="20%"' ) . '' . _("Options") . ":  \n" . + html_tag( 'td', '', 'left', '', 'valign="middle" width="80%"' ) . '' . ''._("View Full Header").''; /* Output the printer friendly link if we are in subtle mode. */ @@ -725,8 +725,8 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) { printer_friendly_link($mailbox, $passed_id, $passed_ent_id); echo $s; do_hook("read_body_header_right"); - $s = "\n" . - "\n"; + $s = "\n" . + "\n"; echo $s; } @@ -879,7 +879,7 @@ $cnt = count($ent_ar); for ($i = 0; $i < $cnt; $i++) { $messagebody .= formatBody($imapConnection, $message, $color, $wrap_at, $ent_ar[$i], $passed_id, $mailbox); if ($i != $cnt-1) { - $messagebody .= '
'; + $messagebody .= '
'; } } @@ -894,7 +894,7 @@ echo ' '; @@ -902,8 +902,8 @@ echo '
'; // echo ' '; echo html_tag( 'table' ,'' , 'left', '', 'cellpadding="1" cellspacing="5" border="0"' ); -echo ' ' . html_tag( 'td', '
'. $messagebody."\n", 'left') +echo ' ' . html_tag( 'td', '
'. $messagebody."\n", 'left') . ''; echo '
'; echo '
'; echo ' '; echo ' '; -echo ''."\n"; +echo ''."\n"; $attachmentsdisplay = formatAttachments($message,$ent_ar,$mailbox, $passed_id); if ($attachmentsdisplay) { @@ -920,8 +920,8 @@ if ($attachmentsdisplay) { echo ' '; echo ' '; echo ' '; - echo ''; + echo ''; } echo ''; @@ -938,10 +938,10 @@ if (($attachment_common_show_images) && echo html_tag( 'table', "\n" . html_tag( 'tr', "\n" . - html_tag( 'td', '' ."\n", 'left' + html_tag( 'td', '' ."\n", 'left' ) ) , - 'center', '', 'cellspacing=0 border="0" cellpadding="2"'); + 'center', '', 'cellspacing="0" border="0" cellpadding="2"'); } } diff --git a/src/right_main.php b/src/right_main.php index ac40bf2a..5ce2ba2f 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -204,7 +204,7 @@ if (isset($mail_sent) && $mail_sent == 'yes') { $note = _("Your Message has been sent."); } if (isset($note)) { - echo html_tag( 'div', '' . $note .'', 'center' ) . "
\n"; + echo html_tag( 'div', '' . $note .'', 'center' ) . "
\n"; } if ( sqgetGlobalVar('just_logged_in', $just_logged_in, SQ_SESSION) ) { @@ -231,7 +231,7 @@ if ($aMailbox['EXISTS'] > 0) { showMessagesForMailbox($imapConnection,$aMailbox); } else { $string = '' . _("THIS FOLDER IS EMPTY") . ''; - echo ' '; + echo '
'; echo '
'; echo ' '; echo '

'; @@ -252,4 +252,4 @@ echo ''; $mailbox_cache[$aMailbox['NAME']] = $aMailbox; sqsession_register($mailbox_cache,'mailbox_cache'); -?> +?> \ No newline at end of file diff --git a/src/signout.php b/src/signout.php index 9d2d5735..3dece37c 100644 --- a/src/signout.php +++ b/src/signout.php @@ -64,16 +64,16 @@ if ($signout_page) { - + <?php echo $org_title . ' - ' . _("Signout"); ?> - -

+ +

' . - _("Click here to log back in.") . '
' , + '
' . + _("Click here to log back in.") . '
' , 'center' ) , '', $color[4], 'width="100%"' ) . html_tag( 'tr', - html_tag( 'td', '
', 'center' ) , + html_tag( 'td', '
', 'center' ) , '', $color[0], 'width="100%"' ) , 'center', $color[4], 'width="50%" cols="1" cellpadding="2" cellspacing="0" border="0"' ) ?> diff --git a/src/vcard.php b/src/vcard.php index aa180a9c..a0994cff 100644 --- a/src/vcard.php +++ b/src/vcard.php @@ -42,11 +42,12 @@ sqimap_mailbox_select($imapConnection, $mailbox); displayPageHeader($color, 'None'); -echo '
' . "\n" . - '
' . - '
' . - _("Viewing a Business Card") . " - "; +echo '
' . "\n" . + '
' . + '
' . + _("Viewing a Business Card") . " - "; + $msg_url = 'read_body.php?mailbox='.urlencode($mailbox). '&startMessage='.urlencode($startMessage). '&passed_id='.urlencode($passed_id); @@ -116,8 +117,8 @@ $ShowValues = array( 'tel;fax' => _("Fax"), 'note' => _("Note")); -echo '

' . - '' . "\n"; +echo '

' . + '' . "\n"; if (isset($vcard_safe['email;internet'])) { $vcard_safe['email;internet'] = makeComposeLink('src/compose.php?send_to='.urlencode($vcard_safe['email;internet']), @@ -125,35 +126,35 @@ if (isset($vcard_safe['email;internet'])) { } if (isset($vcard_safe['url'])) { - $vcard_safe['url'] = '' . - $vcard_safe['url'] . ''; + $vcard_safe['url'] = '' . + $vcard_safe['url'] . ''; } foreach ($ShowValues as $k => $v) { if (isset($vcard_safe[$k]) && $vcard_safe[$k]) { - echo "\n"; } } echo '
$v:" . $vcard_safe[$k] . + echo "
$v:" . $vcard_safe[$k] . "
' . - '
' . - '
' . - '' . + '
' . + '' . - '' . - '' . - '
' . - '
' . - _("Add to Addressbook") . - '
' . - addForm('../src/addressbook.php', 'POST', 'f_add') . - '' . - '' . - '' . - '' . + '' . + '' . - '
' . _("Nickname:") . ''. - addInput('addaddr[nickname]', $vcard_safe['firstname'] . '-' . $vcard_safe['lastname'], '20'). - '
' . _("Note Field Contains:") . '' ; + '
' . + '
' . + _("Add to Addressbook") . + '
' . + addForm('../src/addressbook.php', 'POST', 'f_add') . + '' . + '' . + '' . + '' . - '' . '
' . _("Nickname:") . ''. + addInput('addaddr[nickname]', $vcard_safe['firstname'] . '-' . $vcard_safe['lastname'], '20'). + '
' . _("Note Field Contains:") . '' ; $opts = array(); if (isset($vcard_nice['url'])) { @@ -189,7 +190,7 @@ if (isset($vcard_nice['note'])) { echo addSelect('addaddr[label]', $opts, '', TRUE); echo '
' . + '
' . addHidden('addaddr[email]', $vcard_nice['email;internet']). addHidden('addaddr[firstname]', $vcard_safe['firstname']). addHidden('addaddr[lastname]', $vcard_safe['lastname']). @@ -198,16 +199,16 @@ echo '
' . '' . '
' . + '
' . '' . - _("Download this as a file") . '' . - '
' . - - '' . - '
' . - '
' . + urlencode($passed_id) . '&mailbox=' . urlencode($mailbox) . + '&ent_id=' . urlencode($ent_id) . '">' . + _("Download this as a file") . '' . + '
' . + + '' . + '
' . + '
' . ''; -?> +?> \ No newline at end of file diff --git a/src/view_header.php b/src/view_header.php index 030eb869..28089fbc 100644 --- a/src/view_header.php +++ b/src/view_header.php @@ -87,19 +87,19 @@ function view_header($header, $mailbox, $color) { displayPageHeader($color, $mailbox); - echo '
' . - '' . "\n" . - "
". - _("Viewing Full Header") . ' - '. + echo '
' . + '' . "\n" . + '
'. + _("Viewing Full Header") . ' - '. '' ._("View message") . "
\n"; echo_template_var($header, - array( - "\n".'
', + array( + '\n".'
', '', '', '', @@ -130,4 +130,4 @@ $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, t $header = parse_viewheader($imapConnection,$passed_id, $passed_ent_id); view_header($header, $mailbox, $color); -?> +?> \ No newline at end of file diff --git a/src/view_text.php b/src/view_text.php index 9e316625..2c2b54b4 100644 --- a/src/view_text.php +++ b/src/view_text.php @@ -78,17 +78,17 @@ if ($type1 == 'html' || (isset($override_type1) && $override_type1 == 'html')) displayPageHeader($color, 'None'); -echo '
' . - '
' . +echo '
' . + '
' . _("Viewing a text attachment") . ' - ' . ''. _("View message") . '' . - '
' . + '
' . _("Download this as a file") . - '

' . - '' . - '
' . - '
' . - '
' . - $body . '
' . + '

' . + '
' . + '
' . + '
' . + '
' . + $body . '
' . ''; -?> +?> \ No newline at end of file -- 2.25.1