From 3530b83b1f8d5d7afe9508ab081e40ac9af8b599 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Mon, 24 Jun 2002 14:02:45 +0000 Subject: [PATCH] r2l by Yoav git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3001 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/download.php | 148 ++++++++++++++++++++------------- src/folders_rename_getname.php | 17 ++-- src/help.php | 57 ++++++------- 3 files changed, 130 insertions(+), 92 deletions(-) diff --git a/src/download.php b/src/download.php index be8ee42a..89f7c043 100644 --- a/src/download.php +++ b/src/download.php @@ -16,6 +16,7 @@ require_once('../src/validate.php'); require_once('../functions/imap.php'); require_once('../functions/mime.php'); require_once('../functions/date.php'); +require_once('../functions/html.php'); header('Pragma: '); header('Cache-Control: cache'); @@ -26,24 +27,31 @@ function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at, $imapC displayPageHeader($color, 'None'); - echo "
". - "
". - _("Viewing a text attachment") . " - "; if ($where && $what) { // from a search - echo "". _("View message") . ""; + $message_link_str = "". _("View message") . ""; } else { - echo "". _("View message") . ""; + $message_link_str = "". _("View message") . ""; } - $urlmailbox = urlencode($mailbox); - echo "
". - _("Download this as a file"). - "

". - "". - "
". - "
". - "
"; + + echo '
' . + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', + '
' . + _("Viewing a text attachment") . ' - ' . $message_link_str . '
', + '', 'left', $color[0] ) + ) . + html_tag( 'tr', + html_tag( 'td', + '
' . + "". + _("Download this as a file"). + "

". + '', 'left' ) + ), + '', 'center', '', 'width="100%" border="0" cellspacing="0" cellpadding="2"' ); if ($type1 == 'html') { $msg = sqimap_get_message($imapConnection, $id, $mailbox); @@ -53,8 +61,15 @@ function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at, $imapC } flush(); - echo $body . - "
"; + + //"
". + //"
"; + + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', '' . $body . '', 'left', $color[4] ) + ) , + 'center', '', 'width="98%" border="0" cellspacing="0" cellpadding="2"' ); } function viewMessage($imapConnection, $id, $mailbox, $ent_id, $color, $wrap_at, $extracted) { @@ -77,45 +92,59 @@ function viewMessage($imapConnection, $id, $mailbox, $ent_id, $color, $wrap_at, $bodyheader = viewHeader($header, $color); displayPageHeader($color, 'None'); - echo "
"; + echo '
' . + html_tag( 'table', '', 'center', '', 'width="100%" border="0" cellspacing="0" cellpadding="2"' ); + if ($extracted) { - echo ''; + echo html_tag( 'tr', + html_tag( 'td', '

Message succesfully extracted

', 'left', '', 'width="100%"' ) + ); } - echo "

Message succesfully extracted

". - "
". _("Viewing a message attachment") . " - "; - - echo "". _("View message") . ""; - + + $td_str = "
". _("Viewing a message attachment") . " - "; + $td_str .= "". _("View message") . "
"; + echo html_tag( 'tr', + html_tag( 'td', $td_str, 'left', $color[0] ) + ); + $urlmailbox = urlencode($mailbox); - - echo "
". + $td_str = "
". _("Download this as a file"). - "

". - "
". - "
"; - echo "
". - "
"; - echo "$bodyheader
"; - - echo "
". - "

"; - echo "$body

"; - echo '
'. - "
". - '
'. - "". - "". - "". - "". - "". - _("Save to:") . - '
\n" . + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', $bodyheader, 'left', $color[4] ) + ) , + 'center', '', 'width="100%" border="0" cellspacing="0" cellpadding="2"' ) . "\n" . + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', '
' . $body . '
', 'left', $color[4] ) + ) , + 'center', '', 'width="98%" border="0" cellspacing="0" cellpadding="2"' ) . "
\n"; + + echo html_tag( 'table', '', '', '', 'width="100%"' ) . + html_tag( 'tr' ) . + html_tag( 'td', '', 'center', $color[9], 'width="100%"' ) . + ''. + "". + "". + "". + "". + "". + _("Save to:") . + ' '.' '. ''. ''. ''. - '
'; + ''; } @@ -183,8 +212,10 @@ function viewHeader($header,$color) { } function makeTableEntry($str, $str_name, $color) { - $entry = ''."$str_name".''."$str".' '."\n"; + $entry = html_tag( 'tr', + html_tag( 'td', $str_name, 'right', $color[0], 'valign="top"' ) . + html_tag( 'td', '' . $str .' ', 'left', $color[0], 'valign="top" colspan="2"' ) + ); return $entry; } @@ -373,15 +404,18 @@ if (isset($absolute_dl) && $absolute_dl == 'true') { " " . _("To") . ": " . decodeHeader(getLineOfAddrs($top_header->to)) . "\n". " " . _("Date") . ": " . getLongDateString($top_header->date) . "\n\n"; } elseif ($type1 == 'html' && isset($showHeaders)) { - echo '\n\n\n\n
' . _("Subject"). - ':' . decodeHeader($top_header->subject). - "
" . _("From"). - ':' . decodeHeader($top_header->from). - "
" . _("To"). - ':' . decodeHeader(getLineOfAddrs($top_header->to)). - "
" . _("Date"). - ':' . getLongDateString($top_header->date). - "
\n
\n"; + echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'th', _("Subject") . ':', 'right' ) . + html_tag( 'th', decodeHeader($top_header->subject), 'left' ) . "\n" . + html_tag( 'th', _("From") . ':', 'right' ) . + html_tag( 'th', decodeHeader($top_header->from), 'left' ) . "\n" . + html_tag( 'th', _("To") . ':', 'right' ) . + html_tag( 'th', decodeHeader(getLineOfAddrs($top_header->to)), 'left' ) . "\n" . + html_tag( 'th', _("Date") . ':', 'right' ) . + html_tag( 'th', getLongDateString($top_header->date), 'left' ) . "\n" + ) + ) . "\n
\n"; } echo $body; break; diff --git a/src/folders_rename_getname.php b/src/folders_rename_getname.php index 682a94d7..633c3ea5 100644 --- a/src/folders_rename_getname.php +++ b/src/folders_rename_getname.php @@ -16,6 +16,7 @@ global $delimiter; require_once('../src/validate.php'); require_once('../functions/imap.php'); +require_once('../functions/html.php'); if ($old == '') { displayPageHeader($color, 'None'); @@ -43,11 +44,13 @@ if (strpos($old, $delimiter)) { } displayPageHeader($color, 'None'); -echo "
". - "". - "". - "
". - _("Rename a folder"). - "
". +echo '
' . + html_tag( 'table', '', 'center', '', 'width="95%" cols="1" border="0"' ) . + html_tag( 'tr', + html_tag( 'td', '' . _("Rename a folder") . '', 'center', $color[0] ) + ) . + html_tag( 'tr' ) . + html_tag( 'td', '', 'center', $color[4] ) . "
\n". _("New name:"). "
$old_parent $delimiter
\n"; @@ -57,8 +60,8 @@ if ( $isfolder ) { printf("\n", $old); printf("\n", $old_name); echo "\n". - "

"; + "
". + ""; /** Log out this session **/ sqimap_logout($imapConnection); diff --git a/src/help.php b/src/help.php index 7b65faee..f83bc088 100644 --- a/src/help.php +++ b/src/help.php @@ -82,23 +82,21 @@ function get_info($doc, $pos) { /**************[ END HELP FUNCTIONS ]******************/ -?> -
- - - - -
-
-
- - - - - -
-' . + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td','
' . _("Help") .'
', 'center', $color[0] ) + ) , + 'center', '', 'width="95%" cellpadding="2" cellspacing="2" border="0"' ); + +do_hook("help_top"); + +echo html_tag( 'table', '', 'center', '', 'width="90%" cellpadding="0" cellspacing="10" border="0"' ) . + html_tag( 'tr' ) . + html_tag( 'td' ); + if (isset($HTTP_REFERER)) { $ref = strtolower($HTTP_REFERER); if (strpos($ref, 'src/compose')){ @@ -165,16 +163,18 @@ if ($help_exists == true) { } if (!isset($chapter)) { - echo '
' . - '
' . _("Table of Contents") . '

'; + echo html_tag( 'table', '', 'center', '', 'cellpadding="0" cellspacing="0" border="0"' ); + html_tag( 'tr' ) . + html_tag( 'td' ) . + '
' . _("Table of Contents") . '

'; do_hook('help_chapter'); - echo '
    '; + echo html_tag( 'ol' ); for ($i=0; $i < count($helpdir); $i++) { $doc = file("../help/$user_language/$helpdir[$i]"); $help_info = get_info($doc, 0); echo '
  1. ' . $help_info[0] . ''; - echo '
      ' . $help_info[2] . '
    '; + . '">' . $help_info[0] . '' . + html_tag( 'ul', $help_info[2] ); } echo '
'; } else { @@ -202,17 +202,15 @@ if ($help_exists == true) { if (isset($help_info[1])){ echo $help_info[1]; } else { - echo '

' . $help_info[2] . '

'; + echo html_tag( 'p', $help_info[2], 'left' ); } $section = 0; for ($n = $help_info[3]; $n < count($doc); $n++) { $section++; $help_info = get_info($doc, $n); - echo "$chapter.$section - $help_info[0]"; - echo '
    '; - echo $help_info[1]; - echo '
'; + echo "$chapter.$section - $help_info[0]" . + html_tag( 'ul', $help_info[1] ); $n = $help_info[3]; } @@ -220,6 +218,9 @@ if ($help_exists == true) { } } do_hook('help_bottom'); + +echo html_tag( 'tr', + html_tag( 'td', ' ', 'left', $color[0] ) + ). + '
'; ?> -  - -- 2.25.1