From fab3baa6746c2a20c9477b38dfd7f3e4aeeeeef7 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Wed, 26 Jun 2002 09:25:02 +0000 Subject: [PATCH] r2l by yoav git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3012 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/read_body.php | 1 + src/right_main.php | 24 ++++--- src/search.php | 161 +++++++++++++++++++++++---------------------- src/signout.php | 63 +++++++++--------- src/vcard.php | 117 ++++++++++++++++++-------------- src/webmail.php | 17 +++-- 6 files changed, 208 insertions(+), 175 deletions(-) diff --git a/src/read_body.php b/src/read_body.php index 1840b453..574284da 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -18,6 +18,7 @@ require_once('../functions/mime.php'); require_once('../functions/date.php'); require_once('../functions/url_parser.php'); require_once('../functions/smtp.php'); +require_once('../functions/html.php'); /** * Given an IMAP message id number, this will look it up in the cached diff --git a/src/right_main.php b/src/right_main.php index a4db4efe..33126f19 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -19,6 +19,7 @@ require_once('../functions/array.php'); require_once('../functions/mime.php'); require_once('../functions/mailbox_display.php'); require_once('../functions/display_messages.php'); +require_once('../functions/html.php'); /*********************************************************** * incoming variables from URL: * @@ -119,21 +120,24 @@ echo "
\n"; do_hook('right_main_after_header'); if (isset($note)) { - echo "
$note

\n"; + echo html_tag( 'div', '' . $note .'', 'center' ) . "
\n"; } if ($just_logged_in == true) { $just_logged_in = false; if (strlen(trim($motd)) > 0) { - echo "
" . - '
' . - "" . - "' . - '
$motd"; - do_hook('motd'); - echo '
' . - '
'; + echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', $motd , + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', $motd, 'center' ) + ) , + '', $color[4], 'width="100%" cellpadding="5" cellspacing="1" border="0"' ) + ) + ) , + 'center', $color[9], 'width="70%" cellpadding="0" cellspacing="3" border="0"' ); } } @@ -196,6 +200,6 @@ if ($use_mailbox_cache && session_is_registered('msgs')) { do_hook('right_main_bottom'); sqimap_logout ($imapConnection); -echo ''; +echo ''; ?> \ No newline at end of file diff --git a/src/search.php b/src/search.php index 1888e9e1..8a04fd70 100644 --- a/src/search.php +++ b/src/search.php @@ -15,6 +15,7 @@ require_once('../functions/imap_search.php'); require_once('../functions/imap_utf7_decode_local.php'); require_once('../functions/array.php'); require_once('../functions/strings.php'); +require_once('../functions/html.php'); global $allow_thread_sort; @@ -211,12 +212,12 @@ elseif ($submit == 'delete') { do_hook('search_before_form'); -echo "
\n". - "\n". - "\n". - "
\n". - "
" . _("Search") . "
\n". - "
\n"; +echo "
\n". + html_tag( 'table', + html_tag( 'tr', "\n" . + html_tag( 'td', '' . _("Search") . '', 'center', $color[0] ) + ) , + '', '', 'width="100%"') . "\n"; /* update the recent and saved searches from the pref files */ $attributes = get_recent($username, $data_dir); @@ -226,47 +227,55 @@ $count_all = 0; /* Saved Search Table */ if ($saved_count > 0) { - echo "
\n" - . "" - . '
Saved Searches
' - . ''; + echo "
\n" + . html_tag( 'table', '', 'center', $color[9], 'width="95%" cellpadding="1" cellspacing="1" border="0"' ) + . html_tag( 'tr', + html_tag( 'td', 'Saved Searches', 'center' ) + ) + . html_tag( 'tr' ) + . html_tag( 'td' ) + . html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"' ); for ($i=0; $i < $saved_count; ++$i) { if ($i % 2) { - echo ""; + echo html_tag( 'tr', '', '', $color[0] ); } else { - echo ""; + echo html_tag( 'tr', '', '', $color[4] ); } - echo "" - . "" - . "" - . ''; + . '' + . ''; } - echo "
".$saved_attributes['saved_folder'][$i]."".$saved_attributes['saved_what'][$i]."".$saved_attributes['saved_where'][$i]."' - . '' . _("edit") . '' + . '>' . _("edit") . '' . ' | ' - . '' . _("search") . '' + . '>' . _("search") . '' . ' | ' - . "" + . "" . _("delete") - . '' - . '
\n"; + echo "\n"; } /* Recent Search Table */ if ($recent_count > 0) { - echo "
\n" - . "\n" - . '
' . _("Recent Searches") . '
' - . ''; + echo "
\n" + . html_tag( 'table', '', 'center', $color[9], 'width="95%" cellpadding="1" cellspacing="1" border="0"' ) + . html_tag( 'tr', + html_tag( 'td', '' . _("Recent Searches") . '', 'center' ) + ) + . html_tag( 'tr' ) + . html_tag( 'td' ) + . html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="0" cellspacing="0" border="0"' ); for ($i=1; $i <= $recent_count; ++$i) { if (isset($attributes['search_folder'][$i])) { if ($attributes['search_folder'][$i] == "") { @@ -274,42 +283,43 @@ if ($recent_count > 0) { } } if ($i % 2) { - echo ""; + echo html_tag( 'tr', '', '', $color[0] ); } else { - echo ""; + echo html_tag( 'tr', '', '', $color[0] ); } if (isset($attributes['search_what'][$i]) && !empty($attributes['search_what'][$i])) { - echo "" - . "" - . "" - . ''; + . '' + . ''; } } - echo '
".$attributes['search_folder'][$i]."".$attributes['search_what'][$i]."".$attributes['search_where'][$i]."' - . "" + echo html_tag( 'td', $attributes['search_folder'][$i], 'left', '', 'width="35%"' ) + . html_tag( 'td', $attributes['search_what'][$i], 'left' ) + . html_tag( 'td', $attributes['search_where'][$i], 'center' ) + . html_tag( 'td', '', 'right' ) + . "" . _("save") - . '' + . '' . ' | ' - . '' . _("search") . '' + . '>' . _("search") . '' . ' | ' - . "" + . "" . _("forget") - . '' - . '

'; + echo '
'; } /* Search Form */ -echo '' . _("Current Search") . '' - . '
' - . ' ' - . ' ' - . ' \n". - " \n"; if ( !isset( $what ) ) { $what = ''; } @@ -346,25 +352,22 @@ $what_disp = str_replace(',', ' ', $what); $what_disp = str_replace('\\\\', '\\', $what_disp); $what_disp = str_replace('\\"', '"', $what_disp); $what_disp = str_replace('"', '"', $what_disp); -echo " \n". - " \n". - "\n". - " \n". - " \n". - "\n". - "
'; for ($i = 0; $i < count($boxes); $i++) { if (!in_array('noselect', $boxes[$i]['flags'])) { $box = $boxes[$i]['unformatted']; @@ -318,22 +328,18 @@ for ($i = 0; $i < count($boxes); $i++) { if( $box2 == 'INBOX' ) { $box2 = _("INBOX"); } - if ($mailbox == $box) { - echo " \n"; - } - else { - echo " \n"; - } + echo ' ' . "\n"; } } - echo "\n"; -echo ' '. - " \n"; + echo ">All folders\n"; +echo ' '. + " \n". - "' . "\n", 'center' ) + . html_tag( 'td', '', 'right' ) + . "\n" . - " \n". - " \n". - "
\n". - "\n"; +echo " \n" . + " \n". + html_tag( 'td', '' . "\n", 'center', '', 'colspan="3"' ) . + " \n". + "\n". + " \n". + "\n"; do_hook('search_after_form'); @@ -383,9 +386,9 @@ if ($allow_thread_sort == TRUE) { if ($search_all == 'all') { $mailbox == ''; $boxcount = count($boxes); - echo '
' . + echo '
' . _("Search Results") . - "

\n"; + "

\n"; for ($x=0;$x<$boxcount;$x++) { if (!in_array('noselect', $boxes[$x]['flags'])) { $mailbox = $boxes[$x]['unformatted']; @@ -412,9 +415,8 @@ if ($search_all == 'all') { /* search one folder option */ else { if (($submit == _("Search") || $submit == 'Search_no_update') && !empty($what)) { - echo '
' . - _("Search Results") . - "
\n"; + echo '
' + . html_tag( 'div', '' . _("Search Results") . '', 'center' ) . "\n"; sqimap_mailbox_select($imapConnection, $mailbox); sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all); } @@ -422,7 +424,8 @@ else { /* must have search terms to search */ if ($submit == _("Search") && empty($what)) { - echo "
Please enter something to search for
\n"; + echo '
' + . html_tag( 'div', 'Please enter something to search for', 'center' ) . "\n"; } $allow_thread_sort = $old_value; diff --git a/src/signout.php b/src/signout.php index 1b095056..9bf32180 100644 --- a/src/signout.php +++ b/src/signout.php @@ -15,6 +15,7 @@ require_once('../src/validate.php'); require_once('../functions/prefs.php'); require_once('../functions/plugin.php'); require_once('../functions/strings.php'); +require_once('../functions/html.php'); /* Erase any lingering attachments */ if (isset($attachments) && is_array($attachments) @@ -52,42 +53,38 @@ if ($signout_page) { exit; /* we send no content if we're redirecting. */ } ?> - - + + - + -<?php echo $org_title ?> - Signout - - -

- - - - - - - - - - -
- -
- -
- - -

-
-
-
- - \ No newline at end of file +<?php echo $org_title ?> - Signout + + +

+'. _("Sign Out") . '', 'center' ) , + '', $color[0], 'width="100%"' ) . + html_tag( 'tr', + html_tag( 'td', _("You have been successfully signed out.") . + '

' . + _("Click here to log back in.") . '


' , + 'center' ) , + '', $color[4], 'width="100%"' ) . + html_tag( 'tr', + html_tag( 'td', '
', 'center' ) , + '', $color[0], 'width="100%"' ) , +'center', $color[4], 'width="50%" cols="1" cellpadding="2" cellspacing="0" border="0"' ) +?> + + \ No newline at end of file diff --git a/src/vcard.php b/src/vcard.php index e6343006..bf9d46f1 100644 --- a/src/vcard.php +++ b/src/vcard.php @@ -23,11 +23,12 @@ sqimap_mailbox_select($imapConnection, $mailbox); displayPageHeader($color, 'None'); -echo '
' . "\n" . - '\n"; + echo html_tag( 'tr', + html_tag( 'td', 'vCard Version ' . $vcard_nice['version'] . + ' is not supported. Some information might not be converted ' . + 'correctly.' , + 'center' ) + ) . "\n"; } foreach ($vcard_nice as $k => $v) { @@ -94,16 +98,16 @@ $ShowValues = array( 'tel;fax' => _("Fax"), 'note' => _("Note")); -echo '
' . +echo '
' . + html_tag( 'table', '', 'center', '', 'width="100%" border="0" cellspacing="0" cellpadding="2"' ) ."\n" . + html_tag( 'tr' ) . "\n" . + html_tag( 'td', '', 'left', $color[0] ) . '
' . - _("Viewing a Business Card") . " - "; + _("Viewing a Business Card") . ' - '; if (isset($where) && isset($what)) { // from a search echo '
vCard Version ' . $vcard_nice['version'] . - ' is not supported. Some information might not be converted ' . - "correctly.

' . - '' . "\n"; +echo html_tag( 'tr' ) . html_tag( 'td', '', 'left' ) . '
' . + html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0"' ) . "\n"; -if (isset($vcard_safe['email;internet'])) { $vcard_safe['email;internet'] = '' . $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) { @@ -116,21 +120,29 @@ foreach ($ShowValues as $k => $v) { echo '
' . '
' . '
' . - '' . - '' . - '' . - '' . - '
' . - '
' . - _("Add to Addressbook") . - '
' . - '
' . - '' . - '' . - '' . - '' . - '' . + html_tag( 'tr', + html_tag( 'td', + '' . + '' . + '' . + '' , + 'center', '', 'colspan="2"' ) + ) . '
Nickname:
Note Field Contains:' . + html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0" width="100%"' ) . "\n"; + html_tag( 'tr', + html_tag( 'td', + '
' . + _("Add to Addressbook") . '
' , + 'left', $color[0] ) + ) . + html_tag( 'tr' ) . + html_tag( 'td', '', 'center' ) . + '' . + html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0" width="100%"' ) . + html_tag( 'tr', + html_tag( 'td', + 'Nickname:' , + 'right' ) . + html_tag( 'td', + '' , + 'left' ) + ) . + html_tag( 'tr' ) . + html_tag( 'td', 'Note Field Contains:', 'right' ) . + html_tag( 'td', '', 'left' ) . '' . '
' . - '' . - '' . - '' . - '' . - '
' . - '
' . + '' . '
' . - '' . - _("Download this as a file") . '' . - '
' . - - '' . - '
' . - '
' . + html_tag( 'tr', + html_tag( 'td', + '' . + _("Download this as a file") . '' , + 'center' ) + ) . + '' . + + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', ' ', 'left', $color[4] ) + ) , + 'center', '', 'border="0" cellspacing="0" cellpadding="2"' ) . ''; ?> diff --git a/src/webmail.php b/src/webmail.php index 0220d843..34008cff 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -44,13 +44,22 @@ if ($my_language != $squirrelmail_language) { set_up_language(getPref($data_dir, $username, 'language')); echo "\n" . - "$org_title"; + "$org_title"; $left_size = getPref($data_dir, $username, 'left_size'); $location_of_bar = getPref($data_dir, $username, 'location_of_bar'); + +if (strtolower($languages[$squirrelmail_language]['DIR']) == 'rtl') { + $temp_location_of_bar = 'right'; +} else { + $temp_location_of_bar = 'left'; +} + if ($location_of_bar == '') { - $location_of_bar = 'left'; + $location_of_bar = $temp_location_of_bar; } +$temp_location_of_bar = ''; + if ($left_size == "") { if (isset($default_left_size)) { $left_size = $default_left_size; @@ -61,10 +70,10 @@ if ($left_size == "") { } if ($location_of_bar == 'right') { - echo ""; + echo ""; } else { - echo ""; + echo ""; } /* -- 2.25.1