From 6b4bd11ff9e790990d819c03a04eab069d52e0d6 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Wed, 26 Jun 2002 13:11:58 +0000 Subject: [PATCH] r2l git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3013 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 88 ++++++++++++------------ functions/options.php | 81 ++++++++++++---------- locale/he_HE/LC_MESSAGES/squirrelmail.po | 2 +- src/download.php | 3 - src/folders.php | 20 +++--- src/right_main.php | 2 +- src/vcard.php | 6 +- 7 files changed, 103 insertions(+), 99 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 7cb5e4e1..c6f7eb63 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -71,7 +71,7 @@ function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, } $urlMailbox = urlencode($mailbox); $subject = processSubject($msg['SUBJECT']); - echo "\n"; + echo html_tag( 'tr' ) . "\n"; if (isset($msg['FLAG_FLAGGED']) && ($msg['FLAG_FLAGGED'] == true)) { $flag = ""; @@ -587,7 +587,7 @@ $show_num) { /* if there's no messages in this folder */ echo html_tag( 'tr', html_tag( 'td', - "
" . _("THIS FOLDER IS EMPTY") . "
 ", + "
" . _("THIS FOLDER IS EMPTY") . "
 ", 'center', $color[4], 'COLSPAN="' . count($index_order) . '"' @@ -647,7 +647,7 @@ $show_num) { /* End of message-list table */ do_hook('mailbox_index_after'); - echo "\n"; + echo "\n"; } /* @@ -689,24 +689,24 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, , '', $color[4], 'border="0" width="100%" cellpadding="2" cellspacing="0"' ) , 'left', '', '' ) , '', $color[0] ) - . '' + . html_tag( 'tr' ) . "\n" . html_tag( 'td' ,'' , 'left', $color[0], '' ) . html_tag( 'table' ,'' , '', $color[0], 'border="0" width="100%" cellpadding="0" cellspacing="0"' ) . html_tag( 'tr', html_tag( 'td', - ' ' . _("Move Selected To:") . '', + ' ' . _("Move Selected To:") . '', 'left', '', 'valign="middle" nowrap' ) . html_tag( 'td', - '' . _("Transform Selected Messages") . ':  
', + '' . _("Transform Selected Messages") . ':   ', 'right', '', 'nowrap' ) ) - . " \n" + . html_tag( 'tr' ) ."\n" . html_tag( 'td', '', 'left', '', 'valign="middle" nowrap' ) - . '  '; $boxes = sqimap_mailbox_list($imapConnection); foreach ($boxes as $boxes_part) { @@ -716,30 +716,29 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, if( $box2 == 'INBOX' ) { $box2 = _("INBOX"); } + echo ' \n"; - } - else { - echo " \n"; + echo ' selected'; } + echo '>' . $box2 . '' . "\n"; } } - echo '  ' - . ' ' - . ' \n" . "\n"; + echo '  ' + . ' ' + . ' \n" . "\n"; - echo " \n" - . " "; + echo " \n" + . html_tag( 'td', '', 'right', '', 'nowrap' ); if (!$auto_expunge) { - echo ' ' . _("mailbox") . ' '; } - echo '' - . '' - . ' ' - . "\n" - . " \n"; + echo '' + . '' + . ' ' + . "\n" + . " \n"; /* draws thread sorting links */ if ($allow_thread_sort == TRUE) { @@ -761,9 +760,10 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, , '', '', '' ); } - echo "\n"; + echo "\n"; do_hook('mailbox_form_before'); - echo '' + echo '' + . html_tag( 'tr' ) . html_tag( 'td' ,'' , '', $color[0], '' ); if ($GLOBALS['alt_index_colors']){ $cellspacing = '0'; @@ -771,7 +771,7 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, $cellspacing = '1'; } echo html_tag( 'table' ,'' , '', $color[0], 'border="0" width="100%" cellpadding="2" cellspacing="'. $cellspacing .'"' ) - . ""; + . html_tag( 'tr' ,'' , 'center', $color[5] ); /* if using server sort we highjack the * the $sort var and use $server_sort_order * instead. but here we reset sort for a bit @@ -785,7 +785,7 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, switch ($index_order[$i]) { case 1: /* checkbox */ case 5: /* flags */ - echo ' '; + echo html_tag( 'td' ,' ' , '', '', 'width="1%"' ); break; case 2: /* from */ if (handleAsSent($mailbox)) { @@ -798,7 +798,7 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) { ShowSortButton($sort, $mailbox, 2, 3); } - echo "\n"; + echo "\n"; break; case 3: /* date */ echo html_tag( 'td' ,'' , 'left', '', 'width="5%" nowrap' ) @@ -814,7 +814,7 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) { ShowSortButton($sort, $mailbox, 4, 5); } - echo "\n"; + echo "\n"; break; case 6: /* size */ echo html_tag( 'td', '' . _("Size") . '', 'center', '', 'width="5%"' ); @@ -827,7 +827,7 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, if ($allow_server_sort == TRUE) { $sort = 6; } - echo "\n"; + echo "\n"; } /* @@ -849,8 +849,8 @@ function ShowSortButton($sort, $mailbox, $Up, $Down) { /* Now that we have everything figured out, show the actual button. */ echo ' sort'; + . '">sort'; } function get_selectall_link($start_msg, $sort) { @@ -900,7 +900,7 @@ function get_selectall_link($start_msg, $sort) { $result .= _("Select All"); } - $result .= "\n"; + $result .= "\n"; } /* Return our final result. */ @@ -914,10 +914,10 @@ function get_msgcnt_str($start_msg, $end_msg, $num_msgs) { /* Compute the $msg_cnt_str. */ $result = ''; if ($start_msg < $end_msg) { - $result = sprintf(_("Viewing Messages: %s to %s (%s total)"), + $result = sprintf(_("Viewing Messages: %s to %s (%s total)"), $start_msg, $end_msg, $num_msgs); } else if ($start_msg == $end_msg) { - $result = sprintf(_("Viewing Message: %s (1 total)"), $start_msg); + $result = sprintf(_("Viewing Message: %s (1 total)"), $start_msg); } else { $result = '
'; } @@ -930,9 +930,9 @@ function get_msgcnt_str($start_msg, $end_msg, $num_msgs) { * Generate a paginator link. */ function get_paginator_link($box, $start_msg, $use, $text) { - $result = "$text"; + . "target=\"right\">$text"; return ($result); } @@ -979,9 +979,9 @@ $show_num, $sort) { $nxt_str = get_paginator_link($box, $next_grp, $use, _("Next")); } else if (($next_grp > $num_msgs) && ($prev_grp >= 0)) { $prv_str = get_paginator_link($box, $prev_grp, $use, _("Previous")); - $nxt_str = ""._("Next")."\n"; + $nxt_str = ""._("Next")."\n"; } else if (($next_grp <= $num_msgs) && ($prev_grp < 0)) { - $prv_str = ""._("Previous") . ''; + $prv_str = ""._("Previous") . ''; $nxt_str = get_paginator_link($box, $next_grp, $use, _("Next")); } @@ -1099,16 +1099,16 @@ $show_num, $sort) { } } } else if ($PG_SHOWNUM == 999999) { - $pg_str = "" ._("Paginate") . '' . $spc; + . "TARGET=\"right\">" ._("Paginate") . '' . $spc; } /* If necessary, compute the 'show all' string. */ if (($prv_str != '') || ($nxt_str != '')) { - $all_str = "" . _("Show All") . ''; + . "TARGET=\"right\">" . _("Show All") . ''; } /* Last but not least, get the value for the toggle all link. */ diff --git a/functions/options.php b/functions/options.php index 0137114c..057cb8c8 100644 --- a/functions/options.php +++ b/functions/options.php @@ -18,11 +18,11 @@ /* Define constants for the various option types. */ define('SMOPT_TYPE_STRING', 0); define('SMOPT_TYPE_STRLIST', 1); -define('SMOPT_TYPE_TEXTAREA', 2); +define('SMOPT_TYPE_textarea', 2); define('SMOPT_TYPE_INTEGER', 3); define('SMOPT_TYPE_FLOAT', 4); define('SMOPT_TYPE_BOOLEAN', 5); -define('SMOPT_TYPE_HIDDEN', 6); +define('SMOPT_TYPE_hidden', 6); define('SMOPT_TYPE_COMMENT', 7); /* Define constants for the options refresh levels. */ @@ -97,7 +97,7 @@ class SquirrelOption { } /* Set the default save function. */ - if (($type != SMOPT_TYPE_HIDDEN) && ($type != SMOPT_TYPE_COMMENT)) { + if (($type != SMOPT_TYPE_hidden) && ($type != SMOPT_TYPE_COMMENT)) { $this->save_function = SMOPT_SAVE_DEFAULT; } else { $this->save_function = SMOPT_SAVE_NOOP; @@ -145,7 +145,7 @@ class SquirrelOption { case SMOPT_TYPE_STRLIST: $result = $this->createWidget_StrList(); break; - case SMOPT_TYPE_TEXTAREA: + case SMOPT_TYPE_textarea: $result = $this->createWidget_TextArea(); break; case SMOPT_TYPE_INTEGER: @@ -157,16 +157,16 @@ class SquirrelOption { case SMOPT_TYPE_BOOLEAN: $result = $this->createWidget_Boolean(); break; - case SMOPT_TYPE_HIDDEN: + case SMOPT_TYPE_hidden: $result = $this->createWidget_Hidden(); break; case SMOPT_TYPE_COMMENT: $result = $this->createWidget_Comment(); break; default: - $result = '' + $result = '' . sprintf(_("Option Type '%s' Not Found"), $this->type) - . ''; + . ''; } /* Add the script for this option. */ @@ -195,33 +195,33 @@ class SquirrelOption { $width = 25; } - $result = "name\" VALUE=\"$this->value\" SIZE=\"$width\">"; + $result = "name\" value=\"$this->value\" size=\"$width\">"; return ($result); } function createWidget_StrList() { /* Begin the select tag. */ - $result = "name\">"; /* Add each possible value to the select list. */ foreach ($this->possible_values as $real_value => $disp_value) { /* Start the next new option string. */ - $new_option = ""; + $new_option .= ">$disp_value"; /* And add the new option string to our select tag. */ $result .= $new_option; } /* Close the select tag and return our happy result. */ - $result .= ''; + $result .= ''; return ($result); } @@ -234,8 +234,8 @@ class SquirrelOption { case SMOPT_SIZE_NORMAL: default: $rows = 5; $cols = 50; } - $result = ""; + $result = ""; return ($result); } @@ -250,21 +250,21 @@ class SquirrelOption { function createWidget_Boolean() { /* Do the whole current value thing. */ if ($this->value != SMPREF_NO) { - $yes_chk = ' CHECKED'; + $yes_chk = ' checked'; $no_chk = ''; } else { $yes_chk = ''; - $no_chk = ' CHECKED'; + $no_chk = ' checked'; } /* Build the yes choice. */ - $yes_option = ' " + $yes_option = ' " . _("Yes"); /* Build the no choice. */ - $no_option = ' " + $no_option = ' " . _("No"); /* Build and return the combined "boolean widget". */ @@ -273,8 +273,8 @@ class SquirrelOption { } function createWidget_Hidden() { - $result = ''; + $result = ''; return ($result); } @@ -314,9 +314,9 @@ function create_optmode_element($optmode) { } function create_hidden_element($name, $value) { - $result = ''; + $result = ''; return ($result); } @@ -387,32 +387,37 @@ function print_option_groups($option_groups) { foreach ($option_groups as $next_optgrp) { /* If it is not blank, print the name for this option group. */ if ($next_optgrp['name'] != '') { - echo '' - . $next_optgrp['name'] - . "\n"; + echo html_tag( 'tr', "\n". + html_tag( 'td', + '' . $next_optgrp['name'] . '' , + 'center' ,'', 'valign="middle" colspan="2" nowrap' ) + ) ."\n"; } /* Print each option in this option group. */ foreach ($next_optgrp['options'] as $option) { - if ($option->type != SMOPT_TYPE_HIDDEN) { - echo "\n"; - echo ' ' - . $option->caption . ":\n"; - echo ' ' . $option->createHTMLWidget() . "\n"; - echo "\n"; + if ($option->type != SMOPT_TYPE_hidden) { + echo html_tag( 'tr', "\n". + html_tag( 'td', $option->caption . ':', 'right' ,'', 'valign="middle"' ) . + html_tag( 'td', $option->createHTMLWidget(), 'left' ) + ) ."\n"; } else { echo $option->createHTMLWidget(); } } /* Print an empty row after this option group. */ - echo " \n"; + echo html_tag( 'tr', + html_tag( 'td', ' ', 'left', '', 'colspan="2"' ) + ) . "\n"; } } function OptionSubmit( $name ) { - echo ' ' . - ''; + echo html_tag( 'tr', + html_tag( 'td', ' ', 'left', '', 'colspan="2"' ) . + html_tag( 'td', '', 'left', '', 'colspan="2"' ) + ) . "\n"; } ?> diff --git a/locale/he_HE/LC_MESSAGES/squirrelmail.po b/locale/he_HE/LC_MESSAGES/squirrelmail.po index d53d3489..9f1a878b 100644 --- a/locale/he_HE/LC_MESSAGES/squirrelmail.po +++ b/locale/he_HE/LC_MESSAGES/squirrelmail.po @@ -1438,7 +1438,7 @@ msgstr " #: squirrelmail/src/signout.php:80 msgid "You have been successfully signed out." -msgstr "äúðú÷ îäîòøëú áäöìçä." +msgstr "äúðú÷ú îäîòøëú áäöìçä." #: squirrelmail/src/signout.php:82 msgid "Click here to log back in." diff --git a/src/download.php b/src/download.php index b148bb1c..6a24ce18 100644 --- a/src/download.php +++ b/src/download.php @@ -62,9 +62,6 @@ function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at, $imapC flush(); - //"\n"; +echo "\n"; +echo "\n"; echo html_tag( 'tr', html_tag( 'td', ' ', 'left', $color[4] ) @@ -164,7 +164,7 @@ if ($count_special_folders < count($boxes)) { } } echo "\n". - "\n". "\n"; @@ -204,12 +204,12 @@ if ($count_special_folders < count($boxes)) { } } echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; } else { - echo _("No folders found") . "

"; + echo _("No folders found") . "

"; } echo html_tag( 'tr', @@ -241,7 +241,7 @@ if ($count_special_folders < count($boxes)) { } } echo "

\n"; - echo "\n"; echo "\n"; @@ -283,7 +283,7 @@ if ($box && $box2) { echo "
". - //"
"; - html_tag( 'table', html_tag( 'tr', html_tag( 'td', '' . $body . '', 'left', $color[4] ) diff --git a/src/folders.php b/src/folders.php index f7d74374..c9d2540f 100644 --- a/src/folders.php +++ b/src/folders.php @@ -67,7 +67,7 @@ echo html_tag( 'table', '', 'center', '', 'width="70%" cols="1" cellpadding="4" html_tag( 'td', '', 'center', $color[0] ) . "
\n". - "
\n". + "
\n". _("as a subfolder of"). "
". "\n"; if ($show_contain_subfolders_option) { - echo "
 "; + echo "
 "; echo _("Let this folder contain subfolders"); echo "
"; } -echo "\n"; -echo "

\n"; } else { echo _("No folders were found to subscribe to!") . ""; diff --git a/src/right_main.php b/src/right_main.php index 33126f19..aee1acd1 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -129,7 +129,7 @@ if ($just_logged_in == true) { if (strlen(trim($motd)) > 0) { echo html_tag( 'table', html_tag( 'tr', - html_tag( 'td', $motd , + html_tag( 'td', html_tag( 'table', html_tag( 'tr', html_tag( 'td', $motd, 'center' ) diff --git a/src/vcard.php b/src/vcard.php index bf9d46f1..46207d5c 100644 --- a/src/vcard.php +++ b/src/vcard.php @@ -112,8 +112,10 @@ if (isset($vcard_safe['url'])) { foreach ($ShowValues as $k => $v) { if (isset($vcard_safe[$k]) && $vcard_safe[$k]) { - echo "$v:" . $vcard_safe[$k] . - "\n"; + echo html_tag( 'tr', + html_tag( 'td', '' . $v . ':', 'right' ) . + html_tag( 'td', $vcard_safe[$k], 'left' ) + ) . "\n"; } } -- 2.25.1