Browse Source

*** empty log message ***

stakadush 23 years ago
parent
commit
76a77d0d1c

+ 2 - 2
functions/mailbox_display.php

@@ -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: <b>%s</b> to <b>%s</b> (%s total)"),
+        $result = sprintf(_("Viewing Messages: <B>%s</B> to <B>%s</B> (%s total)"),
         $start_msg, $end_msg, $num_msgs);
     } else if ($start_msg == $end_msg) {
-        $result = sprintf(_("Viewing Message: <b>%s</b> (1 total)"), $start_msg);
+        $result = sprintf(_("Viewing Message: <B>%s</B> (1 total)"), $start_msg);
     } else {
         $result = '<br>';
     }

+ 36 - 25
locale/he_HE/LC_MESSAGES/squirrelmail.po

@@ -2098,6 +2098,7 @@ msgstr "
 #: squirrelmail/plugins/filters/filters.php:603
 msgid ""
 "FREE - Osirusoft Relays - Osirusofts list of verified open relays. Seems to "
+"include servers used by abuse@uunet.net auto-replies too."
 msgstr "çéðí - øùåîåú ùì ùøúé ãåàø äôúåçéí ìëåìí, åáëê îàôùøéí ùìéçú ãåàø "
 "àì÷èøåðé ãøëí ìëì àçã (Osirusoft)."
 
@@ -2795,7 +2796,7 @@ msgstr "
 #: squirrelmail/plugins/calendar/calendar.php:113
 #: squirrelmail/plugins/squirrelspell/modules/init.mod:53
 msgid "Go"
-msgstr "÷ãéîä"
+msgstr "ìê"
 
 #: squirrelmail/plugins/squirrelspell/modules/init.mod:57
 msgid "SquirrelSpell Initiating"
@@ -3223,19 +3224,22 @@ msgid ""
 "Select <b>Enable Media Playing</b> to turn on playing a media file when "
 "unseen mail is in your folders. When enabled, you can specify the media file "
 "to play in the provided file box."
-msgstr ""
+msgstr "áëãé ìäôòéì ðéâåï ÷åáõ îãéä ëàùø éù ãåàø çãù áçø áàôùøåú "
+"<b>àôùø ðéâåï îãéä</b>. áéëåìúê ìöééï àú ÷åáõ äîãéä ùéðåâï."
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:45
 msgid ""
 "The <b>Check all boxes, not just INBOX</b> option will check ALL of your "
 "folders for unseen mail, not just the inbox for notification."
-msgstr ""
+msgstr "áëãé ìáãå÷ ãåàø çãù áëì äúé÷éåú åìà ø÷ áúéáú äãåàø äðëðñ, ñîï àú äàôùøåú "
+"<b>áãå÷ àú ëì äúé÷éåú, ìà ø÷ àú úéáú äãåàø äðëðñ</b>."
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:47
 msgid ""
 "Selecting the <b>Show popup</b> option will enable the showing of a popup "
 "window when unseen mail is in your folders (requires JavaScript)."
-msgstr ""
+msgstr "àí áøöåðê ùéôúç çìåï ÷èï äîåãéò òì äåãòåú çãùåú áçø áàôùøåú "
+"<b>ëùéù äåãòåú çãùåú äöâ çìåï ÷èï</b> (îöøéê JavaScript)"
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:49
 msgid ""
@@ -3243,7 +3247,9 @@ msgid ""
 "Recent messages are those that have just recently showed up and have not "
 "been \"viewed\" or checked yet.  This can prevent being continuously annoyed "
 "by sounds or popups for unseen mail."
-msgstr ""
+msgstr "áçø áàôùøåú <b>ñôåø ø÷ äåãòåú ùäâéòå ìàçøåðä</b> áëãé ìáãå÷ ø÷ äåãòåú ùäâéòå ìàçøåðä. "
+"äåãòåú àùø äâéòå ìàçøåðä äï äåãòåú àùø äâéòå ìôðé æîï ÷öø àê ìà ð÷øàå àå ñåîðå òãééï. "
+"àôùøåú æå îåðòú äèøãä øöåôä ùì öìéìéí åçìåðåú àùø ðôúçéí áâìì ãåàø ùìà ð÷øà."
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:51
 msgid ""
@@ -3252,7 +3258,10 @@ msgid ""
 "only works in IE but you won't see errors with other browsers).  This will "
 "always tell you if you have new mail, even if you have <b>Check RECENT</b> "
 "enabled."
-msgstr ""
+msgstr "äàôùøåú <b>ùðä ëåúøú áãôãôðéí ðúîëéí</b> úùðä àú ëåúøú äçìåï ùì äãôãôï "
+"ëàùø îâéò ãåàø çãù (àôùøåú æå îöøéëä JavaScript åãôãôï àéðèøðè à÷ñôìåøø, àê ìà "
+"éåôéòå äåãòåú ùâéàä áãôãôðéí àçøéí). àôùøåú æå úåãéò úîéã òì ãåàø çãù, àôéìå àí ñåîðä "
+"äàôùøåú <b>ñôåø ø÷ äåãòåú ùäâéòå ìàçøåðä</b>."
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:55
 msgid ""
@@ -3260,7 +3269,9 @@ msgid ""
 "mail arrives.  Selecting <b>local media</b> will play the file specified in "
 "the <b>local media file</b> box to play from the local computer.  If no file "
 "is specified, the system will use a default from the server."
-msgstr ""
+msgstr "áçø îäøùéîä ùì <b>÷áöé äùøú</b> àú ÷åáõ äîãéä ùáøöåðê ùéðâï "
+"ëàùø îâéò ãåàø çãù. áçéøú äàôùøåú <b>÷åáõ îãéä î÷åîé</b> éðâï àú ä÷åáõ "
+"àùø éáçø îäîçùá ùìê. àí ìà ðáçø ùåí ÷åáõ äîòøëú úùúîù á÷åáõ áøéøú äîçãì."
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:67
 msgid "Enable Media Playing"
@@ -3293,7 +3304,7 @@ msgstr "
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:106
 msgid "(local media)"
-msgstr "(îãééä î÷åîéú)"
+msgstr "(îãéä î÷åîéú)"
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:123
 msgid "Try"
@@ -3301,7 +3312,7 @@ msgstr "
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:131
 msgid "Local Media File:"
-msgstr "÷åáõ îãééä î÷åîé:"
+msgstr "÷åáõ îãéä î÷åîé:"
 
 #: squirrelmail/plugins/newmail/newmail_opt.php:137
 msgid "Current File:"
@@ -3327,7 +3338,7 @@ msgstr "
 msgid ""
 "This configures settings for playing sounds and/or showing popup windows "
 "when new mail arrives."
-msgstr "áàôùøåúê ìäâãéø ðéâðåï öìéìéí àå/å ôúéçú çìåï ÷èï áî÷øä "
+msgstr "áàôùøåúê ìäâãéø ðéâðåï öìéìéí å\\àå ôúéçú çìåï ÷èï áî÷øä "
 "ùîâéò ãåàø çãù."
 
 #: squirrelmail/plugins/newmail/setup.php:129
@@ -3534,7 +3545,7 @@ msgstr "
 
 #: squirrelmail/plugins/mail_fetch/fetch.php:54
 msgid "Remote POP server Fetching Mail"
-msgstr "îáéà ãåàø îùøú POP3 îøåç÷"
+msgstr "îåùê ãåàø îùøú POP3 îøåç÷"
 
 #: squirrelmail/plugins/mail_fetch/fetch.php:63
 msgid "Select Server:"
@@ -3550,11 +3561,11 @@ msgstr "
 
 #: squirrelmail/plugins/mail_fetch/fetch.php:85
 msgid "Fetch Mail"
-msgstr "îáéà ãåàø"
+msgstr "îùåê ãåàø"
 
 #: squirrelmail/plugins/mail_fetch/fetch.php:117
 msgid "Fetching from "
-msgstr "îáéà î-"
+msgstr "îåùê î-"
 
 #: squirrelmail/plugins/mail_fetch/fetch.php:124
 #: squirrelmail/plugins/mail_fetch/fetch.php:184
@@ -3592,7 +3603,7 @@ msgstr "] 
 
 #: squirrelmail/plugins/mail_fetch/fetch.php:164
 msgid "Fetching UIDL..."
-msgstr "îáéà UIDL..."
+msgstr "îåùê UIDL..."
 
 #: squirrelmail/plugins/mail_fetch/fetch.php:169
 #: squirrelmail/plugins/mail_fetch/setup.php:154
@@ -3609,7 +3620,7 @@ msgstr "
 
 #: squirrelmail/plugins/mail_fetch/fetch.php:178
 msgid "Fetching message "
-msgstr "îáéà äåãòä "
+msgstr "îåùê äåãòä "
 
 #: squirrelmail/plugins/mail_fetch/fetch.php:201
 msgid "Message appended to mailbox"
@@ -3665,7 +3676,7 @@ msgstr "
 
 #: squirrelmail/plugins/mail_fetch/options.php:113
 msgid "Encrypt passwords (informative only)"
-msgstr ""
+msgstr "äöôï ñéñîàåú (àéðôåøîèéáé áìáã)"
 
 #: squirrelmail/plugins/mail_fetch/options.php:119
 #: squirrelmail/plugins/mail_fetch/options.php:146
@@ -3723,13 +3734,13 @@ msgstr "
 
 #: squirrelmail/plugins/mail_fetch/options.php:166
 msgid "No-one server in use. Try to add."
-msgstr "ùøú àó-àçã ðîöà áùéîåù. ðñä ìäåñéó."
+msgstr "ìà ðîöà àó ùøú àçã áùéîåù. ðñä ìäåñéó."
 
 #: squirrelmail/plugins/mail_fetch/options.php:172
 #: squirrelmail/plugins/mail_fetch/options.php:187
 #: squirrelmail/plugins/mail_fetch/options.php:234
 msgid "Fetching Servers"
-msgstr "îáéà ùøúéí"
+msgstr "îåùê ùøúéí"
 
 #: squirrelmail/plugins/mail_fetch/options.php:176
 msgid "Confirm Deletion of a Server"
@@ -3761,7 +3772,7 @@ msgstr ""
 
 #: squirrelmail/plugins/mail_fetch/setup.php:30
 msgid "Fetch"
-msgstr "äáà"
+msgstr "îùåê"
 
 #: squirrelmail/plugins/mail_fetch/setup.php:115
 #: squirrelmail/plugins/mail_fetch/setup.php:162
@@ -3770,11 +3781,11 @@ msgstr "
 
 #: squirrelmail/plugins/mail_fetch/setup.php:198
 msgid "Mail Fetch Result:"
-msgstr "úåöàú ðéñéåï ìäáéà ãåàø:"
+msgstr "úåöàú ðéñéåï îùéëú ãåàø:"
 
 #: squirrelmail/plugins/mail_fetch/setup.php:223
 msgid "Simple POP3 Fetch Mail"
-msgstr "äáàú ãåàø î-POP3"
+msgstr "îùéëú ãåàø î-POP3"
 
 #: squirrelmail/plugins/mail_fetch/setup.php:225
 msgid ""
@@ -3974,15 +3985,15 @@ msgstr "
 msgid ""
 "This will send a message to %s requesting help for this list. You will "
 "receive an emailed response at the address below."
-msgstr "æä éùìç äåãòä ì-%s áá÷ùä ìòæøä òí øùéîä æå. àúä ú÷áì "
-"úùåáä ìëúåáú ãåà\"ì äøùåîä îèä."
+msgstr "àôùøåú æå úùìç äåãòä ì-%s áá÷ùä ìòæøä òí øùéîä æå. úùåáä úùìç "
+"ìëúåáú äãåà\"ì äøùåîä îèä."
 
 #: squirrelmail/plugins/listcommands/mailout.php:28
 #, c-format
 msgid ""
 "This will send a message to %s requesting that you will be subscribed to "
 "this list. You will be subscribed with the address below."
-msgstr "æä éùìç äåãòä ì-%s áá÷ùä ìöøó àåúê ìøùéîä æå. ëúåáú äãåà\"ì äøùåîä "
+msgstr "àôùøåú æå úùìç äåãòä ì-%s áá÷ùä ìöøó àåúê ìøùéîä æå. ëúåáú äãåà\"ì äøùåîä "
 "îèä úöåøó ìøùéîä."
 
 #: squirrelmail/plugins/listcommands/mailout.php:31
@@ -3990,7 +4001,7 @@ msgstr "
 msgid ""
 "This will send a message to %s requesting that you will be unsubscribed from "
 "this list. It will try to unsubscribe the adress below."
-msgstr "æä éùìç äåãòä ì-%s áá÷ùä ìáéèåì ääøùîä ìøùéîä æå. ääøùîä úáåèì "
+msgstr "àôùøåú æå úùìç äåãòä ì-%s áá÷ùä ìáéèåì ääøùîä ìøùéîä æå. ääøùîä úáåèì "
 "ìëúåáú äøùåîä îèä."
 
 #: squirrelmail/plugins/listcommands/mailout.php:79

+ 36 - 41
plugins/abook_take/setup.php

@@ -72,21 +72,14 @@ function abook_take_read()
   if ($abook_take_hide)
     return;
     
-  ?>
-  <FORM ACTION="../plugins/abook_take/take.php" METHOD=POST>
-  <table align="<?PHP 
-      echo $abook_take_location;
-  ?>" cellpadding=3 cellspacing=0 border=0 bgcolor="<?PHP 
-      echo $color[10] 
-  ?>">
-    <tr>
-      <td>
-        <table cellpadding=2 cellspacing=1 border=0 bgcolor="<?PHP 
-            echo $color[5] 
-        ?>">
-          <tr>
-            <td>
-            <?PHP
+  echo '<form action="../plugins/abook_take/take.php" method="post">' . "\n" .
+  html_tag( 'table', '', $abook_take_location, $color[10], 'cellpadding="3" cellspacing="0" border="0"' ) .
+      html_tag( 'tr' ) .
+          html_tag( 'td', '', 'left' ) .
+              html_tag( 'table', '', '', $color[5], 'cellpadding="2" cellspacing="1" border="0"' ) .
+                  html_tag( 'tr' ) .
+                      html_tag( 'td' );
+
               abook_take_read_string($message->header->from);
               abook_take_read_array($message->header->cc);
               abook_take_read_array($message->header->reply_to);
@@ -95,7 +88,7 @@ function abook_take_read()
 
               $new_body = $body;
               $pos = strpos($new_body, 
-                '">Download this as a file</A></CENTER><BR></SMALL>');
+                '">' . _("Download this as a file") . '</a></center><br></small>');
               if (is_int($pos))
               {
                 $new_body = substr($new_body, 0, $pos);
@@ -112,8 +105,9 @@ function abook_take_read()
               $new_body = strtr($new_body, "\n", ' ');
     
               abook_take_read_string($body);
+            
+              echo '<input type="submit" value="' . _("Take Address") . '">';
             ?>
-              <INPUT TYPE="submit" VALUE="Take Address">
             </td>
           </tr>
         </table>
@@ -142,30 +136,31 @@ function abook_take_options()
 {
   global $abook_take_location, $abook_take_hide, $abook_take_verify;
   
-  ?><tr><td align=right nowrap valign="top">Address Book Take:</td>
-    <td><select name="abook_take_abook_take_location">
-    <option value="left"<?PHP
-      if ($abook_take_location == 'left')
-        echo ' SELECTED';
-    ?>>Left aligned</option>
-    <option value="center"<?PHP
-      if ($abook_take_location == 'center')
-        echo ' SELECTED';
-    ?>>Centered</option>
-    <option value="right"<?PHP
-      if ($abook_take_location == 'right')
-        echo ' SELECTED';
-    ?>>Right aligned</option>
-  </select> on the Read screen<br>
-  <input type=checkbox name="abook_take_abook_take_hide"<?PHP
-      if ($abook_take_hide)
-        echo ' CHECKED';
-    ?>> Hide the box<br>
-  <input type=checkbox name="abook_take_abook_take_verify"<?PHP
-      if ($abook_take_verify)
-        echo ' CHECKED';
-    ?>> Try to verify addresses
-  </td></tr><?PHP
+  echo html_tag( 'tr' ) .
+      html_tag( 'td', _("Address Book Take") . ':', 'right', '', 'nowrap valign="top"' ) .
+      html_tag( 'td', '', 'left' ) .
+          '<select name="abook_take_abook_take_location">' .
+          '<option value="left"';
+          if ($abook_take_location == 'left')
+            echo ' selected';
+          echo '>' . _("Left aligned") . '</option>' .
+          '<option value="center"';
+          if ($abook_take_location == 'center')
+            echo ' selected';
+          echo '>' . _("Centered") . '</option>' .
+          '<option value="right"';
+          if ($abook_take_location == 'right')
+            echo ' selected';
+          echo '>' . _("Right aligned") . '</option>' .
+          '</select> ' . _("on the Read screen") .'<br>' .
+          '<input type="checkbox" name="abook_take_abook_take_hide"';
+          if ($abook_take_hide)
+            echo ' checked';
+          echo '>' . _("Hide the box") . '<br>' .
+          '<input type=checkbox name="abook_take_abook_take_verify"';
+          if ($abook_take_verify)
+            echo ' checked';
+          echo '>' . _("Try to verify addresses") . '</td></tr>';
 }
 
 

+ 43 - 50
plugins/abook_take/take.php

@@ -14,37 +14,33 @@
    require_once("../functions/page_header.php");
    require_once("../functions/addressbook.php");
    require_once("../src/load_prefs.php");
+   require_once('../functions/html.php');
    
    displayPageHeader($color, "None");
    
    $abook_take_verify = getPref($data_dir, $username, 'abook_take_verify');
 
-?>
-<FORM ACTION="../../src/addressbook.php" NAME=f_add METHOD="POST">
-<TABLE WIDTH=100% COLS=1 ALIGN=CENTER>
-<TR><TH BGCOLOR="<?PHP 
-    echo $color[0]; 
-?>" ALIGN=CENTER><?PHP
-   // open address book, trash errors, skip LDAP
-   $abook = addressbook_init(false, true);
-   printf(_("Add to %s"), $abook->localbackendname);
-?></TH></TR>
-</TABLE>
-<TABLE BORDER=0 CELLPADDING=1 COLS=2 WIDTH="90%" ALIGN=center>
-<?PHP
-  $name = 'addaddr';
-  
-  printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
-     _("Nickname"));
-  printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
-     "<INPUT NAME=\"%s[nickname]\" SIZE=15 VALUE=\"\">".
-     "&nbsp;<SMALL>%s</SMALL></TD></TR>\n",
-     $color[4], $name, _("Must be unique"));
-  printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
-     _("E-mail address"));
-  
-  echo "<TD BGCOLOR=\"$color[4]\" ALIGN=left>\n";
-  echo '<select name="' . $name . "[email]\">\n";
+
+$abook = addressbook_init(false, true);
+$name = 'addaddr';
+echo '<form action="../../src/addressbook.php" name="f_add" method="post">' ."\n" .
+    html_tag( 'table',
+        html_tag( 'tr',
+            html_tag( 'th', sprintf(_("Add to %s"), $abook->localbackendname), 'center', $color[0] )
+        ) ,
+    'center', '', 'width="100%" cols="1"' ) .
+
+    html_tag( 'table', '', 'center', '', 'border="0" cellpadding="1" cols="2" width="90%"' ) . "\n" .
+            html_tag( 'tr', "\n" .
+                html_tag( 'td', _("Nickname") . ':', 'right', $color[4], 'width="50"' ) . "\n" .
+                html_tag( 'td', '<input name="' . $name . '[nickname]" size="15" value="">' .
+                    '&nbsp;<small>' . _("Must be unique") . '</small>',
+                'left', $color[4] )
+            ) . "\n" .
+            html_tag( 'tr' ) . "\n" .
+            html_tag( 'td', _("E-mail address") . ':', 'right', $color[4], 'width="50"' ) . "\n" .
+            html_tag( 'td', '', 'left', $color[4] ) .
+                '<select name="' . $name . "[email]\">\n";
   foreach ($email as $Val)
   {
       if (valid_email($Val, $abook_take_verify))
@@ -58,29 +54,26 @@
 	      '">FAIL - ' . htmlspecialchars($Val) . "</option>\n";
       }
   }
-  echo "</select>\n";
-  
-  printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
-     _("First name"));
-  printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
-     "<INPUT NAME=\"%s[firstname]\" SIZE=45 VALUE=\"\"></TD></TR>\n",
-     $color[4], $name);
-  printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
-     _("Last name"));
-  printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
-     "<INPUT NAME=\"%s[lastname]\" SIZE=45 VALUE=\"\"></TD></TR>\n",
-     $color[4], $name);
-  printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
-     _("Additional info"));
-  printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
-     "<INPUT NAME=\"%s[label]\" SIZE=45 VALUE=\"\"></TD></TR>\n",
-     $color[4], $name);
-
-  printf("<TR><TD COLSPAN=2 BGCOLOR=\"%s\" ALIGN=center>\n".
-     "<INPUT TYPE=submit NAME=\"%s[SUBMIT]\" VALUE=\"%s\"></TD></TR>\n",
-     $color[4], $name, _("Add address"));
+  echo '</select></td></tr>' . "\n" . 
 
-      print "</TABLE>\n";
+  html_tag( 'tr', "\n" .
+      html_tag( 'td', _("First name") . ':', 'right', $color[4], 'width="50"' ) .
+      html_tag( 'td', '<input name="' . $name . '[firstname]" size="45" value="">', 'left', $color[4] )
+  ) . "\n" .
+  html_tag( 'tr', "\n" .
+      html_tag( 'td', _("Last name") . ':', 'right', $color[4], 'width="50"' ) .
+      html_tag( 'td', '<input name="' . $name . '[lastname]" size="45" value="">', 'left', $color[4] )
+  ) . "\n" .
+  html_tag( 'tr', "\n" .
+      html_tag( 'td', _("Additional info") . ':', 'right', $color[4], 'width="50"' ) .
+      html_tag( 'td', '<input name="' . $name . '[label]" size="45" value="">', 'left', $color[4] )
+  ) . "\n" .
+  html_tag( 'tr', "\n" .
+      html_tag( 'td',
+          '<input type="submit" name="' . $name . '[SUBMIT]" size="45" value="'. _("Add address") .'">' ,
+      'center', $color[4], 'colspan="2"' )
+  ) . "\n" .
+  '</table>';
 ?>
-</FORM></BODY>
-</HTML>
+</form></body>
+</html>

+ 1 - 0
plugins/calendar/calendar.php

@@ -20,6 +20,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');
 
 //display upper part of month calendar view
 function startcalendar() {

+ 14 - 10
plugins/listcommands/mailout.php

@@ -12,13 +12,17 @@ chdir('..');
 include_once ('../src/validate.php');
 include_once ('../functions/page_header.php');
 include_once ('../src/load_prefs.php');
+include_once('../functions/html.php');
 
 displayPageHeader($color, $mailbox);
 
-echo '<P><TABLE align="center" width="75%" BGCOLOR="' . $color[0] ."\">\n"
-    .'<TR><TH BGCOLOR="'. $color[9] . '">' . _("Mailinglist") . ' ' . _($action) .
-    "</TH></TR>\n<TR><TD>";
-
+echo html_tag('p', '', 'left' ) .
+html_tag( 'table', '', 'center', $color[0], 'border="0" width="75%"' ) . "\n" .
+    html_tag( 'tr',
+        html_tag( 'th', _("Mailinglist") . ' ' . _($action), '', $color[9] )
+    ) .
+    html_tag( 'tr' ) .
+    html_tag( 'td', '', 'left' );
 
 switch ( $action ) {
 case 'Help':
@@ -33,7 +37,7 @@ case 'Unsubscribe':
 
 printf( $out_string, htmlspecialchars($send_to) );
 
-echo '<form method="POST" action="../../src/compose.php">';
+echo '<form method="post" action="../../src/compose.php">';
 
 /*
  * Identity support (RFC 2369 sect. B.1.)
@@ -47,16 +51,16 @@ $em = getPref($data_dir, $username, 'email_address');
 if ($em != '') {
     $defaultmail .= htmlspecialchars(' <' . $em . '>') . "\n";
 }
-echo '<P><CENTER>' . _("From:") . ' ';
+echo html_tag('p', '', 'center' ) . _("From:") . ' ';
 
 $idents = getPref($data_dir, $username, 'identities');
 if ($idents != '' && $idents > 1) {
-    echo ' <select name=identity>' . "\n" .
-         '<option value=default>' . $defaultmail;
+    echo ' <select name="identity">' . "\n" .
+         '<option value="default">' . $defaultmail;
     for ($i = 1; $i < $idents; $i ++) {
         echo '<option value="' . $i . '"';
         if (isset($identity) && $identity == $i) {
-            echo ' SELECTED';
+            echo ' selected';
         }
         echo '>' . htmlspecialchars(getPref($data_dir, $username,
                                                 'full_name' . $i));
@@ -71,7 +75,7 @@ if ($idents != '' && $idents > 1) {
     echo $defaultmail;
 }
 
-echo '<BR>'
+echo '<br>'
 . '<input type=hidden name="send_to" value="' . htmlspecialchars($send_to) . '">'
 . '<input type=hidden name="subject" value="' . htmlspecialchars($subject) . '">'
 . '<input type=hidden name="body" value="' . htmlspecialchars($body) . '">'

+ 6 - 7
plugins/listcommands/setup.php

@@ -111,13 +111,12 @@ function plugin_listcommands_menu() {
 
     if (count($output) > 0) {
         echo "<tr>";
-        echo "<td ALIGN=RIGHT BGCOLOR=\"$color[0]\">"
-           .   str_replace(' ', '&nbsp;', _("Mailing List:"))
-           . '</td>';
-        echo "<td BGCOLOR=\"$color[0]\" WIDTH=\"100%\" colspan=\"2\">"
-           .   '<SMALL>' . implode('&nbsp;|&nbsp;', $output) . '</SMALL>'
-           . '</td>';
-        echo '</tr>';
+        echo html_tag( 'tr',
+                    html_tag( 'td', str_replace(' ', '&nbsp;', _("Mailing List:")), 'right', $color[0]) .
+                    html_tag( 'td',
+                        '<small>' . implode('&nbsp;|&nbsp;', $output) . '</small>' ,
+                    'left', $color[0], 'width="100%" colspan="2"')
+                );
     }
 }
 

+ 47 - 31
plugins/mail_fetch/fetch.php

@@ -19,12 +19,15 @@
     require_once('../plugins/mail_fetch/class.POP3.php');
     require_once('../functions/i18n.php');
     require_once( '../plugins/mail_fetch/functions.php' );
+    require_once( '../functions/html.php' );
 
 
     function Mail_Fetch_Status($msg) {
-        echo '<table width="90%"><tr><td>' .
-            htmlspecialchars( $msg ) .
-            '</td></tr></table>';
+        echo html_tag( 'table',
+                   html_tag( 'tr',
+                       html_tag( 'td', htmlspecialchars( $msg ) , 'left' )
+                   ),
+                 '', '', 'width="90%"' );
         flush();
     }
 
@@ -50,41 +53,49 @@
     
     echo '<br><center>';
     
-    echo '<TABLE WIDTH=95% COLS=1 ALIGN=CENTER>' .
-            "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><b>" . _("Remote POP server Fetching Mail") . '</b></TD></TR>' .
-         '</TABLE>';
+    echo html_tag( 'table',
+               html_tag( 'tr',
+                   html_tag( 'td', '<b>' . _("Remote POP server Fetching Mail") . '</b>', 'center', $color[0] )
+               ) ,
+           'center', '', 'width="95%" cols="1"' );
     
     if (!isset( $server_to_fetch ) ) {
         
-        echo '<font size=-5><BR></font>' .
-             "<form action=\"$PHP_SELF\" METHOD=POST TARGET=_self>" .
-             '<TABLE WIDTH=70% COLS=2 ALIGN=CENTER>' .
-                '<TR>' .
-                    '<TD ALIGN=RIGHT>' . _("Select Server:") . ' &nbsp; &nbsp; </TD>' .
-                    '<TD><SELECT NAME=server_to_fetch SIZE=1>' .
-                        '<OPTION VALUE="all" SELECTED>..' . _("All") . "...\n";
+        echo '<font size=-5><br></font>' .
+             "<form action=\"$PHP_SELF\" method=\"post\" target=\"_self\">" .
+             html_tag( 'table', '', 'center', '', 'width="70%" cols="2"' ) .
+                 html_tag( 'tr' ) .
+                     html_tag( 'td', _("Select Server:") . ' &nbsp; &nbsp;', 'right' ) .
+                     html_tag( 'td', '', 'left' ) .
+                         '<select name="server_to_fetch" size="1">' .
+                         '<option value="all" selected>..' . _("All") . "...\n";
         for ($i=0;$i<$mailfetch_server_number;$i++) {
-             echo "<OPTION VALUE=\"$i\">" .
-                  (($mailfetch_alias_[$i]=='')?$mailfetch_server_[$i]:$mailfetch_alias_[$i]);
+             echo "<option value=\"$i\">" .
+                  (($mailfetch_alias_[$i]=='')?$mailfetch_server_[$i]:$mailfetch_alias_[$i]) .
+                  '</option>' . "\n";
         } 
-        echo            '</SELECT>' .
-                    '</TD>' .
-                '</TR>';
+        echo            '</select>' .
+                    '</td>' .
+                '</tr>';
         
         //if password not set, ask for it
         for ($i=0;$i<$mailfetch_server_number;$i++) {
              if ($mailfetch_pass_[$i]=='') {
-                  echo '<tr>' .
-                       '<TD ALIGN=RIGHT>' . _("Password for") . ' <B>' . (($mailfetch_alias_[$i]=='')?$mailfetch_server_[$i]:$mailfetch_alias_[$i]) . '</B>: &nbsp; &nbsp; </TD>' .
-                       "<TD><INPUT TYPE=PASSWORD NAME=pass_$i></TD>" .
-                       '</TR>';
+                  echo html_tag( 'tr',
+                              html_tag( 'td', _("Password for") . ' <b>' .
+                                  (($mailfetch_alias_[$i]=='')?$mailfetch_server_[$i]:$mailfetch_alias_[$i]) .
+                                  '</b>: &nbsp; &nbsp; ',
+                              'right' ) .
+                              html_tag( 'td', '<input type="password" name="pass_' . $i , '">', 'left' )
+                          );
              }
         }
-        echo '<TR>' .
-                '<TD>&nbsp;</TD>' .
-                '<TD><input type=submit name=submit_mailfetch value="' . _("Fetch Mail"). '"></TD>'.
-                '</TR>' .
-             '</TABLE></form>';
+        echo html_tag( 'tr',
+                   html_tag( 'td', '&nbsp;' ) .
+                   html_tag( 'td', '<input type=submit name=submit_mailfetch value="' . _("Fetch Mail"). '">', 'left' )
+               );
+
+             '</table></form>';
         exit();
     }
 
@@ -113,10 +124,15 @@
         
         $pop3 = new POP3($mailfetch_server, 60);
         
-        echo "<br><table width=\"90%\"><tr bgcolor=\"$color[9]\"><td><b>" . 
-            _("Fetching from ") . 
-            (($mailfetch_alias_[$i_loop] == '')?$mailfetch_server:$mailfetch_alias_[$i_loop]) . 
-            "</b></td></tr></table>";
+        echo '<br>' .
+        html_tag( 'table',
+            html_tag( 'tr',
+                html_tag( 'td', '<b>' . _("Fetching from ") . 
+                    (($mailfetch_alias_[$i_loop] == '')?$mailfetch_server:$mailfetch_alias_[$i_loop]) . 
+                    '</b>',
+                'center' ) ,
+            '', $color[9] ) ,
+        '', '', 'width="90%"' );
           
         flush();
         

+ 189 - 87
plugins/mail_fetch/options.php

@@ -102,32 +102,67 @@
 
 
     echo '<BR><form method=post action="'.$PHP_SELF.'">' .
-            "<TABLE WIDTH=95% COLS=1 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><b>" . _("Remote POP server settings") . '</b></TD></TR></TABLE>' .
-            '<TABLE WIDTH=95% COLS=1 ALIGN=CENTER><TR><TD>' .
-            _("You should be aware that the encryption used to store your password is not perfectly secure.  However, if you are using pop, there is inherently no encryption anyway. Additionally, the encryption that we do to save it on the server can be undone by a hacker reading the source to this file." ) .
-            '</TD></TR><TR><TD>' .
-            _("If you leave password empty, it will be required when you fetch mail.") .
-            '</TD></TR>' .
-            '<tr><td align=right><input type=checkbox name=mf_cypher ' .
-            (($mailfetch_cypher=='on')?'checked >':'>') .
-            _("Encrypt passwords (informative only)") . ' </td><tr>' .
-            '</TABLE></td></tr>';
+            html_tag( 'table',
+                html_tag( 'tr',
+                    html_tag( 'td',
+                        '<b>' . _("Remote POP server settings") . '</b>',
+                    'center', $color[0] )
+                ),
+            'center', '', 'width="95%" cols="1"' ) .
+            html_tag( 'table',
+                html_tag( 'tr',
+                    html_tag( 'td',
+                        _("You should be aware that the encryption used to store your password is not perfectly secure.  However, if you are using pop, there is inherently no encryption anyway. Additionally, the encryption that we do to save it on the server can be undone by a hacker reading the source to this file." ) ,
+                    'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'td',
+                        _("If you leave password empty, it will be required when you fetch mail.") ,
+                    'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'td',
+                        '<input type=checkbox name=mf_cypher ' .
+                        (($mailfetch_cypher=='on')?'checked >':'>') .
+                        _("Encrypt passwords (informative only)") ,
+                    'right' )
+                ) ,
+            'center', '', 'width="95%" cols="1"' );
 
     switch( $mf_action ) {
     case 'config':
-        echo '<TABLE WIDTH=70% COLS=1 ALIGN=CENTER cellpadding=5 cellspacing=1>' .
-            "  <TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><b>" . _("Add Server") . '</b></TD></TR>' .
-            "  <TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>" .
+        echo html_tag( 'table', '', 'center', '', 'width="70%" cols="1" cellpadding="5" cellspacing="1"' ) .
+                    html_tag( 'tr',
+                        html_tag( 'td', '<b>' . _("Add Server") . '</b>', 'center', $color[9] )
+                    ) .
+                    html_tag( 'tr' ) .
+                        html_tag( 'td', '', 'center', $color[0] ) .
+
             "<INPUT TYPE=\"hidden\" NAME=\"mf_sn\" VALUE=\"$mailfetch_server_number\">" .
-            '<INPUT TYPE="hidden" NAME="mf_action" VALUE="add"><table>' .
-            '<tr><th align=right>' . _("Server:") . '</th><td><input type=text name=mf_server value="" size=40></td></tr>' .
-            '<tr><th align=right>' . _("Alias:") . '</th><td><input type=text name=mf_alias value="" size=20></td></tr>' .
-            '<tr><th align=right>' . _("Username:") . '</th><td><input type=text name=mf_user value="" size=20></td></tr>' .
-            '<tr><th align=right>' . _("Password:") . '</th><td><input type=password name=mf_pass value="" size=20></td></tr>' .
-            '<tr><th align=right>' . _("Store in Folder:") . '</th><td>';
+            '<INPUT TYPE="hidden" NAME="mf_action" VALUE="add">' .
+            html_tag( 'table' ) .
+                html_tag( 'tr',
+                    html_tag( 'th', _("Server:"), 'right' ) .
+                    html_tag( 'td', '<input type=text name=mf_server value="" size=40>', 'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', _("Alias:"), 'right' ) .
+                    html_tag( 'td', '<input type=text name=mf_alias value="" size=20>', 'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', _("Username:"), 'right' ) .
+                    html_tag( 'td', '<input type=text name=mf_user value="" size=20>', 'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', _("Password:"), 'right' ) .
+                    html_tag( 'td', '<input type=password name=mf_pass value="" size=20>', 'left' )
+                ) .
+                html_tag( 'tr' ) .
+                    html_tag( 'th', _("Store in Folder:"), 'right' ) .
+                    html_tag( 'td', '', 'left' );
         $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0);
         $boxes = sqimap_mailbox_list($imapConnection);
-        echo '<SELECT NAME=mf_subfolder>';
+        echo '<select name="mf_subfolder">';
         $boxes = sqimap_mailbox_list($imapConnection);
         for ($i = 0; $i < count($boxes); $i++) {
             if (!in_array('noselect', $boxes[$i]['flags'])) {
@@ -136,75 +171,116 @@
                 if ( strtolower( $box2 ) == 'inbox' ) {
                     $box2 = _("INBOX");
                 }
-                echo "<OPTION VALUE=\"$box\">$box2</option>\n";
+                echo "<option value=\"$box\">$box2</option>\n";
             }
         }        
-        echo '</SELECT></td></tr>' .
-            '<tr><th align=right>&nbsp;</th><td><input type=checkbox name=mf_lmos checked>' . _("Leave Mail on Server") . '</td></tr>' .
-            '<tr><th align=right>&nbsp;</th><td><input type=checkbox name=mf_login>' . _("Check mail during login") . '</td></tr>' .
-            '<tr><th align=right>&nbsp;</th><td><input type=checkbox name=mf_fref>' . _("Check mail during folder refresh") . '</td></tr>' .
-            '<tr><td align=center colspan=2><input type=submit name=submit_mailfetch value="' . _("Add Server") . '"></td></tr>' .
-            '</table></form></td></tr></TABLE>';
+        echo '</select></td></tr>' .
+                html_tag( 'tr',
+                    html_tag( 'th', '&nbsp;', 'right' ) .
+                    html_tag( 'td', '<input type="checkbox" name="mf_lmos" checked>' . _("Leave Mail on Server"), 'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', '&nbsp;', 'right' ) .
+                    html_tag( 'td', '<input type="checkbox" name="mf_login">' . _("Check mail during login"), 'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', '&nbsp;', 'right' ) .
+                    html_tag( 'td', '<input type="checkbox" name="mf_fref">' . _("Check mail during folder refresh"), 'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'td',
+                        '<input type=submit name="submit_mailfetch" value="' . _("Add Server") . '">',
+                    'center', '', 'colspan="2"' )
+                ) .
+            '</table></form></td></tr></table>';
 
         // Modify Server
         echo '<font size=-5><BR></font>' .
-            '<TABLE WIDTH=70% COLS=1 ALIGN=CENTER cellpadding=5 cellspacing=1>' .
-            "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><b>" . _("Modify Server") . '</b></TD></TR>' .
-            "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>";
+            html_tag( 'table', '', 'center', '', 'width="70%" cols="1" cellpadding="5" cellspacing="1"' ) .
+                html_tag( 'tr',
+                    html_tag( 'td', '<b>' . _("Modify Server") . '</b>', 'center', $color[9] )
+                ) .
+                html_tag( 'tr' ) .
+                    html_tag( 'td', '', 'center', $color[0] );
         if ($mailfetch_server_number>0) {
-            echo "<form action=\"$PHP_SELF\" METHOD=\"POST\" TARGET=_self>";
-            echo '<b>' . _("Server Name:") . '</b> <SELECT NAME="mf_sn">';
+            echo "<form action=\"$PHP_SELF\" method=\"post\" target=\"_self\">";
+            echo '<b>' . _("Server Name:") . '</b> <select name="mf_sn">';
             for ($i=0;$i<$mailfetch_server_number;$i++) {
-                echo "<OPTION VALUE=\"$i\">" .
-                    (($mailfetch_alias_[$i]=='')?$mailfetch_server_[$i]:$mailfetch_alias_[$i]) . "</OPTION>>";
+                echo "<option value=\"$i\">" .
+                    (($mailfetch_alias_[$i]=='')?$mailfetch_server_[$i]:$mailfetch_alias_[$i]) . "</option>>";
             }
-            echo '</SELECT>'.
+            echo '</select>'.
                  '&nbsp;&nbsp;<INPUT TYPE=submit name=mf_action value="' . _("Modify") . '">'.
                  '&nbsp;&nbsp;<INPUT TYPE=submit name=mf_action value="' . _("Delete") . '">'.
                  '</form>';
         } else {
             echo _("No-one server in use. Try to add.");
         }
-        echo '</TD></TR></TABLE>';
+        echo '</td></tr></table>';
         break;
     case _("Delete"):                                     //erase confirmation about a server
-        echo '<TABLE WIDTH=95% COLS=1 ALIGN=CENTER cellpadding=5 cellspacing=1>' .
-            "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><b>" . _("Fetching Servers") . '</b></TD></TR>' .
-            '</TABLE>' .
-            '<BR>' .
-            '<TABLE WIDTH=70% COLS=1 ALIGN=CENTER cellpadding=5 cellspacing=1>' .
-            "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><b>" . _("Confirm Deletion of a Server") . '</b></TD></TR>' .
-            "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>" .
-            "<INPUT TYPE=\"hidden\" NAME=\"mf_sn\" VALUE=\"$mf_sn\">" .
-            '<INPUT TYPE="hidden" NAME="mf_action" VALUE="confirm_delete">' .
-            '<br>' . _("Selected Server:") . "<b>$mailfetch_server_[$mf_sn]</b><br>" .
-            _("Confirm delete of selected server?") . '<br><br>' .
-            '<input type=submit name=submit_mailfetch value="' . _("Confirm Delete") . '">' .
-            '<br></form></TD></TR></TABLE>';
+        echo html_tag( 'table',
+                    html_tag( 'tr',
+                        html_tag( 'td', '<b>' . _("Fetching Servers") . '</b>', 'center', $color[0] )
+                    ) ,
+                'center', '', 'width="95%" cols="1" cellpadding="5" cellspacing="1"' ) .
+            '<br>' .
+            html_tag( 'table',
+                html_tag( 'tr',
+                    html_tag( 'td', '<b>' . _("Confirm Deletion of a Server") . '</b>', 'center', $color[9] )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'td',
+                        "<INPUT TYPE=\"hidden\" NAME=\"mf_sn\" VALUE=\"$mf_sn\">" .
+                        '<INPUT TYPE="hidden" NAME="mf_action" VALUE="confirm_delete">' .
+                        '<br>' . _("Selected Server:") . " <b>$mailfetch_server_[$mf_sn]</b><br>" .
+                        _("Confirm delete of selected server?") . '<br><br>' .
+                        '<input type=submit name=submit_mailfetch value="' . _("Confirm Delete") . '">' .
+                        '<br></form>' ,
+                    'center', $color[9] )
+                ) ,
+            'center', '', 'width="70%" cols="1" cellpadding="5" cellspacing="1"' );
         break;                                  //modify a server
     case _("Modify"):
-        echo '<TABLE WIDTH=95% COLS=1 ALIGN=CENTER cellpadding=5 cellspacing=1>' .
-            "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><b>" . _("Fetching Servers") . '</b></TD></TR>' .
-            '</TABLE>' .
-            '<BR>' .
-            '<TABLE WIDTH=70% COLS=1 ALIGN=CENTER cellpadding=5 cellspacing=1>' .
-            "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><b>" . _("Mofify a Server") . '</b></TD></TR>' .
-            "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>" .
+        echo html_tag( 'table',
+                    html_tag( 'tr',
+                        html_tag( 'td', '<b>' . _("Fetching Servers") . '</b>', 'center', $color[0] )
+                    ) ,
+                'center', '', 'width="95%" cols="1" cellpadding="5" cellspacing="1"' ) .
+            '<br>' .
+            html_tag( 'table', '', 'center', '', 'width="70%" cols="1" cellpadding="5" cellspacing="1"' ) .
+                html_tag( 'tr',
+                    html_tag( 'td', '<b>' . _("Mofify a Server") . '</b>', 'center', $color[9] )
+                ) .
+                html_tag( 'tr' ) .
+                    html_tag( 'td', '', 'center', $color[0] ) .
+
             "<INPUT TYPE=\"hidden\" NAME=\"mf_sn\" VALUE=\"$mf_sn\">" .
             '<INPUT TYPE="hidden" NAME="mf_action" VALUE="confirm_modify">' .
-            '<table>' .
-            '<tr><th align=right>' . _("Server:") . '</th>' .
-            "<td><input type=text name=mf_server value=\"$mailfetch_server_[$mf_sn]\" size=40></td></tr>" .
-            '<tr><th align=right>' . _("Alias:") . '</th>' .
-            "<td><input type=text name=mf_alias value=\"$mailfetch_alias_[$mf_sn]\" size=40></td></tr>" .
-            '<tr><th align=right>' . _("Username:") . '</th>' .
-            "<td><input type=text name=mf_user value=\"$mailfetch_user_[$mf_sn]\" size=20></td></tr>" .
-            '<tr><th align=right>' . _("Password:") . '</th>' .
-            "<td><input type=password name=mf_pass value=\"$mailfetch_pass_[$mf_sn]\" size=20></td></tr>" .
-            '<tr><th align=right>' . _("Store in Folder:") . '</th><td>';
+            html_tag( 'table' ) .
+                html_tag( 'tr',
+                    html_tag( 'th', _("Server:"), 'right' ) .
+                    html_tag( 'td', '<input type="text" name="mf_server" value="' . $mailfetch_server_[$mf_sn] . '" size="40">', 'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', _("Alias:"), 'right' ) .
+                    html_tag( 'td', '<input type="text" name="mf_alias" value="' . $mailfetch_alias_[$mf_sn] . '" size="40">', 'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', _("Username:"), 'right' ) .
+                    html_tag( 'td', '<input type="text" name="mf_user" value="' . $mailfetch_user_[$mf_sn] . '" size="20">', 'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', _("Password:"), 'right' ) .
+                    html_tag( 'td', '<input type="password" name="mf_pass" value="' . $mailfetch_pass_[$mf_sn] . '" size="20">', 'left' )
+                ) .
+                html_tag( 'tr' ) .
+                    html_tag( 'th', _("Store in Folder:"), 'right' ) .
+                    html_tag( 'td', '', 'left' );
+
         $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0);
         $boxes = sqimap_mailbox_list($imapConnection);
-        echo "<SELECT NAME=mf_subfolder>";
+        echo '<select name="mf_subfolder">';
         $boxes = sqimap_mailbox_list($imapConnection);
         for ($i = 0; $i < count($boxes); $i++) {
             if (!in_array('noselect', $boxes[$i]['flags'])) {
@@ -213,30 +289,56 @@
                 if ( strtolower( $box2 ) == 'inbox' ) {
                     $box2 = _("INBOX");
                 }
-                echo '<OPTION ' .
-                     (strcmp($mailfetch_subfolder_[$mf_sn],$box)==0?'SELECTED':'') .
-                     " VALUE=\"$box\">$box2</option>\n";
+                echo '<option ' .
+                     (strcmp($mailfetch_subfolder_[$mf_sn],$box)==0?'selected':'') .
+                     " value=\"$box\">$box2</option>\n";
             }
         }                
-        echo '</SELECT></td></tr>' .
-            '<tr><th align=right>&nbsp;</th>' .
-            '<td><input type=checkbox name=mf_lmos ' . (($mailfetch_lmos_[$mf_sn] == 'on')?'checked':'') .
-            '>' . _("Leave Mail on Server") . '</td></tr>' .
-            '<tr><th align=right>&nbsp;</TH><td><input type=checkbox name=mf_login ' . ( ($mailfetch_login_[$mf_sn] == 'on')?'checked':'') .
-            '>' . _("Check mail during login") . '</td></tr>' .
-            '<tr><th align=right>&nbsp;</TH><td><input type=checkbox name=mf_fref ' . ( ($mailfetch_fref_[$mf_sn] == 'on')?'checked':'') .
-            '>' . _("Check mail during folder refresh") . '</td></tr>' .
-            '<tr><td align=center colspan=2><input type=submit name=submit_mailfetch value="' . _("Modify Server") . '"></td></tr>' .
-            '</table></form></TD></TR></TABLE>';
+        echo '</select></td></tr>' .
+
+                html_tag( 'tr',
+                    html_tag( 'th', '&nbsp;', 'right' ) .
+                    html_tag( 'td',
+                        '<input type=checkbox name=mf_lmos ' . (($mailfetch_lmos_[$mf_sn] == 'on')?'checked':'') .
+                        '>' . _("Leave Mail on Server") ,
+                    'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', '&nbsp;', 'right' ) .
+                    html_tag( 'td',
+                        '<input type=checkbox name=mf_login ' . ( ($mailfetch_login_[$mf_sn] == 'on')?'checked':'') .
+                        '>' . _("Check mail during login"),
+                    'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'th', '&nbsp;', 'right' ) .
+                    html_tag( 'td',
+                        '<input type=checkbox name=mf_fref ' . ( ($mailfetch_fref_[$mf_sn] == 'on')?'checked':'') .
+                        '>' . _("Check mail during folder refresh") ,
+                    'left' )
+                ) .
+                html_tag( 'tr',
+                    html_tag( 'td',
+                        '<input type=submit name="submit_mailfetch" value="' . _("Modify Server") . '">',
+                    'center', '', 'colspan="2"' )
+                ) .
+
+            '</table></form></td></tr></table>';
         break;
     default:                                    //unsupported action
-        echo '</form><TABLE WIDTH=95% COLS=1 ALIGN=CENTER>' .
-            "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><b>" . _("Fetching Servers") . '</b></TD></TR>' .
-            '</TABLE><BR>' .
-            '<TABLE WIDTH=70% COLS=1 ALIGN=CENTER>' .
-            "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><b>" . _("Undefined Function") . '</b></TD></TR>' .
-            "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><b>" .
-            _("Hey! Wath do You are looking for?") . '</b></TD></TR></TABLE>';
+        echo '</form>' .
+        html_tag( 'table',
+            html_tag( 'tr',
+                html_tag( 'td', '<b>' . _("Fetching Servers") . '</b>', 'center', $color[0] )
+            ) ,
+        'center', '', 'width="95%" cols="1"' ) .
+        '<br>' .
+        html_tag( 'table',
+            html_tag( 'tr',
+                html_tag( 'td', '<b>' . _("Undefined Function") . '</b>', 'center', $color[9] ) .
+                html_tag( 'td', '<b>' . _("Hey! Wath do You are looking for?") . '</b>', 'center', $color[0] )
+            ) ,
+        'center', '', 'width="70%" cols="1"' );
     }
 
     ?>

+ 18 - 14
plugins/newmail/newmail.php

@@ -19,24 +19,28 @@
 
    displayHtmlHeader( _("New Mail"), '', FALSE );
 
-   echo "<BODY bgcolor=\"$color[4]\" topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>\n".
-        '<CENTER>'.
-        "<table width=\"100%\" cellpadding=2 cellspacing=2 border=0>\n".
-        "<tr>\n".
-        "<td bgcolor=\"$color[0]\">\n".
-        '<b><center>' . _("SquirrelMail Notice:") . "</center></b>\n".
-        "</td>\n".
-        "</tr><tr>\n".
-        "<td><center><br><big><font color=\"$color[2]\">" .
-        _("You have new mail!") . "</font><br></big><br>\n".
-        "<form name=nm>\n".
-            '<input type=button name=bt value="Close Window" onClick="javascript:window.close();">'.
-        "</form></center></td></tr></table></CENTER>\n".
+   echo "<body bgcolor=\"$color[4]\" topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>\n".
+        '<center>'. "\n" .
+        html_tag( 'table', "\n" .
+            html_tag( 'tr', "\n" .
+                html_tag( 'td', '<b>' . _("SquirrelMail Notice:") . '</b>', 'center', $color[0] )
+            ) .
+            html_tag( 'tr', "\n" .
+                html_tag( 'td',
+                    '<br><big><font color="' . $color[2] . '">' .
+                    _("You have new mail!") . '</font><br></big><br>' . "\n" .
+                    '<form name="nm">' . "\n".
+                    '<input type=button name=bt value="' . _("Close Window") .'" onClick="javascript:window.close();">'."\n".
+                    '</form>',
+                'center' )
+            ) ,
+        '', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"' ) .
+        '</center>' .
         "<script language=javascript>\n".
         "<!--\n".
             "document.nm.bt.focus();\n".
         "-->\n".
         "</script>\n".
-        "</BODY></HTML>\n";
+        "</body></html>\n";
 
 ?>

+ 82 - 73
plugins/newmail/newmail_opt.php

@@ -33,77 +33,89 @@
     $allowsound = "true";
 
     echo '<br>' .
-         "<table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor=\"$color[0]\">\n".
-         '<center><b>' . _("Options") . ' - ' . _("New Mail Notification") . '</b></center>'.
-         '</td></tr><tr><td>';
+         html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) . "\n" .
+             html_tag( 'tr', "\n" .
+                 html_tag( 'td', '<b>' . _("Options") . ' - ' . _("New Mail Notification") . '</b>', 'center', $color[0] )
+             ) . "\n" .
+             html_tag( 'tr' ) . "\n" .
+                 html_tag( 'td', '', 'left' );
     if ($allowsound == "true") {
-        echo '<p>'.
-        _("Select <b>Enable Media Playing</b> to turn on playing a media file when unseen mail is in your folders. When enabled, you can specify the media file to play in the provided file box.") .
-        '</p>';
+        echo html_tag( 'p',
+            _("Select <b>Enable Media Playing</b> to turn on playing a media file when unseen mail is in your folders. When enabled, you can specify the media file to play in the provided file box.")
+        ) . "\n";
     }
-    echo '<p>'.
-_("The <b>Check all boxes, not just INBOX</b> option will check ALL of your folders for unseen mail, not just the inbox for notification.").
-         '</p><p>'.
-_("Selecting the <b>Show popup</b> option will enable the showing of a popup window when unseen mail is in your folders (requires JavaScript).") .
-         '</p><p>'.
-_("Use the <b>Check RECENT</b> to only check for messages that are recent. Recent messages are those that have just recently showed up and have not been \"viewed\" or checked yet.  This can prevent being continuously annoyed by sounds or popups for unseen mail.").
-         '</p><p>'.
-_("Selecting the <b>Change title</b> option will change the title in some browsers to let you know when you have new mail (requires JavaScript, and only works in IE but you won't see errors with other browsers).  This will always tell you if you have new mail, even if you have <b>Check RECENT</b> enabled.").
-         '</p>';
+    echo html_tag( 'p',
+                _("The <b>Check all boxes, not just INBOX</b> option will check ALL of your folders for unseen mail, not just the inbox for notification.")
+            ) . "\n" .
+            html_tag( 'p',
+               _("Selecting the <b>Show popup</b> option will enable the showing of a popup window when unseen mail is in your folders (requires JavaScript).")
+           ) . "\n" .
+           html_tag( 'p',
+               _("Use the <b>Check RECENT</b> to only check for messages that are recent. Recent messages are those that have just recently showed up and have not been \"viewed\" or checked yet.  This can prevent being continuously annoyed by sounds or popups for unseen mail.")
+           ) . "\n" .
+           html_tag( 'p',
+               _("Selecting the <b>Change title</b> option will change the title in some browsers to let you know when you have new mail (requires JavaScript, and only works in IE but you won't see errors with other browsers).  This will always tell you if you have new mail, even if you have <b>Check RECENT</b> enabled.")
+           );
     if ($allowsound == "true") {
-        echo '<p>'.
-_("Select from the list of <b>server files</b> the media file to play when new mail arrives.  Selecting <b>local media</b> will play the file specified in the <b>local media file</b> box to play from the local computer.  If no file is specified, the system will use a default from the server.") .
-         '</p>';
+        echo html_tag( 'p',
+                    _("Select from the list of <b>server files</b> the media file to play when new mail arrives.  Selecting <b>local media</b> will play the file specified in the <b>local media file</b> box to play from the local computer.  If no file is specified, the system will use a default from the server.")
+               ) . "\n";
     }
     echo '<form action="../../src/options.php" method=post>'.
-         '<table width=100% cellpadding=0 cellspacing=2 border=0>'.
-            '<tr>'.
-                '<td align=right nowrap>&nbsp</td>';
+         html_tag( 'table', '', '', '', 'width="100%" cellpadding="0" cellspacing="2" border="0"' ) . "\n" .
+             html_tag( 'tr' ) . "\n" .
+                 html_tag( 'td', '&nbsp', 'right', '', 'nowrap' ) . "\n";
     if ($allowsound == "true") {
-                echo '<td><input type=checkbox ';
+                echo html_tag( 'td', '', 'left' ) .
+                            '<input type="checkbox" ';
         if ($media_enable == 'on') {
                 echo 'checked ';
         }
-        echo 'name=media_enable><b> ' . _("Enable Media Playing") . '</b></td>'.
-                '</tr>';
+        echo 'name="media_enable"><b> ' . _("Enable Media Playing") . '</b></td>'.
+                '</tr>' . "\n";
     }  
-            echo '<tr>'.
-                '<td align=right nowrap>&nbsp</td>'.
-                '<td><input type=checkbox ';
+            echo html_tag( 'tr' ) . "\n" .
+                html_tag( 'td', '&nbsp', 'right', '', 'nowrap' ) . "\n" .
+                html_tag( 'td', '', 'left' ) .
+                    '<input type="checkbox" ';
     if ($media_allbox == 'on') {
               echo 'checked ';
     }
-    echo 'name=media_allbox><b> ' . _("Check all boxes, not just INBOX") . '</b></td>'.
-            '</tr>'.
-            '<tr>'.
-                '<td align=right nowrap>&nbsp</td>'.
-                '<td><input type=checkbox ';
+    echo 'name="media_allbox"><b> ' . _("Check all boxes, not just INBOX") . '</b></td>'.
+            '</tr>'.  "\n" .
+            html_tag( 'tr' ) . "\n" .
+                html_tag( 'td', '&nbsp', 'right', '', 'nowrap' ) . "\n" .
+                html_tag( 'td', '', 'left' ) .
+                    '<input type="checkbox" ';
     if ($media_recent == 'on') {
               echo 'checked ';
     }
-    echo 'name=media_recent><b> ' . _("Count only messages that are RECENT") . '</b></td>'.
-            '</tr>'.
-            '<tr>'.
-                '<td align=right nowrap>&nbsp</td>' .
-                '<td><input type=checkbox ';
+    echo 'name="media_recent"><b> ' . _("Count only messages that are RECENT") . '</b></td>'.
+            '</tr>'. "\n" .
+            html_tag( 'tr' ) . "\n" .
+                html_tag( 'td', '&nbsp', 'right', '', 'nowrap' ) . "\n" .
+                html_tag( 'td', '', 'left' ) .
+                    '<input type="checkbox" ';
     if ($media_changetitle == 'on') {
               echo 'checked ';
     }
-    echo 'name=media_changetitle><b> ' . _("Change title on supported browsers.") . '</b> &nbsp; (' . _("requires JavaScript to work") . ')</td>'.
-            '</tr>'.
-            '<tr>'.
-                '<td align=right nowrap>&nbsp</td>'.
-                '<td><input type=checkbox ';
+    echo 'name="media_changetitle"><b> ' . _("Change title on supported browsers.") . '</b> &nbsp; (' . _("requires JavaScript to work") . ')</td>'.
+            '</tr>'. "\n" .
+            html_tag( 'tr' ) . "\n" .
+                html_tag( 'td', '&nbsp', 'right', '', 'nowrap' ) . "\n" .
+                html_tag( 'td', '', 'left' ) .
+                    '<input type="checkbox" ';
     if($media_popup == 'on') {
               echo 'checked ';
     }
-    echo 'name=media_popup><b> ' . _("Show popup window on new mail") . '</b> &nbsp; (' . _("requires JavaScript to work") . ')</td>'.
-            '</tr>';
+    echo 'name="media_popup"><b> ' . _("Show popup window on new mail") . '</b> &nbsp; (' . _("requires JavaScript to work") . ')</td>'.
+            '</tr>' . "\n";
     if ($allowsound == "true") {
-            echo '<tr>'.
-                '<td align=right nowrap>' . _("Select server file:") . '</td>'.
-                '<td><SELECT NAME=media_sel>'.
-                    '<OPTION VALUE="(local media)">' . _("(local media)") . '</option>';
+            echo html_tag( 'tr' ) . "\n" .
+                        html_tag( 'td', _("Select server file:"), 'right', '', 'nowrap' ) . "\n" .
+                        html_tag( 'td', '', 'left' ) .
+                            '<select name="media_sel">'.  "\n" .
+                            '<option value="(local media)">' . _("(local media)") . '</option>' .  "\n";
 
     // Iterate sound files for options
 
@@ -111,15 +123,15 @@ _("Select from the list of <b>server files</b> the media file to play when new m
     while($entry=$d->read()) {
         $fname = $d->path . "/" . $entry;
         if ($entry != '..' && $entry != '.') {
-            echo "<OPTION ";
+            echo "<option ";
             if ($fname == $media) {
-                echo "SELECTED ";
+                echo "selected ";
             }
-            echo "VALUE=\"" . $fname . "\">" . $entry . "</option>\n";
+            echo "value=\"" . $fname . "\">" . $entry . "</option>\n";
         }
     }
     $d->close();
-    echo '</SELECT>'.
+    echo '</select>'.
                '<input type="submit" value=" ' . _("Try") . ' " name="test" onClick="'.
                     "window.open('testsound.php?sound='+media_sel.options[media_sel.selectedIndex].value, 'TestSound',".
                        "'width=150,height=30,scrollbars=no');".
@@ -127,28 +139,25 @@ _("Select from the list of <b>server files</b> the media file to play when new m
                '">'.
             '</td>'.
          '</tr>'.
-         '<tr>'.
-            '<td align=right nowrap>' . _("Local Media File:") .
-            '</td><td>'.
-               '<input type=file size=40 name=media_file>'.
-            '</td>'.
-         '</tr>'.
-         '<tr>'.
-            '<td align=right nowrap>' . _("Current File:") .
-            '</td><td>'.
-           "<input type=hidden value=\"$media;\" name=media_default>$media;</td>".
-         '</tr>';
+         html_tag( 'tr', "\n" .
+             html_tag( 'td', _("Local Media File:"), 'right', '', 'nowrap' ) .
+             html_tag( 'td', '<input type="file" size="40" name="media_file">', 'left' )
+         ) . "\n" .
+         html_tag( 'tr', "\n" .
+             html_tag( 'td', _("Current File:"), 'right', '', 'nowrap' ) .
+             html_tag( 'td', '<input type="hidden" value="' . $media . '" name="media_default">' . $media . '', 'left' )
+         ) . "\n";
     }
-         echo '<tr>'.
-            '<td>&nbsp;</td>'.
-            '<td>'.
-               '<INPUT TYPE=HIDDEN NAME=optmode VALUE=submit>'. 
-               '<input type="submit" value="' . _("Submit") . '" name="submit_newmail">'.
-            '</td>'.
-         '</tr>'.
-      '</table>'.
-   '</form>'.
-   '</td></tr></table>'.
+         echo html_tag( 'tr', "\n" .
+                     html_tag( 'td', '&nbsp;' ) .
+                     html_tag( 'td',
+                         '<input type="hidden" name="optmode" value="submit">'. 
+                         '<input type="submit" value="' . _("Submit") . '" name="submit_newmail">',
+                     'left' )
+                 ) . "\n" .
+      '</table>'. "\n" .
+   '</form>'. "\n" .
+   '</td></tr></table>'. "\n" .
 '</body></html>';
 
 ?>

+ 1 - 1
plugins/newmail/setup.php

@@ -126,7 +126,7 @@
             } else {
                 setPref($data_dir,$username,'newmail_media','');
             }
-            echo '<center> ' . _("New Mail Notification options saved") . '</center>';
+            echo html_tag( 'p', _("New Mail Notification options saved"), 'center' );
         }
     }
 

+ 17 - 12
plugins/newmail/testsound.php

@@ -13,6 +13,7 @@
 
    chdir ("../");
    require_once('../src/validate.php');
+   require_once('../functions/html.php');
    require_once("../src/load_prefs.php");
    if (!isset($sound)) {
     $sound = "Click.wav";
@@ -23,17 +24,21 @@
 
    displayHtmlHeader( _("Test Sound"), '', FALSE );
 
-   echo "<BODY bgcolor=\"$color[4]\" topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>\n".
-        '<CENTER>'.
-        "<embed src=\"$sound\" hidden=true autostart=true>".
-        '<br>'.
-        '<b>' . _("Loading the sound...") . '</b><br><br>'.
-        '<form>'.
-        '<input type="button" name="close" value="  ' .
-        _("Close") .
-        '  " onClick="window.close()">'.
-        '</form>'.
-        '</CENTER>'.
-        '</BODY></HTML>';
+   echo "<body bgcolor=\"$color[4]\" topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>\n".
+        html_tag( 'table',
+            html_tag( 'tr',
+                html_tag( 'td',
+                    "<embed src=\"$sound\" hidden=true autostart=true>".
+                    '<br>'.
+                    '<b>' . _("Loading the sound...") . '</b><br><br>'.
+                    '<form>'.
+                    '<input type="button" name="close" value="  ' .
+                    _("Close") .
+                    '  " onClick="window.close()">'.
+                    '</form>' ,
+                'center' )
+            ) ,
+        'center' ) .
+        '</body></html>';
 
 ?>