From b01b21d00c21c47620a86a8412918b287676eca7 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Fri, 28 Jun 2002 06:36:15 +0000 Subject: [PATCH] r2l by Yoav git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3022 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/page_header.php | 38 ++-- locale/he_HE/LC_MESSAGES/squirrelmail.po | 14 +- plugins/calendar/calendar.php | 65 ++++--- plugins/calendar/day.php | 60 ++++--- plugins/calendar/event_create.php | 98 +++++++---- plugins/calendar/event_delete.php | 95 +++++----- plugins/calendar/event_edit.php | 211 ++++++++++++++--------- plugins/calendar/functions.php | 7 +- plugins/filters/options.php | 90 +++++----- plugins/filters/spamoptions.php | 82 +++++---- 10 files changed, 451 insertions(+), 309 deletions(-) diff --git a/functions/page_header.php b/functions/page_header.php index 3cac7aed..c4d8f3af 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -13,6 +13,7 @@ require_once('../functions/strings.php'); require_once('../functions/imap_utf7_decode_local.php'); +require_once('../functions/html.php'); /* Always set up the language before calling these functions */ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) { @@ -183,29 +184,29 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) { } - echo "\n\n"; + echo "\n\n"; /** Here is the header and wrapping table **/ $shortBoxName = imap_utf7_decode_local( readShortMailboxName($mailbox, $delimiter)); if ( $shortBoxName == 'INBOX' ) { $shortBoxName = _("INBOX"); } - echo "\n" - . "\n" - . " \n" - . " \n" - . ' \n" + . html_tag( 'td', '', 'right' ) ."\n"; displayInternalLink ('src/signout.php', _("Sign Out"), $frame_top); - echo "\n" - . " \n" - . " \n" - . " \n" + . " \n" + . html_tag( 'tr', '', '', $color[4] ) ."\n" + . html_tag( 'td', '', 'left' ) ."\n"; $urlMailbox = urlencode($mailbox); if ($compose_new_win == '1') { echo "". _("Compose"). ''; @@ -227,12 +228,13 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) { do_hook("menuline"); - echo " \n \n" + . html_tag( 'td', '', 'right' ) ."\n"; echo ($hide_sm_attributions ? ' ' : - 'SquirrelMail'); - echo "\n". - " \n". - "
\n"; + echo "\n" + . html_tag( 'table', '', '', $color[4], 'border="0" width="100%" cellspacing="0" cellpadding="2"' ) ."\n" + . html_tag( 'tr', '', '', $color[9] ) ."\n" + . html_tag( 'td', '', 'left' ) ."\n"; if ( $shortBoxName <> '' && strtolower( $shortBoxName ) <> 'none' ) { - echo ' ' . _("Current Folder") . ": $shortBoxName \n"; + echo ' ' . _("Current Folder") . ": $shortBoxName \n"; } else { echo ' '; } - echo " '; + echo "
\n"; + echo "
"; + echo "
\n\n"; + 'SquirrelMail'); + echo "\n". + " \n". + "\n\n"; } /* blatently copied/truncated/modified from the above function */ @@ -285,6 +287,6 @@ function compose_Header($color, $mailbox) { } - echo "\n\n"; + echo "\n\n"; } ?> diff --git a/locale/he_HE/LC_MESSAGES/squirrelmail.po b/locale/he_HE/LC_MESSAGES/squirrelmail.po index 9f1a878b..bbb67ada 100644 --- a/locale/he_HE/LC_MESSAGES/squirrelmail.po +++ b/locale/he_HE/LC_MESSAGES/squirrelmail.po @@ -3857,11 +3857,11 @@ msgstr " #: squirrelmail/plugins/calendar/event_create.php:61 msgid "Set Event" -msgstr "öåø îàåøò" +msgstr "öåø àøåò" #: squirrelmail/plugins/calendar/event_create.php:111 msgid "Event Has been added!" -msgstr "îàåøò äåñó!" +msgstr "àøåò äåñó!" #: squirrelmail/plugins/calendar/event_create.php:114 #: squirrelmail/plugins/calendar/event_delete.php:34 @@ -3879,11 +3879,11 @@ msgstr " #: squirrelmail/plugins/calendar/event_delete.php:31 msgid "Do you really want to delete this event?" -msgstr "äàí áøöåðê ìîçå÷ îàåøò æä?" +msgstr "äàí áøöåðê ìîçå÷ àøåò æä?" #: squirrelmail/plugins/calendar/event_delete.php:89 msgid "Event deleted!" -msgstr "îàåøò ðîç÷!" +msgstr "àøåò ðîç÷!" #: squirrelmail/plugins/calendar/event_delete.php:97 msgid "Nothing to delete!" @@ -3891,11 +3891,11 @@ msgstr " #: squirrelmail/plugins/calendar/event_edit.php:79 msgid "Update Event" -msgstr "òãëï îàåøò" +msgstr "òãëï àøåò" #: squirrelmail/plugins/calendar/event_edit.php:91 msgid "Do you really want to change this event from:" -msgstr "äàí áøöåðê ìùðåú îàåøò æä î:" +msgstr "äàí áøöåðê ìùðåú àøåò æä î:" #: squirrelmail/plugins/calendar/event_edit.php:104 msgid "to:" @@ -3903,7 +3903,7 @@ msgstr " #: squirrelmail/plugins/calendar/event_edit.php:187 msgid "Event updated!" -msgstr "îàåøò òåãëï!" +msgstr "àøåò òåãëï!" #: squirrelmail/plugins/calendar/functions.php:21 msgid "Month View" diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 013215bf..b5acf74e 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -34,27 +34,37 @@ function startcalendar() { $next_year = date( 'Y', $next_date ); $self = 'calendar.php'; - echo "" . - "" . - ''. - "\n". - "\n". - "\n" . - "". - "". - ''. - "'. - "'. - "'. - "'. - "'. - "'. - "'. - ''; - + echo html_tag( 'tr', "\n". + html_tag( 'td', "\n". + html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) . + html_tag( 'tr', "\n". + html_tag( 'th', + "<< ".($year-1)."" + ) . "\n". + html_tag( 'th', + "< " . + date_intl( 'M', $prev_date). "" + ) . "\n". + html_tag( 'th', date_intl( 'F Y', $act_date ), '', $color[0], 'colspan="3"') . + html_tag( 'th', + "" . + date_intl( 'M', $next_date) . " >" + ) . "\n". + html_tag( 'th', + "".($year+1)." >>" + ) + ) . "\n". + html_tag( 'tr', + html_tag( 'th', _("Sunday"), '', $color[5], 'width="14%" width="90"' ) ."\n" . + html_tag( 'th', _("Monday"), '', $color[5], 'width="14%" width="90"' ) ."\n" . + html_tag( 'th', _("Tuesday"), '', $color[5], 'width="14%" width="90"' ) ."\n" . + html_tag( 'th', _("Wednesday"), '', $color[5], 'width="14%" width="90"' ) ."\n" . + html_tag( 'th', _("Thursday"), '', $color[5], 'width="14%" width="90"' ) ."\n" . + html_tag( 'th', _("Friday"), '', $color[5], 'width="14%" width="90"' ) ."\n" . + html_tag( 'th', _("Saturday"), '', $color[5], 'width="14%" width="90"' ) ."\n" + ) + ) , + '', $color[0] ) ."\n"; } //main logic for month view of calendar @@ -64,20 +74,20 @@ function drawmonthview() { $aday = 1 - date('w', mktime(0, 0, 0, $month, 1, $year)); $days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year)); while ($aday <= $days_in_month) { - echo ''; + echo html_tag( 'tr' ); for ($j=1; $j<=7; $j++) { $cdate="$month"; ($aday<10)?$cdate=$cdate."0$aday":$cdate=$cdate."$aday"; $cdate=$cdate."$year"; if ( $aday <= $days_in_month && $aday > 0){ - echo "\n"; + echo "\n\n"; $aday++; } echo ''; @@ -102,7 +112,8 @@ function drawmonthview() { function endcalendar() { global $year, $month, $day, $color; - echo "
<< ".($year-1)."< " . - date_intl( 'M', $prev_date). "" . - date_intl( 'F Y', $act_date ) . "" . - date_intl( 'M', $next_date) . " >".($year+1)." >>
" . _("Sunday") . '" . _("Monday") . '" . _("Tuesday") . '" . _("Wednesday") . '" . _("Thursday") . '" . _("Friday") . '" . _("Saturday") . '
\n" . - "
"; + echo html_tag( 'td', '', 'left', $color[4], 'height="50" valign="top"' ) ."\n". + html_tag( 'div', '', 'right' ); echo(($cdate==$todayis) ? "[ " . _("TODAY") . " ] " : ""); echo "$aday
"; } else { - echo "
\n". + echo html_tag( 'td', '', 'left', $color[0]) ."\n". " "; } if (isset($calendardata[$cdate])){ @@ -91,7 +101,7 @@ function drawmonthview() { } } } - echo "\n
\n". + echo html_tag( 'tr' ) ."\n" . + html_tag( 'td', '', 'left', '', 'colspan="7"' ) ."\n" . "
\n". "
" . - " \n" . - " \n" . - " \n" . - " \n"; + echo html_tag( 'tr', '', '', $color[0] ) . "\n". + html_tag( 'td', '', 'left' ) . + html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n" . + html_tag( 'tr', + html_tag( 'th', + "< ". + date_intl('D',$prev_date)."", + 'left' ) . + html_tag( 'th', date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) , + '', '', 'width="75%"' ) . + html_tag( 'th', + "". + date_intl('D',$next_date)." >" , + 'right' ) + ); } //events for specific day are inserted into "daily" array @@ -73,10 +81,15 @@ function display_events() { $ehour = substr($calfoo['key'],0,2); $eminute = substr($calfoo['key'],2,2); if (!is_array($calfoo['value'])){ - echo " \n" . - " \n" . - " \n"; + echo html_tag( 'tr', + html_tag( 'td', $ehour . ':' . $eminute, 'left' ) . + html_tag( 'td', ' ', 'left' ) . + html_tag( 'td', + "". + _("ADD") . "" , + 'center' ) , + '', $color[$eo]); + } else { $calbar=$calfoo['value']; if ($calbar['length']!=0){ @@ -84,16 +97,19 @@ function display_events() { } else { $elength=''; } - echo " \n" . - " \n" . - " \n"; + echo html_tag( 'tr', '', '', $color[$eo] ) . + html_tag( 'td', $ehour . ':' . $eminute . $elength, 'left' ) . + html_tag( 'td', '', 'left' ) . '['; + echo ($calbar['priority']==1) ? "$calbar[title]" : "$calbar[title]"; + echo"] $calbar[message] " . + html_tag( 'td', + "\n" . + "". + _("EDIT") . " | \n" . + "" . + _("DEL") . '' . + "\n" , + 'center' ); } } diff --git a/plugins/calendar/event_create.php b/plugins/calendar/event_create.php index 72386ae9..889aa0fb 100644 --- a/plugins/calendar/event_create.php +++ b/plugins/calendar/event_create.php @@ -19,6 +19,7 @@ require_once('../functions/date.php'); require_once('../config/config.php'); require_once('../functions/page_header.php'); require_once('../src/load_prefs.php'); +require_once('../functions/html.php'); //main form to gather event info function show_event_form() { @@ -28,8 +29,9 @@ function show_event_form() { " \n". " \n". " \n". - " \n". - " \n". - " \n". - " \n". + html_tag( 'tr' ) . + html_tag( 'td', _("Length:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . "\n" . " \n". - " \n". - " \n". - " \n". + html_tag( 'tr' ) . + html_tag( 'td', _("Priority:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . "\n" . " \n". - " \n". - " \n". - " \n". + html_tag( 'tr' ) . + html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . "\n" . "
\n". - " \n". - " \n". - " \n"; + " \n". + html_tag( 'tr', + html_tag( 'td', + "" , + 'left', $color[4], 'colspan="2"' ) + ) ."\n" . + html_tag( 'tr', + html_tag( 'td', + "" , + 'left', $color[4], 'colspan="2"' ) + ) ."\n"; echo "\n"; } @@ -83,12 +94,12 @@ displayPageHeader($color, 'None'); //load calendar menu calendar_header(); - -echo "
< ". - date_intl('D',$prev_date)."" . - date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) . "". - date_intl('D',$next_date)." >
$ehour:$eminute ". - _("ADD") . "
$ehour:$eminute$elength["; - echo ($calbar['priority']==1) ? "$calbar[title]" : "$calbar[title]"; - echo"] $calbar[message] \n" . - "". - _("EDIT") . " | \n" . - "" . - _("DEL") . '' . - "
" . _("Start time:") . "\n". + html_tag( 'tr' ) . + html_tag( 'td', _("Start time:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . "\n" . " \n" . @@ -37,28 +39,37 @@ function show_event_form() { " \n". - "
" . _("Length:") . "\n". + "
" . _("Priority:") . "\n". + "
" . _("Title:") . "\n". + "
\n". - " \n". - "
" . - "" . - ''; +echo html_tag( 'tr', '', '', $color[0] ) . + html_tag( 'td', '', 'left' ) . + html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) . + html_tag( 'tr', + html_tag( 'td', date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)), 'left', '', 'colspan="2"' ) + ); //if form has not been filled in if(!isset($event_text)){ show_event_form(); @@ -106,21 +117,32 @@ if(!isset($event_text)){ 'reminder' => '' ); //save writecalendardata(); - echo "
' . - date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) . - '
\n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - "
\n". - _("Event Has been added!") . "
\n". - "
" . _("Date:") . "$month/$day/$year
" . _("Time:") . "$event_hour:$event_minute
" . _("Title:") . "$event_title
" . _("Message:") . "$event_text
\n". - "" . _("Day View") . "\n". - "
\n"; + echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'th', _("Event Has been added!") . "
\n", '', $color[4], 'colspan="2"' ) + ) . + html_tag( 'tr', + html_tag( 'td', _("Date:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', $month .'/'.$day.'/'.$year, 'left', $color[4] ) . "\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Time:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', $event_hour.':'.$event_minute, 'left', $color[4] ) . "\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', $event_title, 'left', $color[4] ) . "\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Message:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', $event_text, 'left', $color[4] ) . "\n" + ) . + html_tag( 'tr', + html_tag( 'td', + "" . _("Day View") . "\n" , + 'left', $color[4], 'colspan="2"' ) . "\n" + ) , + '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n"; } ?> diff --git a/plugins/calendar/event_delete.php b/plugins/calendar/event_delete.php index 7ad4eaaa..189ff235 100644 --- a/plugins/calendar/event_delete.php +++ b/plugins/calendar/event_delete.php @@ -19,6 +19,7 @@ require_once('../functions/date.php'); require_once('../config/config.php'); require_once('../functions/page_header.php'); require_once('../src/load_prefs.php'); +require_once('../functions/html.php'); function confirm_deletion() { @@ -26,41 +27,51 @@ function confirm_deletion() $tmparray = $calendardata["$dmonth$dday$dyear"]["$dhour$dminute"]; - echo " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - "
\n". - _("Do you really want to delete this event?") . "
" . _("Date:") . "$dmonth/$dday/$dyear
" . _("Time:") . "$dhour:$dminute
" . _("Title:") . "$tmparray[title]
" . _("Message:") . "$tmparray[message]
\n". - "
\n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - ' \n". - "
\n". - "
\n". - "
\n". - " \n". - " \n". - " \n". - ' \n". - "
\n". - "
\n"; - - + echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'th', _("Do you really want to delete this event?") . '
', '', $color[4], 'colspan="2"' ) + ) . + html_tag( 'tr', + html_tag( 'td', _("Date:"), 'right', $color[4] ) . + html_tag( 'td', $dmonth.'/'.$dday.'/'.$dyear, 'left', $color[4] ) + ) . + html_tag( 'tr', + html_tag( 'td', _("Time:"), 'right', $color[4] ) . + html_tag( 'td', $dhour.':'.$dminute, 'left', $color[4] ) + ) . + html_tag( 'tr', + html_tag( 'td', _("Title:"), 'right', $color[4] ) . + html_tag( 'td', $tmparray[title], 'left', $color[4] ) + ) . + html_tag( 'tr', + html_tag( 'td', _("Message:"), 'right', $color[4] ) . + html_tag( 'td', $tmparray[message], 'left', $color[4] ) + ) . + html_tag( 'tr', + html_tag( 'td', + "
\n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + ' \n". + "
\n" , + 'right', $color[4] ) . + html_tag( 'td', + "
\n". + " \n". + " \n". + " \n". + ' \n". + "
\n" , + 'left', $color[4] ) + ) , + '', $color[0], 'border="0" cellpadding="2" cellspacing="1"' ); } if ($month <= 0){ @@ -79,16 +90,18 @@ displayPageHeader($color, 'None'); //load calendar menu calendar_header(); -echo "
". - "". - '\n". - " \n". - " \n". - " \n". + html_tag( 'tr' ) . + html_tag( 'td', _("Time:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . " \n". @@ -55,29 +58,35 @@ function show_event_form() { " \n". - " \n". - " \n". - " \n". + html_tag( 'tr' ) . + html_tag( 'td', _("Length:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . " \n". - " \n". - " \n". - " \n". + html_tag( 'tr' ) . + html_tag( 'td', _("Priority:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . " \n". - " \n". - " \n". - " \n". + html_tag( 'tr' ) . + html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . "
\n". - " \n". - " \n". - " \n". - "\n"; + " \n". + html_tag( 'td', + " \n" , + 'left', $color[4], 'colspan="2"' ) . + '' . html_tag( 'tr' ) . + html_tag( 'td', + "\n" , + 'left', $color[4], 'colspan="2"' ) . + "\n"; } // self explenatory @@ -86,63 +95,86 @@ function confirm_update() { $tmparray = $calendardata["$month$day$year"]["$hour$minute"]; - echo "
'. +echo html_tag( 'tr', '', '', $color[0] ) . + html_tag( 'td' ) . + html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) . + html_tag( 'tr' ) . + html_tag( 'td', '', 'left' ) . date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)); if (isset($dyear) && isset($dmonth) && isset($dday) && isset($dhour) && isset($dminute)){ if (isset($confirmed)){ delete_event("$dmonth$dday$dyear", "$dhour$dminute"); - echo '

' . _("Event deleted!") . "
\n"; - echo "" . - _("Day View") . "\n"; + echo '

' . _("Event deleted!") . "
\n"; + echo "" . + _("Day View") . "\n"; } else { readcalendardata(); confirm_deletion(); diff --git a/plugins/calendar/event_edit.php b/plugins/calendar/event_edit.php index 8c8fdfa4..f547c0ab 100644 --- a/plugins/calendar/event_edit.php +++ b/plugins/calendar/event_edit.php @@ -19,6 +19,7 @@ require_once('../functions/date.php'); require_once('../config/config.php'); require_once('../functions/page_header.php'); require_once('../src/load_prefs.php'); +require_once('../functions/html.php'); // update event info function show_event_form() { @@ -32,8 +33,9 @@ function show_event_form() { " \n". " \n". " \n". - "
" . _("Date:") . "\n". + html_tag( 'tr' ) . + html_tag( 'td', _("Date:"), 'right', $color[4] ) . "\n" . + html_tag( 'td', '', 'left', $color[4] ) . " \n" . @@ -45,9 +47,10 @@ function show_event_form() { " \n". - "
" . _("Time:") . "\n". + "
" . _("Length:") . "\n". + "
" . _("Priority:") . "\n". + "
" . _("Title:") . "\n". + "
\n". - " \n". - "
\n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - "
\n". - _("Do you really want to change this event from:") . "
\n". - "
" . _("Date:") . "$month/$day/$year
" . _("Time:") . "$hour:$minute
" . _("Priority:") . "$tmparray[priority]
" . _("Title:") . "$tmparray[title]
" . _("Message:") . "$tmparray[message]
\n". - _("to:") . "
\n". - "
" . _("Date:") . "$event_month/$event_day/$event_year
" . ("Time:") . "$event_hour:$event_minute
" . _("Priority:") . "$event_priority
" . _("Title:") . "$event_title
" . _("Message:") . "$event_text
\n". - "
\n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - " \n". - ' \n". - "
\n". - "
\n". - "
\n". - " \n". - " \n". - " \n". - ' \n". - "
\n". - "
\n"; + echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'th', _("Do you really want to change this event from:") . "
\n", '', $color[4], 'colspan="2"' ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Date:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $month.'/'.$day.'/'.$year , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Time:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $hour.':'.$minute , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Priority:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $tmparray[priority] , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Title:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $tmparray[title] , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Message:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $tmparray[message] , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'th', _("to:") . "
\n", '', $color[4], 'colspan="2"' ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Date:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $event_month.'/'.$event_day.'/'.$event_year , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Time:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $event_hour.':'.$event_minute , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Priority:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $event_priority , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Title:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $event_title , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', _("Message:") , 'right', $color[4] ) ."\n" . + html_tag( 'td', $event_text , 'left', $color[4] ) ."\n" + ) . + html_tag( 'tr', + html_tag( 'td', + "
\n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + ' \n". + "
\n" , + 'right', $color[4] ) ."\n" . + html_tag( 'td', + "
\n". + " \n". + " \n". + " \n". + ' \n". + "
\n" , + 'left', $color[4] ) ."\n" + ) , + '', $color[0], 'border="0" cellpadding="2" cellspacing="1"' ); } if ($month <= 0){ @@ -164,11 +196,13 @@ displayPageHeader($color, 'None'); //load calendar menu calendar_header(); -echo "
" . - "" . - ''; +echo html_tag( 'tr', '', '', $color[0] ) . + html_tag( 'td', '', 'left' ) . + html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) . + html_tag( 'tr' ) . + html_tag( 'td', + date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) , + 'left', '', 'colspan="2"' ); if (!isset($updated)){ //get changes to event readcalendardata(); @@ -184,9 +218,16 @@ if (!isset($updated)){ confirm_update(); } else { update_event("$month$day$year", "$hour$minute"); - echo "\n"; - echo "\n"; + echo html_tag( 'tr', + html_tag( 'td', _("Event updated!"), 'left' ) + ) . "\n"; + echo html_tag( 'tr', + html_tag( 'td', + "" . + _("Day View") ."", + 'left' ) + ) . "\n"; + $fixdate = date( 'mdY', mktime(0, 0, 0, $event_month, $event_day, $event_year)); //if event has been moved to different year then act accordingly if ($year==$event_year){ diff --git a/plugins/calendar/functions.php b/plugins/calendar/functions.php index 570c3126..be12a0d7 100644 --- a/plugins/calendar/functions.php +++ b/plugins/calendar/functions.php @@ -15,8 +15,9 @@ function calendar_header() { //Add Second layer ofCalendar links to upper menu global $color,$year,$day,$month; - echo "
' . - date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) . - '
" . _("Event updated!") . "
" . - _("Day View") ."
". - "'; + echo ''; } diff --git a/plugins/filters/options.php b/plugins/filters/options.php index 77a62fb3..a611d53a 100644 --- a/plugins/filters/options.php +++ b/plugins/filters/options.php @@ -65,36 +65,41 @@ $filters_user_scan = getPref($data_dir, $username, 'filters_user_scan'); echo '
' . - '
"; + echo html_tag( 'table', '', '', $color[0], 'border="0" width="100%" cellspacing="0" cellpadding="2"' ) . + html_tag( 'tr' ) . + html_tag( 'td', '', 'left', '', 'width="100%"' ); displayInternalLink("plugins/calendar/calendar.php?year=$year&month=$month",_("Month View"),"right"); echo "  \n"; @@ -24,7 +25,7 @@ function calendar_header() { echo "  \n"; // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right"); // echo "  \n"; - echo '
'. - "
". - '
' . _("Options") . ' - ' . _("Message Filtering") . '
'. - '
'. + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', + '
' . _("Options") . ' - ' . _("Message Filtering") . '
' , + 'left', $color[0] ) + ) , + 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) . '
'. '
'. - ''. - ''. - ''. - ''. - ''. + html_tag( 'td', '', 'left' ) . '
' . _("What to Scan:") . ''. ''. '' . ''. '
'. '
'. '
'. - '
[' . _("New") . - '] - [' . _("Done") . ']

'; + html_tag( 'div', '[' . _("New") . + '] - [' . _("Done") . ']' , + 'center' ) . '
'; if (isset($action) && ($action == 'add' || $action == 'edit')) { $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); @@ -103,12 +108,12 @@ if ( !isset($theid) ) { $theid = count($filters); } - echo '
'. + echo html_tag( 'div', '', 'center' ) . '
'. - ''. - ''. - ''. - ''. ''. - ''. - ''. - ''. ''. - ''. - ''. - '
' . _("Match:") . ''. + html_tag( 'table', '', '', '', 'border="0" cellpadding="2" cellspacing="0"' ) + html_tag( 'tr' ) . + html_tag( 'td', _("Match:"), 'left' ) . + html_tag( 'td', '', 'left' ) . ''. '
'. - _("Contains:"). - ''. + html_tag( 'tr' ) . + html_tag( 'td', _("Contains:"), 'right' ) . + html_tag( 'td', '', 'left' ) . ''. '
'. - _("Move to:"). - ''. + html_tag( 'tr' ) . + html_tag( 'td', _("Move to:"), 'left' ) . + html_tag( 'td', '', 'left' ) . ''. ''. "". ''. - ''; + ''; } - echo ''; + echo html_tag( 'table', '', 'center', '', 'border="0" cellpadding="3" cellspacing="0"' ) for ($i=0; $i < count($filters); $i++) { $clr = (($i % 2)?$color[0]:$color[9]); $fdr = ($folder_prefix)?str_replace($folder_prefix, "", $filters[$i]["folder"]):$filters[$i]["folder"]; echo "'. + html_tag( 'td', '-', 'left' ) . + html_tag( 'td', '', 'left' ); printf( _("If %s contains %s then move to %s"), _($filters[$i]['where']), $filters[$i]['what'], $fdr ); echo ''; } echo '
". - "[" . _("Edit") . ']'. - ''. - "[" . _("Delete") . ']'. - '['; + echo html_tag( 'tr', '', $clr ) . + html_tag( 'td', + '' . + "[" . _("Edit") . ']'. + '' , + 'left' ) . + html_tag( 'td', + '' . + "[" . _("Delete") . ']'. + '' , + 'left' ) . + html_tag( 'td', '', 'center' ) . '['; if (isset($filters[$i + 1])) { echo "" . _("Down") . ''; @@ -198,14 +207,17 @@ if ($i > 0) { echo "" . _("Up") . ''; } - echo ']-'; + echo ']
'. - ''. - ''. - '
 
'; - + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', ' ', 'left' ) + ) , + 'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' ); ?> diff --git a/plugins/filters/spamoptions.php b/plugins/filters/spamoptions.php index b0a179ed..40e8326f 100644 --- a/plugins/filters/spamoptions.php +++ b/plugins/filters/spamoptions.php @@ -29,6 +29,7 @@ require_once('../src/validate.php'); require_once('../functions/page_header.php'); require_once('../functions/imap.php'); require_once('../src/load_prefs.php'); +require_once('../functions/html.php'); global $AllowSpamFilters; @@ -53,14 +54,19 @@ $filters_spam_folder = getPref($data_dir, $username, 'filters_spam_folder'); $filters_spam_scan = getPref($data_dir, $username, 'filters_spam_scan'); $filters = load_filters(); -echo "". - ''. - '
' . _("Spam Filtering") . '
'; +echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'th', _("Spam Filtering"), 'center' ) + ) , + 'center', $color[0], 'width="95%" border="0" cellpadding="2" cellspacing="0"' ); if ($SpamFilters_YourHop == ' ') { - echo '
' . - _("WARNING! Tell your admin to set the SpamFilters_YourHop variable") . - '

'; + echo '
' . + html_tag( 'div', '' . + _("WARNING! Tell your admin to set the SpamFilters_YourHop variable") . + '' , + 'center' ) . + '
'; } @@ -79,10 +85,11 @@ if (isset($action) && $action == 'spam') { echo '
'. '
'. - ''. - ''. - ''. - ''. ''. - ''. - ''. - ''. - ''. ''. - ''. - ''; + html_tag( 'tr', + html_tag( 'td', ' ' ) . + html_tag( 'td', + _("The more messages you scan, the longer it takes. I would suggest that you scan only new messages. If you make a change to your filters, I would set it to scan all messages, then go view my INBOX, then come back and set it to scan only new messages. That way, your new spam filters will be applied and you'll scan even the spam you read with the new filters.") , + 'left' ) + ); $spam_filters = load_spam_filters(); foreach ($spam_filters as $Key => $Value) { - echo "\n" . - '\n"; + echo '' . + html_tag( 'tr', + html_tag( 'td', ' ' ) . + html_tag( 'td', $spam_filters[$Key]['comment'], 'left' ) + ) . "\n"; + } - echo ''. + echo html_tag( 'tr', + html_tag( 'td', '', 'center', '', 'colspan="2"' ) + ) . "\n" . '
' . _("Move spam to:") . ''; for ($i = 0; $i < count($boxes); $i++) { if (! in_array('noselect', $boxes[$i]['flags'])) { @@ -98,12 +105,16 @@ if (isset($action) && $action == 'spam') { echo ''. '
' . - _("Moving spam directly to the trash may not be a good idea at first, since messages from friends and mailing lists might accidentally be marked as spam. Whatever folder you set this to, make sure that it gets cleaned out periodically, so that you don't have an excessively large mailbox hanging around.") . - '
' . _("What to Scan:") . ''. '
'. - _("The more messages you scan, the longer it takes. I would suggest that you scan only new messages. If you make a change to your filters, I would set it to scan all messages, then go view my INBOX, then come back and set it to scan only new messages. That way, your new spam filters will be applied and you'll scan even the spam you read with the new filters."). - '
$Key'; } - echo '
' . - $spam_filters[$Key]['comment'] . - "
'. '
'. '
'; @@ -155,7 +175,8 @@ if (isset($action) && $action == 'spam') { if (! isset($action) || $action != 'spam') { - echo '

[' . _("Edit") . ']' . + echo html_tag( 'p', '', 'center' ) . + '[' . _("Edit") . ']' . ' - [' . _("Done") . ']

'; printf( _("Spam is sent to %s"), ($filters_spam_folder?$filters_spam_folder:_("[not set yet]") ) ); echo '
'; @@ -166,7 +187,8 @@ if (! isset($action) || $action != 'spam') { $spam_filters = load_spam_filters(); foreach ($spam_filters as $Key => $Value) { - echo '

'; + echo html_tag( 'tr' ) . + html_tag( 'th', '', 'center' ); if ($spam_filters[$Key]['enabled']) { echo _("ON"); @@ -174,7 +196,9 @@ if (! isset($action) || $action != 'spam') { echo _("OFF"); } - echo ' - '; + echo '' . + html_tag( 'td', ' - ', 'left' ) . + html_tag( 'td', '', 'left' ); if ($spam_filters[$Key]['link']) { echo '