r2l by Yoav
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 28 Jun 2002 06:36:15 +0000 (06:36 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 28 Jun 2002 06:36:15 +0000 (06:36 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3022 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/page_header.php
locale/he_HE/LC_MESSAGES/squirrelmail.po
plugins/calendar/calendar.php
plugins/calendar/day.php
plugins/calendar/event_create.php
plugins/calendar/event_delete.php
plugins/calendar/event_edit.php
plugins/calendar/functions.php
plugins/filters/options.php
plugins/filters/spamoptions.php

index 3cac7aeda9a42075c3d4995ff49d703e5487d62b..c4d8f3af2e0a0a3fc5d59ad304e3e48fde18fd39 100644 (file)
@@ -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 "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" $onload>\n\n";
+    echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\" $onload>\n\n";
     /** Here is the header and wrapping table **/
     $shortBoxName = imap_utf7_decode_local(
                      readShortMailboxName($mailbox, $delimiter));
     if ( $shortBoxName == 'INBOX' ) {
         $shortBoxName = _("INBOX");
     }
-    echo "<A NAME=pagetop></A>\n"
-        . "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n"
-        . "   <TR BGCOLOR=\"$color[9]\" >\n"
-        . "      <TD ALIGN=left>\n";
+    echo "<a name=\"pagetop\"></a>\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") . ": <B>$shortBoxName&nbsp;</B>\n";
+        echo '         ' . _("Current Folder") . ": <b>$shortBoxName&nbsp;</b>\n";
     } else {
         echo '&nbsp;';
     }
-    echo  "      </TD>\n"
-        . '      <TD ALIGN=right><b>';
+    echo  "      </td>\n"
+        . html_tag( 'td', '', 'right' ) ."<b>\n";
     displayInternalLink ('src/signout.php', _("Sign Out"), $frame_top);
-    echo "</b></TD>\n"
-        . "   </TR>\n"
-        . "   <TR BGCOLOR=\"$color[4]\">\n"
-        . "      <TD ALIGN=left>\n";
+    echo "</b></td>\n"
+        . "   </tr>\n"
+        . html_tag( 'tr', '', '', $color[4] ) ."\n"
+        . html_tag( 'td', '', 'left' ) ."\n";
     $urlMailbox = urlencode($mailbox);
     if ($compose_new_win == '1') {
         echo "<a href=\"javascript:void(0)\" onclick=\"comp_in_new(true,'')\">". _("Compose"). '</a>';
@@ -227,12 +228,13 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
 
     do_hook("menuline");
 
-    echo "      </TD>\n      <TD ALIGN=\"right\">";
+    echo "      </td>\n"
+        . html_tag( 'td', '', 'right' ) ."\n";
     echo ($hide_sm_attributions ? '&nbsp;' :
-            '<A HREF="http://www.squirrelmail.org/" TARGET="_blank">SquirrelMail</A>');
-    echo "</TD>\n".
-        "   </TR>\n".
-        "</TABLE>\n\n";
+            '<a href="http://www.squirrelmail.org/" target="_blank">SquirrelMail</a>');
+    echo "</td>\n".
+        "   </tr>\n".
+        "</table>\n\n";
 }
 
 /* blatently copied/truncated/modified from the above function */
@@ -285,6 +287,6 @@ function compose_Header($color, $mailbox) {
 
     }
 
-    echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" $onload>\n\n";
+    echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\" $onload>\n\n";
 }
 ?>
index 9f1a878b075e4cb5e2417a1d770f626fad71f949..bbb67ada4080c200bc12b33f5d3364c176391f0b 100644 (file)
@@ -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"
index 013215bf028b5eace641f94ff63d90ea5ddf3a17..b5acf74e9eedaa90f000471f137f483e0185b6e9 100644 (file)
@@ -34,27 +34,37 @@ function startcalendar() {
     $next_year = date( 'Y', $next_date );
     $self = 'calendar.php';
 
-    echo "<TR BGCOLOR=\"$color[0]\"><TD>" .
-         "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">" .
-         '<tr>'.
-         "<th><a href=\"$self?year=".($year-1)."&month=$month\">&lt;&lt;&nbsp;".($year-1)."</a></th>\n".
-         "<th><a href=\"$self?year=$prev_year&month=$prev_month\">&lt;&nbsp;" .
-         date_intl( 'M', $prev_date). "</a></th>\n".
-         "<th bgcolor=$color[0] colspan=3>" .
-         date_intl( 'F Y', $act_date ) . "</th>\n" .
-         "<th><a href=\"$self?year=$next_year&month=$next_month\">" .
-         date_intl( 'M', $next_date) . "&nbsp;&gt;</a></th>".
-         "<th><a href=\"$self?year=".($year+1)."&month=$month\">".($year+1)."&nbsp;&gt;&gt;</a></th>".
-         '</tr><tr>'.
-         "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Sunday") . '</th>'.
-         "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Monday") . '</th>'.
-         "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Tuesday") . '</th>'.
-         "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Wednesday") . '</th>'.
-         "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Thursday") . '</th>'.
-         "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Friday") . '</th>'.
-         "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Saturday") . '</th>'.
-        '</tr>';
-
+    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',
+                                "<a href=\"$self?year=".($year-1)."&month=$month\">&lt;&lt;&nbsp;".($year-1)."</a>"
+                            ) . "\n".
+                            html_tag( 'th',
+                                "<a href=\"$self?year=$prev_year&month=$prev_month\">&lt;&nbsp;" .
+                                date_intl( 'M', $prev_date). "</a>"
+                            ) . "\n".
+                            html_tag( 'th', date_intl( 'F Y', $act_date ), '', $color[0], 'colspan="3"') .
+                            html_tag( 'th',
+                                "<a href=\"$self?year=$next_year&month=$next_month\">" .
+                                date_intl( 'M', $next_date) . "&nbsp;&gt;</a>"
+                            ) . "\n".
+                            html_tag( 'th',
+                                "<a href=\"$self?year=".($year+1)."&month=$month\">".($year+1)."&nbsp;&gt;&gt;</a>"
+                            )
+                       ) . "\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 '<tr>';
+        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 "<TD BGCOLOR=\"$color[4]\" height=50 valign=top>\n" .
-                     "<div align=right>";
+                echo html_tag( 'td', '', 'left', $color[4], 'height="50" valign="top"' ) ."\n".
+                     html_tag( 'div', '', 'right' );
                 echo(($cdate==$todayis) ? "<font size=-1 color=$color[1]>[ " . _("TODAY") . " ] " : "<font size=-1>");
                 echo "<a href=day.php?year=$year&month=$month&day=";
                 echo(($aday<10) ? "0" : "");
                 echo "$aday>$aday</a></font></div>";
             } else {
-                echo "<TD BGCOLOR=\"$color[0]\">\n".
+                echo html_tag( 'td', '', 'left', $color[0]) ."\n".
                      "&nbsp;";
             }
             if (isset($calendardata[$cdate])){
@@ -91,7 +101,7 @@ function drawmonthview() {
                     }
                 }
             }
-            echo "\n</TD>\n";
+            echo "\n</td>\n";
             $aday++;
         }
         echo '</tr>';
@@ -102,7 +112,8 @@ function drawmonthview() {
 function endcalendar() {
     global $year, $month, $day, $color;
 
-    echo "          <TR><TD COLSPAN=7>\n".
+    echo html_tag( 'tr' ) ."\n" .
+           html_tag( 'td', '', 'left', '', 'colspan="7"' ) ."\n" .
          "          <FORM NAME=caljump ACTION=\"calendar.php\" METHOD=POST>\n".
          "          <SELECT NAME=\"year\">\n";
     select_option_year($year);
index 36ae7171bb6acbf8e26cb4c7d645c11d02e84590..7fe61b3dd4bf45bec8886464b03918d9aa974fb2 100644 (file)
@@ -19,20 +19,28 @@ 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');
 
 //displays head of day calendar view
 function day_header() {
     global $color, $month, $day, $year, $prev_year, $prev_month, $prev_day,
            $prev_date, $next_month, $next_day, $next_year, $next_date;
 
-    echo "    <TR BGCOLOR=\"$color[0]\"><TD>" .
-         "         <TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">\n" .
-         "         <TR><TH WIDTH=\"5%\" ALIGN=LEFT><A HREF=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">&lt;&nbsp;".
-         date_intl('D',$prev_date)."</A></TH>\n" .
-         "         <TH WIDTH=\"75%\">" .
-         date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) . "</TH>\n" .
-         "         <TH ALIGN=RIGHT><A HREF=\"day.php?year=$next_year&month=$next_month&day=$next_day\">".
-         date_intl('D',$next_date)."&nbsp;&gt;</A></TH></TR>\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',
+                                "<a href=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">&lt;&nbsp;".
+                                date_intl('D',$prev_date)."</a>",
+                            'left' ) .
+                            html_tag( 'th', date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) ,
+                            '', '', 'width="75%"' ) .
+                            html_tag( 'th',
+                                "<a href=\"day.php?year=$next_year&month=$next_month&day=$next_day\">".
+                                date_intl('D',$next_date)."&nbsp;&gt;</a>" ,
+                            '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 "         <TR BGCOLOR=\"$color[$eo]\"><TD>$ehour:$eminute</TD>\n" .
-                 "              <TD>&nbsp;</TD>\n" .
-                 "              <TD ALIGN=CENTER><FONT SIZE=-1><A HREF=\"event_create.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."\">".
-                 _("ADD") . "</A></FONT></TD></TR>\n";
+            echo html_tag( 'tr',
+                       html_tag( 'td', $ehour . ':' . $eminute, 'left' ) .
+                       html_tag( 'td', '&nbsp;', 'left' ) .
+                       html_tag( 'td',
+                           "<font size=\"-1\"><a href=\"event_create.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."\">".
+                           _("ADD") . "</a></font>" ,
+                       'center' ) ,
+                   '', $color[$eo]);
+
         } else {
             $calbar=$calfoo['value'];
             if ($calbar['length']!=0){
@@ -84,16 +97,19 @@ function display_events() {
             } else {
                 $elength='';
             }
-            echo "         <TR BGCOLOR=\"$color[$eo]\"><TD>$ehour:$eminute$elength</TD>\n" .
-                 "              <TD>[";
-            echo ($calbar['priority']==1) ? "<FONT COLOR=\"$color[1]\">$calbar[title]</FONT>" : "$calbar[title]";
-            echo"] $calbar[message]&nbsp;</TD>\n" .
-                 "              <TD ALIGN=CENTER><FONT SIZE=-1><nobr>\n" .
-                 "<A HREF=\"event_edit.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."&minute=".substr($calfoo['key'],2,2)."\">".
-                 _("EDIT") . "</A>&nbsp;|&nbsp;\n" .
-                 "<A HREF=\"event_delete.php?dyear=$year&dmonth=$month&dday=$day&dhour=".substr($calfoo['key'],0,2)."&dminute=".substr($calfoo['key'],2,2)."&year=$year&month=$month&day=$day\">" .
-                 _("DEL") . '</A>' .
-                 "              </nobr></FONT></TD></TR>\n";
+            echo html_tag( 'tr', '', '', $color[$eo] ) .
+                        html_tag( 'td', $ehour . ':' . $eminute . $elength, 'left' ) .
+                        html_tag( 'td', '', 'left' ) . '[';
+                            echo ($calbar['priority']==1) ? "<font color=\"$color[1]\">$calbar[title]</font>" : "$calbar[title]";
+                            echo"] $calbar[message]&nbsp;" .
+                        html_tag( 'td',
+                            "<font size=\"-1\"><nobr>\n" .
+                            "<a href=\"event_edit.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."&minute=".substr($calfoo['key'],2,2)."\">".
+                            _("EDIT") . "</a>&nbsp;|&nbsp;\n" .
+                            "<a href=\"event_delete.php?dyear=$year&dmonth=$month&dday=$day&dhour=".substr($calfoo['key'],0,2)."&dminute=".substr($calfoo['key'],2,2)."&year=$year&month=$month&day=$day\">" .
+                            _("DEL") . '</a>' .
+                            "</nobr></font>\n" ,
+                        'center' );
     }
 }
 
index 72386ae9445a42720c84319d24d7e0580146211c..889aa0fb580ec1d983236fe8647cb015b5d43994 100644 (file)
@@ -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() {
          "      <INPUT TYPE=hidden NAME=\"year\" VALUE=\"$year\">\n".
          "      <INPUT TYPE=hidden NAME=\"month\" VALUE=\"$month\">\n".
          "      <INPUT TYPE=hidden NAME=\"day\" VALUE=\"$day\">\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Start time:") . "</TD>\n".
-         "      <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+         html_tag( 'tr' ) .
+         html_tag( 'td', _("Start time:"), 'right', $color[4] ) . "\n" .
+         html_tag( 'td', '', 'left', $color[4] ) . "\n" .
          "      <SELECT NAME=\"event_hour\">\n";
     select_option_hour($hour);
     echo "      </SELECT>\n" .
@@ -37,28 +39,37 @@ function show_event_form() {
          "      <SELECT NAME=\"event_minute\">\n";
     select_option_minute("00");
     echo "      </SELECT>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Length:") . "</TD>\n".
-         "      <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+         "      </td></tr>\n".
+         html_tag( 'tr' ) .
+         html_tag( 'td', _("Length:"), 'right', $color[4] ) . "\n" .
+         html_tag( 'td', '', 'left', $color[4] ) . "\n" .
          "      <SELECT NAME=\"event_length\">\n";
     select_option_length("0");
     echo "      </SELECT>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Priority:") . "</TD>\n".
-         "      <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+         "      </td></tr>\n".
+         html_tag( 'tr' ) .
+         html_tag( 'td', _("Priority:"), 'right', $color[4] ) . "\n" .
+         html_tag( 'td', '', 'left', $color[4] ) . "\n" .
          "      <SELECT NAME=\"event_priority\">\n";
     select_option_priority("0");
     echo "      </SELECT>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Title:") . "</TD>\n".
-         "      <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+         "      </td></tr>\n".
+         html_tag( 'tr' ) .
+         html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" .
+         html_tag( 'td', '', 'left', $color[4] ) . "\n" .
          "      <INPUT TYPE=text NAME=\"event_title\" VALUE=\"\" SIZE=30 MAXLENGTH=50><BR>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=LEFT COLSPAN=2>\n".
-         "      <TEXTAREA NAME=\"event_text\" ROWS=5 COLS=\"$editor_size\" WRAP=HARD></TEXTAREA>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD ALIGN=LEFT BGCOLOR=\"$color[4]\" COLSPAN=2><INPUT TYPE=SUBMIT NAME=send VALUE=\"" .
-         _("Set Event") . "\"></TD></TR>\n";
+         "      </td></tr>\n".
+         html_tag( 'tr',
+             html_tag( 'td',
+                 "<TEXTAREA NAME=\"event_text\" ROWS=5 COLS=\"$editor_size\" WRAP=HARD></TEXTAREA>" ,
+             'left', $color[4], 'colspan="2"' )
+         ) ."\n" .
+         html_tag( 'tr',
+             html_tag( 'td',
+                 "<INPUT TYPE=SUBMIT NAME=send VALUE=\"" .
+                 _("Set Event") . "\">" ,
+             'left', $color[4], 'colspan="2"' )
+         ) ."\n";
     echo "</FORM>\n";
 }
 
@@ -83,12 +94,12 @@ displayPageHeader($color, 'None');
 //load calendar menu
 calendar_header();
 
-
-echo "<TR BGCOLOR=\"$color[0]\"><TD>" .
-     "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">" .
-     '<tr><td COLSPAN=2>' .
-     date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) .
-     '</td></tr>';
+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 "  <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">\n".
-         "    <TR><TH COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
-         _("Event Has been added!") . "<br>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Date:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$month/$day/$year</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Time:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_hour:$event_minute</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Title:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_title</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Message:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_text</TD></TR>\n".
-         "    <TR><TD COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
-         "<A HREF=\"day.php?year=$year&month=$month&day=$day\">" . _("Day View") . "</A>\n".
-         "    </TD></TR>\n".
-         "  </TABLE>\n";
+    echo html_tag( 'table',
+                html_tag( 'tr',
+                    html_tag( 'th', _("Event Has been added!") . "<br>\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',
+                        "<a href=\"day.php?year=$year&month=$month&day=$day\">" . _("Day View") . "</a>\n" ,
+                    'left', $color[4], 'colspan="2"' ) . "\n"
+                ) ,
+            '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n";
 }
 
 ?>
index 7ad4eaaa0fd4b6c656e987e6f325757eba2095f5..189ff2355a7e70292bfa5c26a6f82852728cfc79 100644 (file)
@@ -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 "  <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">\n".
-         "    <TR><TH COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
-         _("Do you really want to delete this event?") . "<br></th>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Date:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$dmonth/$dday/$dyear</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Time:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$dhour:$dminute</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Title:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[title]</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Message:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[message]</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">\n".
-         "    <FORM NAME=\"delevent\" METHOD=POST ACTION=\"$calself\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"dyear\" VALUE=\"$dyear\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"dmonth\" VALUE=\"$dmonth\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"dday\" VALUE=\"$dday\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"dhour\" VALUE=\"$dhour\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"dminute\" VALUE=\"$dminute\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"confirmed\" VALUE=\"yes\">\n".
-         '       <INPUT TYPE=SUBMIT VALUE="' . _("Yes") . "\">\n".
-         "    </FORM>\n".
-         "    </TD><TD ALIGN=LEFT BGCOLOR=\"$color[4]\">\n".
-         "    <FORM NAME=\"nodelevent\" METHOD=POST ACTION=\"day.php\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
-         '       <INPUT TYPE=SUBMIT VALUE="' . _("No") . "\">\n".
-         "    </FORM>\n".
-         "    </TD></TR>\n".
-         "  </TABLE>\n";
-
-
+    echo html_tag( 'table',
+               html_tag( 'tr',
+                   html_tag( 'th', _("Do you really want to delete this event?") . '<br>', '', $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',
+                       "    <FORM NAME=\"delevent\" METHOD=POST ACTION=\"$calself\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"dyear\" VALUE=\"$dyear\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"dmonth\" VALUE=\"$dmonth\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"dday\" VALUE=\"$dday\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"dhour\" VALUE=\"$dhour\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"dminute\" VALUE=\"$dminute\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"confirmed\" VALUE=\"yes\">\n".
+                       '       <INPUT TYPE=SUBMIT VALUE="' . _("Yes") . "\">\n".
+                       "    </FORM>\n" ,
+                   'right', $color[4] ) .
+                   html_tag( 'td',
+                       "    <FORM NAME=\"nodelevent\" METHOD=POST ACTION=\"day.php\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
+                       "       <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
+                       '       <INPUT TYPE=SUBMIT VALUE="' . _("No") . "\">\n".
+                       "    </FORM>\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 "<TR BGCOLOR=\"$color[0]\"><TD>".
-     "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">".
-     '<tr><td>'.
+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 '<br><br>' . _("Event deleted!") . "<BR>\n";
-        echo "<A HREF=\"day.php?year=$year&month=$month&day=$day\">" .
-          _("Day View") . "</A>\n";
+        echo '<br><br>' . _("Event deleted!") . "<br>\n";
+        echo "<a href=\"day.php?year=$year&month=$month&day=$day\">" .
+          _("Day View") . "</a>\n";
     } else {
         readcalendardata();
         confirm_deletion();
index 8c8fdfa42ba0e7b98f0092ec3976562fbdd22044..f547c0ab46410a25d5b16c3fbbd789a72f20f88d 100644 (file)
@@ -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() {
          "      <INPUT TYPE=hidden NAME=\"hour\" VALUE=\"$hour\">\n".
          "      <INPUT TYPE=hidden NAME=\"minute\" VALUE=\"$minute\">\n".
          "      <INPUT TYPE=hidden NAME=\"updated\" VALUE=\"yes\">\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Date:") . "</TD>\n".
-         "      <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+         html_tag( 'tr' ) .
+         html_tag( 'td', _("Date:"), 'right', $color[4] ) . "\n" .
+         html_tag( 'td', '', 'left', $color[4] ) .
          "      <SELECT NAME=\"event_year\">\n";
     select_option_year($year);
     echo "      </SELECT>\n" .
@@ -45,9 +47,10 @@ function show_event_form() {
          "      <SELECT NAME=\"event_day\">\n";
     select_option_day($day);
     echo "      </SELECT>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Time:") . "</TD>\n".
-         "      <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+         "      </td></tr>\n".
+         html_tag( 'tr' ) .
+         html_tag( 'td', _("Time:"), 'right', $color[4] ) . "\n" .
+         html_tag( 'td', '', 'left', $color[4] ) .
          "      <SELECT NAME=\"event_hour\">\n";
     select_option_hour($hour);
     echo "      </SELECT>\n".
@@ -55,29 +58,35 @@ function show_event_form() {
          "      <SELECT NAME=\"event_minute\">\n";
     select_option_minute($minute);
     echo "      </SELECT>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Length:") . "</TD>\n".
-         "      <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+         "      </td></tr>\n".
+         html_tag( 'tr' ) .
+         html_tag( 'td', _("Length:"), 'right', $color[4] ) . "\n" .
+         html_tag( 'td', '', 'left', $color[4] ) .
          "      <SELECT NAME=\"event_length\">\n";
     select_option_length($tmparray[length]);
     echo "      </SELECT>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Priority:") . "</TD>\n".
-         "      <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+         "      </td></tr>\n".
+         html_tag( 'tr' ) .
+         html_tag( 'td', _("Priority:"), 'right', $color[4] ) . "\n" .
+         html_tag( 'td', '', 'left', $color[4] ) .
          "      <SELECT NAME=\"event_priority\">\n";
     select_option_priority($tmparray[priority]);
     echo "      </SELECT>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Title:") . "</TD>\n".
-         "      <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+         "      </td></tr>\n".
+         html_tag( 'tr' ) .
+         html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" .
+         html_tag( 'td', '', 'left', $color[4] ) .
          "      <INPUT TYPE=text NAME=\"event_title\" VALUE=\"$tmparray[title]\" SIZE=30 MAXLENGTH=50><BR>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD BGCOLOR=\"$color[4]\" ALIGN=LEFT COLSPAN=2>\n".
-         "      <TEXTAREA NAME=\"event_text\" ROWS=5 COLS=\"$editor_size\" WRAP=HARD>$tmparray[message]</TEXTAREA>\n".
-         "      </TD></TR>\n".
-         "      <TR><TD ALIGN=LEFT BGCOLOR=\"$color[4]\" COLSPAN=2><INPUT TYPE=SUBMIT NAME=send VALUE=\"" .
-         _("Update Event") . "\"></TD></TR>\n".
-         "</FORM>\n";
+         "      </td></tr>\n".
+         html_tag( 'td',
+             "      <TEXTAREA NAME=\"event_text\" ROWS=5 COLS=\"$editor_size\" WRAP=HARD>$tmparray[message]</TEXTAREA>\n" ,
+         'left', $color[4], 'colspan="2"' ) .
+         '</tr>' . html_tag( 'tr' ) .
+         html_tag( 'td',
+             "<INPUT TYPE=SUBMIT NAME=send VALUE=\"" .
+             _("Update Event") . "\">\n" ,
+         'left', $color[4], 'colspan="2"' ) .
+         "</tr></FORM>\n";
 }
 
 // self explenatory
@@ -86,63 +95,86 @@ function confirm_update() {
 
     $tmparray = $calendardata["$month$day$year"]["$hour$minute"];
 
-    echo "  <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">\n".
-         "    <TR><TH COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
-         _("Do you really want to change this event from:") . "<br>\n".
-         "    </TH></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Date:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$month/$day/$year</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Time:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$hour:$minute</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Priority:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[priority]</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Title:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[title]</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Message:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[message]</TD></TR>\n".
-         "    <TR><TH COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
-         _("to:") . "<br>\n".
-         "    </TH></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Date:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_month/$event_day/$event_year</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . ("Time:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_hour:$event_minute</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Priority:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_priority</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Title:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_title</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Message:") . "</TD>\n".
-         "    <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_text</TD></TR>\n".
-         "    <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">\n".
-         "    <FORM NAME=\"updateevent\" METHOD=POST ACTION=\"$calself\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"hour\" VALUE=\"$hour\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"minute\" VALUE=\"$minute\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"event_year\" VALUE=\"$event_year\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"event_month\" VALUE=\"$event_month\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"event_day\" VALUE=\"$event_day\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"event_hour\" VALUE=\"$event_hour\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"event_minute\" VALUE=\"$event_minute\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"event_priority\" VALUE=\"$event_priority\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"event_length\" VALUE=\"$event_length\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"event_title\" VALUE=\"$event_title\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"event_text\" VALUE=\"$event_text\">\n".
-         "       <INPUT TYPE=hidden NAME=\"updated\" VALUE=\"yes\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"confirmed\" VALUE=\"yes\">\n".
-         '       <INPUT TYPE=SUBMIT VALUE="' . _("Yes") . "\">\n".
-         "    </FORM>\n".
-         "    </TD><TD ALIGN=LEFT BGCOLOR=\"$color[4]\">\n".
-         "    <FORM NAME=\"nodelevent\" METHOD=POST ACTION=\"day.php\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
-         "       <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
-         '       <INPUT TYPE=SUBMIT VALUE="' . _("No") . "\">\n".
-         "    </FORM>\n".
-         "    </TD></TR>\n".
-         "  </TABLE>\n";
+    echo html_tag( 'table',
+                html_tag( 'tr',
+                    html_tag( 'th', _("Do you really want to change this event from:") . "<br>\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:") . "<br>\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',
+                        "    <FORM NAME=\"updateevent\" METHOD=POST ACTION=\"$calself\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"hour\" VALUE=\"$hour\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"minute\" VALUE=\"$minute\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"event_year\" VALUE=\"$event_year\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"event_month\" VALUE=\"$event_month\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"event_day\" VALUE=\"$event_day\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"event_hour\" VALUE=\"$event_hour\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"event_minute\" VALUE=\"$event_minute\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"event_priority\" VALUE=\"$event_priority\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"event_length\" VALUE=\"$event_length\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"event_title\" VALUE=\"$event_title\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"event_text\" VALUE=\"$event_text\">\n".
+                        "       <INPUT TYPE=hidden NAME=\"updated\" VALUE=\"yes\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"confirmed\" VALUE=\"yes\">\n".
+                        '       <INPUT TYPE=SUBMIT VALUE="' . _("Yes") . "\">\n".
+                        "    </FORM>\n" ,
+                    'right', $color[4] ) ."\n" .
+                    html_tag( 'td',
+                        "    <FORM NAME=\"nodelevent\" METHOD=POST ACTION=\"day.php\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
+                        "       <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
+                        '       <INPUT TYPE=SUBMIT VALUE="' . _("No") . "\">\n".
+                        "    </FORM>\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 "<TR BGCOLOR=\"$color[0]\"><TD>" .
-     "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">" .
-     '<tr><td COLSPAN=2>' .
-     date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) .
-     '</td></tr>';
+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 "<tr><td>" . _("Event updated!") . "</td></tr>\n";
-        echo "<tr><td><A HREF=\"day.php?year=$year&month=$month&day=$day\">" . 
-        _("Day View") ."</A></td></tr>\n";
+        echo html_tag( 'tr',
+                   html_tag( 'td', _("Event updated!"), 'left' )
+                ) . "\n";
+        echo html_tag( 'tr',
+                   html_tag( 'td',
+                       "<a href=\"day.php?year=$year&month=$month&day=$day\">" . 
+                       _("Day View") ."</a>",
+                   '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){
index 570c3126938b5216ddb4c4e401841bec5d89ec5b..be12a0d7290e1f797fa529d448ed2f17c7135690 100644 (file)
@@ -15,8 +15,9 @@ function calendar_header() {
     //Add Second layer ofCalendar links to upper menu
     global $color,$year,$day,$month;
 
-    echo "<TABLE BGCOLOR=\"$color[0]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>".
-         "<TR><TD ALIGN=left WIDTH=\"100%\">";
+    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 "&nbsp;&nbsp\n";
@@ -24,7 +25,7 @@ function calendar_header() {
     echo "&nbsp;&nbsp\n";
     // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right");
     // echo "&nbsp;&nbsp\n";
-    echo '</TD></TR>';
+    echo '</td></tr>';
 
 }
 
index 77a62fb3c1295737e25289bdc78c47db9eddcd82..a611d53a18d117e5047abc24721747da62741122 100644 (file)
    $filters_user_scan = getPref($data_dir, $username, 'filters_user_scan');
 
    echo '<br>' .
-        '<table width=95% align=center border=0 cellpadding=2 cellspacing=0>'.
-        "<tr><td bgcolor=\"$color[0]\">".
-        '<center><b>' . _("Options") . ' -  ' . _("Message Filtering") . '</b></center>'.
-        '</td></tr></table>'.
+        html_tag( 'table',
+            html_tag( 'tr',
+                html_tag( 'td',
+                    '<center><b>' . _("Options") . ' -  ' . _("Message Filtering") . '</b></center>' ,
+                'left', $color[0] )
+            ) ,
+         'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) .
 
         '<br><form method=post action="options.php">'.
         '<center>'.
-        '<table cellpadding=2 cellspacing=0 border=0>'.
-        '<tr>'.
-            '<th align=right nowrap>' . _("What to Scan:") . '</th>'.
-            '<td><select name="filters_user_scan_set">'.
+        html_tag( 'table', '', '', '', 'border="0" cellpadding="2" cellspacing="0"' )
+            html_tag( 'tr' ) .
+                html_tag( 'th', _("What to Scan:"), 'right', '', 'nowrap' ) .
+                html_tag( 'td', '', 'left' ) .
+            '<select name="filters_user_scan_set">'.
             '<option value=""';
     if ($filters_user_scan == '') {
-        echo ' SELECTED';
+        echo ' selected';
     }
     echo '>' . _("All messages") . '</option>'.
             '<option value="new"';
     if ($filters_user_scan == 'new') {
-        echo ' SELECTED';
+        echo ' selected';
     }
     echo '>' . _("Only unread messages") . '</option>' .
             '</select>'.
         '</td>'.
-        '<td><input type=submit name="user_submit" value="' . _("Save") . '"></td></tr>'.
+        html_tag( 'td', '<input type=submit name="user_submit" value="' . _("Save") . '">', 'left' ) .
         '</table>'.
         '</center>'.
         '</form>'.
 
-        '<center>[<a href="options.php?action=add">' . _("New") .
-        '</a>] - [<a href="../../src/options.php">' . _("Done") . '</a>]</center><br>';
+        html_tag( 'div', '[<a href="options.php?action=add">' . _("New") .
+            '</a>] - [<a href="../../src/options.php">' . _("Done") . '</a>]' ,
+        'center' ) . '<br>';
 
     if (isset($action) && ($action == 'add' || $action == 'edit')) {
         $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
         if ( !isset($theid) ) {
             $theid = count($filters);
         }
-        echo '<center>'.
+        echo html_tag( 'div', '', 'center' ) .
              '<form action="options.php" method=post>'.
-             '<table cellpadding=2 cellspacing=0 border=0>'.
-             '<tr>'.
-                '<td>' . _("Match:") . '</td>'.
-                '<td>'.
+             html_tag( 'table', '', '', '', 'border="0" cellpadding="2" cellspacing="0"' )
+             html_tag( 'tr' ) .
+                html_tag( 'td', _("Match:"), 'left' ) .
+                html_tag( 'td', '', 'left' ) .
                     '<select name=filter_where>';
 
         $L = isset($filters[$theid]['where']);
         echo         '</select>'.
                 '</td>'.
             '</tr>'.
-            '<tr>'.
-                '<td align=right>'.
-                    _("Contains:").
-                '</td>'.
-                '<td>'.
+            html_tag( 'tr' ) .
+                html_tag( 'td', _("Contains:"), 'right' ) .
+                html_tag( 'td', '', 'left' ) .
                     '<input type=text size=32 name=filter_what value="';
         if (isset($filters[$theid]['what'])) {
             echo $filters[$theid]["what"];
         echo '">'.
                 '</td>'.
             '</tr>'.
-            '<tr>'.
-                '<td>'.
-                    _("Move to:").
-                '</td>'.
-                '<td>'.
+            html_tag( 'tr' ) .
+                html_tag( 'td', _("Move to:"), 'left' ) .
+                html_tag( 'td', '', 'left' ) .
                     '<tt>'.
                     '<select name=filter_folder>';
 
             '<input type=submit name=filter_submit value=' . _("Submit") . '>'.
             "<input type=hidden name=theid value=$theid>".
             '</form>'.
-            '</center>';
+            '</div>';
 
     }
 
-       echo '<table border=0 cellpadding=3 cellspacing=0 align=center>';
+       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 "<tr bgcolor=\"$clr\"><td><small>".
-            "[<a href=\"options.php?theid=$i&action=edit\">" . _("Edit") . '</a>]'.
-            '</small></td><td><small>'.
-            "[<a href=\"options.php?theid=$i&action=delete\">" . _("Delete") . '</a>]'.
-            '</small></td><td align=center><small>[';
+        echo html_tag( 'tr', '', $clr ) .
+                   html_tag( 'td',
+                       '<small>' .
+                       "[<a href=\"options.php?theid=$i&action=edit\">" . _("Edit") . '</a>]'.
+                       '</small>' ,
+                   'left' ) .
+                   html_tag( 'td',
+                       '<small>' .
+                       "[<a href=\"options.php?theid=$i&action=delete\">" . _("Delete") . '</a>]'.
+                       '</small>' ,
+                   'left' ) .
+                   html_tag( 'td', '', 'center' ) . '<small>[';
 
         if (isset($filters[$i + 1])) {
             echo "<a href=\"options.php?theid=$i&action=move_down\">" . _("Down") . '</a>';
         if ($i > 0) {
             echo "<a href=\"options.php?theid=$i&action=move_up\">" . _("Up") . '</a>';
         }
-        echo ']</small></td><td>-</td><td>';
+        echo ']</small></td>'.
+            html_tag( 'td', '-', 'left' ) .
+            html_tag( 'td', '', 'left' );
         printf( _("If <b>%s</b> contains <b>%s</b> then move to <b>%s</b>"), _($filters[$i]['where']), $filters[$i]['what'], $fdr );
         echo '</td></tr>';
 
     }
     echo '</table>'.
-        '<table width=80% align=center border=0 cellpadding=2 cellspacing=0">'.
-            '<tr><td>&nbsp</td></tr>'.
-        '</table>';
-
+        html_tag( 'table',
+            html_tag( 'tr',
+                html_tag( 'td', '&nbsp', 'left' )
+            ) ,
+        'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
 ?>
index b0a179ed989542c0146ff53c48529d1621106d48..40e8326fda4df48df9abac9f84c90c25ab5626eb 100644 (file)
@@ -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 "<table width=95% align=center border=0 cellpadding=2 cellspacing=0 bgcolor=\"$color[0]\">".
-        '<tr><th align=center>' . _("Spam Filtering") . '</th></tr>'.
-    '</table>';
+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 '<BR><center><b>' .
-        _("WARNING! Tell your admin to set the SpamFilters_YourHop variable") .
-        '</b></center><BR>';
+    echo '<br>' .
+        html_tag( 'div', '<b>' .
+            _("WARNING! Tell your admin to set the SpamFilters_YourHop variable") .
+            '</b>' ,
+        'center' ) .
+        '<br>';
 }
 
 
@@ -79,10 +85,11 @@ if (isset($action) && $action == 'spam') {
 
     echo '<form method=post action="spamoptions.php">'.
         '<center>'.
-        '<table width=85% cellpadding=2 cellspacing=0 border=0>'.
-            '<tr>'.
-            '<th align=right nowrap>' . _("Move spam to:") . '</th>'.
-            '<td><select name="filters_spam_folder_set">';
+        html_tag( 'table', '', '', '', 'width="85%" border="0" cellpadding="2" cellspacing="0"' ) .
+            html_tag( 'tr' ) .
+                html_tag( 'th', _("Move spam to:"), 'right', '', 'nowrap' ) .
+                html_tag( 'td', '', 'left' ) .
+                    '<select name="filters_spam_folder_set">';
 
     for ($i = 0; $i < count($boxes); $i++) {
         if (! in_array('noselect', $boxes[$i]['flags'])) {
@@ -98,12 +105,16 @@ if (isset($action) && $action == 'spam') {
     echo    '</select>'.
         '</td>'.
         '</tr>'.
-        '<tr><td></td><td>' .
-        _("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.") .
-        '</td></tr>'.
-        '<tr>'.
-            '<th align=right nowrap>' . _("What to Scan:") . '</th>'.
-            '<td><select name="filters_spam_scan_set">'.
+        html_tag( 'tr',
+            html_tag( 'td', '&nbsp;' ) .
+            html_tag( 'td',
+                _("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.") ,
+            'left' )
+        ) .
+        html_tag( 'tr' ) .
+            html_tag( 'th', _("What to Scan:"), 'right', '', 'nowrap' ) .
+            html_tag( 'td' ) .
+            '<select name="filters_spam_scan_set">'.
             '<option value=""';
     if ($filters_spam_scan == '') {
         echo ' SELECTED';
@@ -117,16 +128,20 @@ if (isset($action) && $action == 'spam') {
             '</select>'.
         '</td>'.
     '</tr>'.
-    '<tr>'.
-        '<td></td><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.").
-        '</td></tr>';
+    html_tag( 'tr',
+          html_tag( 'td', '&nbsp;' ) .
+          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 "<tr><th align=right nowrap>$Key</th>\n" .
-            '<td><input type=checkbox name="' .
+        echo html_tag( 'tr' ) .
+                   html_tag( 'th', $Key, 'right', '', 'nowrap' ) ."\n" .
+                   html_tag( 'td' ) .
+            '<input type=checkbox name="' .
             $spam_filters[$Key]['prefname'] .
             '_set"';
         if ($spam_filters[$Key]['enabled']) {
@@ -142,11 +157,16 @@ if (isset($action) && $action == 'spam') {
         if ($spam_filters[$Key]['link']) {
             echo '</a>';
         }
-        echo '</td></tr><tr><td></td><td>' .
-            $spam_filters[$Key]['comment'] .
-            "</td></tr>\n";
+        echo '</td></tr>' .
+        html_tag( 'tr',
+            html_tag( 'td', '&nbsp;' ) .
+            html_tag( 'td', $spam_filters[$Key]['comment'], 'left' )
+        ) . "\n";
+
     }
-    echo '<tr><td colspan=2 align=center><input type=submit name="spam_submit" value="' . _("Save") . '"></td></tr>'.
+    echo html_tag( 'tr',
+        html_tag( 'td', '<input type=submit name="spam_submit" value="' . _("Save") . '">', 'center', '', 'colspan="2"' )
+    ) . "\n" .
         '</table>'.
         '</center>'.
         '</form>';
@@ -155,7 +175,8 @@ if (isset($action) && $action == 'spam') {
 
 if (! isset($action) || $action != 'spam') {
 
-    echo '<p align=center>[<a href="spamoptions.php?action=spam">' . _("Edit") . '</a>]' .
+    echo html_tag( 'p', '', 'center' ) .
+         '[<a href="spamoptions.php?action=spam">' . _("Edit") . '</a>]' .
          ' - [<a href="../../src/options.php">' . _("Done") . '</a>]</center><br><br>';
     printf( _("Spam is sent to <b>%s</b>"), ($filters_spam_folder?$filters_spam_folder:_("[<i>not set yet</i>]") ) );
     echo '<br>';
@@ -166,7 +187,8 @@ if (! isset($action) || $action != 'spam') {
     $spam_filters = load_spam_filters();
 
     foreach ($spam_filters as $Key => $Value) {
-        echo '<tr><th align=center>';
+        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 '</th><td>&nbsp;-&nbsp;</td><td>';
+        echo '</th>' . 
+               html_tag( 'td', '&nbsp;-&nbsp;', 'left' ) .
+               html_tag( 'td', '', 'left' );
 
         if ($spam_filters[$Key]['link']) {
         echo '<a href="' .