r2l by yoav
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Jun 2002 09:25:02 +0000 (09:25 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Jun 2002 09:25:02 +0000 (09:25 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3012 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/read_body.php
src/right_main.php
src/search.php
src/signout.php
src/vcard.php
src/webmail.php

index 1840b4539fb0a687dcc4d4df4efcbd4fddb29ebc..574284da6f0c1755665df35fe64bc0dd866d2c7d 100644 (file)
@@ -18,6 +18,7 @@ require_once('../functions/mime.php');
 require_once('../functions/date.php');
 require_once('../functions/url_parser.php');
 require_once('../functions/smtp.php');
 require_once('../functions/date.php');
 require_once('../functions/url_parser.php');
 require_once('../functions/smtp.php');
+require_once('../functions/html.php');
 
 /**
  * Given an IMAP message id number, this will look it up in the cached
 
 /**
  * Given an IMAP message id number, this will look it up in the cached
index a4db4efe1d68339cf39c0004ec9b156f1f9e0e89..33126f19d4d63d7bff8263e868c805e20d7635a8 100644 (file)
@@ -19,6 +19,7 @@ require_once('../functions/array.php');
 require_once('../functions/mime.php');
 require_once('../functions/mailbox_display.php');
 require_once('../functions/display_messages.php');
 require_once('../functions/mime.php');
 require_once('../functions/mailbox_display.php');
 require_once('../functions/display_messages.php');
+require_once('../functions/html.php');
 
 /***********************************************************
  * incoming variables from URL:                            *
 
 /***********************************************************
  * incoming variables from URL:                            *
@@ -119,21 +120,24 @@ echo "<br>\n";
 
 do_hook('right_main_after_header');
 if (isset($note)) {
 
 do_hook('right_main_after_header');
 if (isset($note)) {
-    echo "<CENTER><B>$note</B></CENTER><BR>\n";
+    echo html_tag( 'div', '<b>' . $note .'</b>', 'center' ) . "<br>\n";
 }
 
 if ($just_logged_in == true) {
     $just_logged_in = false;
 
     if (strlen(trim($motd)) > 0) {
 }
 
 if ($just_logged_in == true) {
     $just_logged_in = false;
 
     if (strlen(trim($motd)) > 0) {
-        echo "<br><table align=center width=\"70%\" cellpadding=0 cellspacing=3 border=0 bgcolor=\"$color[9]\">" .
-         '<tr><td>' .
-             "<table width=\"100%\" cellpadding=5 cellspacing=1 border=0 bgcolor=\"$color[4]\">" .
-             "<tr><td align=center>$motd";
-        do_hook('motd');
-        echo '</td></tr>' .
-             '</table>' .
-             '</td></tr></table>';
+        echo html_tag( 'table',
+                    html_tag( 'tr',
+                        html_tag( 'td', $motd ,
+                            html_tag( 'table',
+                                html_tag( 'tr',
+                                    html_tag( 'td', $motd, 'center' )
+                                ) ,
+                            '', $color[4], 'width="100%" cellpadding="5" cellspacing="1" border="0"' )
+                         )
+                    ) ,
+                'center', $color[9], 'width="70%" cellpadding="0" cellspacing="3" border="0"' );
     }
 }
 
     }
 }
 
@@ -196,6 +200,6 @@ if ($use_mailbox_cache && session_is_registered('msgs')) {
 do_hook('right_main_bottom');
 sqimap_logout ($imapConnection);
 
 do_hook('right_main_bottom');
 sqimap_logout ($imapConnection);
 
-echo '</BODY></HTML>';
+echo '</body></html>';
 
 ?>
\ No newline at end of file
 
 ?>
\ No newline at end of file
index 1888e9e1d9e2c1a64e83f7045406ea80c84dbd76..8a04fd70b585616566eaa29e1e54e3fbb86a1576 100644 (file)
@@ -15,6 +15,7 @@ require_once('../functions/imap_search.php');
 require_once('../functions/imap_utf7_decode_local.php');
 require_once('../functions/array.php');
 require_once('../functions/strings.php');
 require_once('../functions/imap_utf7_decode_local.php');
 require_once('../functions/array.php');
 require_once('../functions/strings.php');
+require_once('../functions/html.php');
 
 global $allow_thread_sort;
 
 
 global $allow_thread_sort;
 
@@ -211,12 +212,12 @@ elseif ($submit == 'delete') {
 
 do_hook('search_before_form');
 
 
 do_hook('search_before_form');
 
-echo "<BR>\n".
-     "<table width=\"100%\">\n".
-        "<TR><td bgcolor=\"$color[0]\">\n".
-            "<CENTER><B>" . _("Search") . "</B></CENTER>\n".
-        "</TD></TR>\n".
-     "</TABLE>\n";
+echo "<br>\n".
+     html_tag( 'table',
+         html_tag( 'tr', "\n" .
+             html_tag( 'td', '<b>' . _("Search") . '</b>', 'center', $color[0] )
+         ) ,
+     '', '', 'width="100%"') . "\n";
 
 /*  update the recent and saved searches from the pref files  */
 $attributes = get_recent($username, $data_dir);
 
 /*  update the recent and saved searches from the pref files  */
 $attributes = get_recent($username, $data_dir);
@@ -226,47 +227,55 @@ $count_all = 0;
 
 /* Saved Search Table */
 if ($saved_count > 0) {
 
 /* Saved Search Table */
 if ($saved_count > 0) {
-    echo "<BR>\n"
-    . "<TABLE WIDTH=\"95%\" BGCOLOR=\"$color[9]\" ALIGN=\"CENTER\" CELLPADDING=1 CELLSPACING=1>"
-    . '<TR><TD align=center><B>Saved Searches</B></TD></TR><TR><TD>'
-    . '<TABLE WIDTH="100%" ALIGN="CENTER" CELLPADDING=0 CELLSPACING=0>';
+    echo "<br>\n"
+    . html_tag( 'table', '', 'center', $color[9], 'width="95%" cellpadding="1" cellspacing="1" border="0"' )
+    . html_tag( 'tr',
+          html_tag( 'td', '<b>Saved Searches</b>', 'center' )
+      )
+    . html_tag( 'tr' )
+    . html_tag( 'td' )
+    . html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"' );
     for ($i=0; $i < $saved_count; ++$i) {
         if ($i % 2) {
     for ($i=0; $i < $saved_count; ++$i) {
         if ($i % 2) {
-            echo "<TR BGCOLOR=\"$color[0]\">";
+            echo html_tag( 'tr', '', '', $color[0] );
         } else {
         } else {
-            echo "<TR BGCOLOR=\"$color[4]\">";
+            echo html_tag( 'tr', '', '', $color[4] );
         }
         }
-        echo "<TD WIDTH=\"35%\">".$saved_attributes['saved_folder'][$i]."</TD>"
-        . "<TD ALIGN=LEFT>".$saved_attributes['saved_what'][$i]."</TD>"
-        . "<TD ALIGN=CENTER>".$saved_attributes['saved_where'][$i]."</TD>"
-        . '<TD ALIGN=RIGHT>'
-        .   '<A HREF=search.php'
+        echo html_tag( 'td', $saved_attributes['saved_folder'][$i], 'left', '', 'width="35%"' )
+        . html_tag( 'td', $saved_attributes['saved_what'][$i], 'left' )
+        . html_tag( 'td', $saved_attributes['saved_where'][$i], 'center' )
+        . html_tag( 'td', '', 'right' )
+        .   '<a href=search.php'
         .     '?mailbox=' . urlencode($saved_attributes['saved_folder'][$i])
         .     '&amp;what=' . urlencode($saved_attributes['saved_what'][$i])
         .     '&amp;where=' . urlencode($saved_attributes['saved_where'][$i])
         .     '?mailbox=' . urlencode($saved_attributes['saved_folder'][$i])
         .     '&amp;what=' . urlencode($saved_attributes['saved_what'][$i])
         .     '&amp;where=' . urlencode($saved_attributes['saved_where'][$i])
-        .   '>' . _("edit") . '</A>'
+        .   '>' . _("edit") . '</a>'
         .   '&nbsp;|&nbsp;'
         .   '&nbsp;|&nbsp;'
-        .   '<A HREF=search.php'
+        .   '<a href=search.php'
         .     '?mailbox=' . urlencode($saved_attributes['saved_folder'][$i])
         .     '&amp;what=' . urlencode($saved_attributes['saved_what'][$i])
         .     '&amp;where=' . urlencode($saved_attributes['saved_where'][$i])
         .     '&amp;submit=Search_no_update'
         .     '?mailbox=' . urlencode($saved_attributes['saved_folder'][$i])
         .     '&amp;what=' . urlencode($saved_attributes['saved_what'][$i])
         .     '&amp;where=' . urlencode($saved_attributes['saved_where'][$i])
         .     '&amp;submit=Search_no_update'
-        .   '>' . _("search") . '</A>'
+        .   '>' . _("search") . '</a>'
         .   '&nbsp;|&nbsp;'
         .   '&nbsp;|&nbsp;'
-        .   "<A HREF=search.php?count=$i&amp;submit=delete>"
+        .   "<a href=search.php?count=$i&amp;submit=delete>"
         .     _("delete")
         .     _("delete")
-        .   '</A>'
-        . '</TD></TR>';
+        .   '</a>'
+        . '</td></tr>';
     }
     }
-    echo "</TABLE></TD></TR></TABLE>\n";
+    echo "</table></td></tr></table>\n";
 }
 
 /* Recent Search Table */
 if ($recent_count > 0) {
 }
 
 /* Recent Search Table */
 if ($recent_count > 0) {
-    echo "<BR>\n"
-       . "<TABLE WIDTH=\"95%\" BGCOLOR=\"$color[9]\" ALIGN=\"CENTER\" CELLPADDING=1 CELLSPACING=1>\n"
-       . '<TR><TD ALIGN=CENTER><B>' . _("Recent Searches") . '</B></TD></TR><TR><TD>'
-       . '<TABLE WIDTH="100%" ALIGN="CENTER" CELLPADDING=0 CELLSPACING=0>';
+    echo "<br>\n"
+       . html_tag( 'table', '', 'center', $color[9], 'width="95%" cellpadding="1" cellspacing="1" border="0"' )
+       . html_tag( 'tr',
+             html_tag( 'td', '<b>' . _("Recent Searches") . '</b>', 'center' )
+         )
+       . html_tag( 'tr' )
+       . html_tag( 'td' )
+       . html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="0" cellspacing="0" border="0"' );
     for ($i=1; $i <= $recent_count; ++$i) {
             if (isset($attributes['search_folder'][$i])) { 
             if ($attributes['search_folder'][$i] == "") {
     for ($i=1; $i <= $recent_count; ++$i) {
             if (isset($attributes['search_folder'][$i])) { 
             if ($attributes['search_folder'][$i] == "") {
@@ -274,42 +283,43 @@ if ($recent_count > 0) {
             }
             }
             if ($i % 2) {
             }
             }
             if ($i % 2) {
-                echo "<TR BGCOLOR=\"$color[0]\">";
+                echo html_tag( 'tr', '', '', $color[0] );
             } else {
             } else {
-                echo "<TR BGCOLOR=\"$color[4]\">";
+                echo html_tag( 'tr', '', '', $color[0] );
             }
             if (isset($attributes['search_what'][$i]) &&
                 !empty($attributes['search_what'][$i])) {
             }
             if (isset($attributes['search_what'][$i]) &&
                 !empty($attributes['search_what'][$i])) {
-            echo "<TD WIDTH=35%>".$attributes['search_folder'][$i]."</TD>"
-               . "<TD ALIGN=LEFT>".$attributes['search_what'][$i]."</TD>"
-               . "<TD ALIGN=CENTER>".$attributes['search_where'][$i]."</TD>"
-               . '<TD ALIGN=RIGHT>'
-               .   "<A HREF=search.php?count=$i&amp;submit=save>"
+            echo html_tag( 'td', $attributes['search_folder'][$i], 'left', '', 'width="35%"' )
+               . html_tag( 'td', $attributes['search_what'][$i], 'left' )
+               . html_tag( 'td', $attributes['search_where'][$i], 'center' )
+               . html_tag( 'td', '', 'right' )
+               .   "<a href=search.php?count=$i&amp;submit=save>"
                .     _("save")
                .     _("save")
-               .   '</A>'
+               .   '</a>'
                .   '&nbsp;|&nbsp;'
                .   '&nbsp;|&nbsp;'
-               .   '<A HREF=search.php'
+               .   '<a href=search.php'
                .     '?mailbox=' . urlencode($attributes['search_folder'][$i])
                .     '&amp;what=' . urlencode($attributes['search_what'][$i])
                .     '&amp;where=' . urlencode($attributes['search_where'][$i])
                .     '&amp;submit=Search_no_update'
                .     '?mailbox=' . urlencode($attributes['search_folder'][$i])
                .     '&amp;what=' . urlencode($attributes['search_what'][$i])
                .     '&amp;where=' . urlencode($attributes['search_where'][$i])
                .     '&amp;submit=Search_no_update'
-               .   '>' . _("search") . '</A>'
+               .   '>' . _("search") . '</a>'
                .   '&nbsp;|&nbsp;'
                .   '&nbsp;|&nbsp;'
-               .   "<A HREF=search.php?count=$i&amp;submit=forget>"
+               .   "<a href=search.php?count=$i&amp;submit=forget>"
                .     _("forget")
                .     _("forget")
-               .   '</A>'
-               . '</TD></TR>';
+               .   '</a>'
+               . '</td></tr>';
         }
         }
         }
         }
-    echo '</TABLE></TD></TR></TABLE><BR>';
+    echo '</table></td></tr></table><br>';
 }
 
 /* Search Form */
 }
 
 /* Search Form */
-echo '<B>' . _("Current Search") . '</B>'
-   . '<FORM ACTION="search.php" NAME=s>'
-   . '   <TABLE WIDTH="95%" CELLPADDING=0 CELLSPACING=0>'
-   . '     <TR>'
-   . '       <TD><SELECT NAME="mailbox">';
+echo html_tag( 'div', '<b>' . _("Current Search") . '</b>', 'left' ) . "\n"
+   . '<form action="search.php" name="s">'
+   . html_tag( 'table', '', '', '', 'width="95%" cellpadding="0" cellspacing="0" border="0"' )
+   . html_tag( 'tr' )
+   . html_tag( 'td', '', 'left' )
+   . '<select name="mailbox">';
 for ($i = 0; $i < count($boxes); $i++) {
     if (!in_array('noselect', $boxes[$i]['flags'])) {
         $box = $boxes[$i]['unformatted'];
 for ($i = 0; $i < count($boxes); $i++) {
     if (!in_array('noselect', $boxes[$i]['flags'])) {
         $box = $boxes[$i]['unformatted'];
@@ -318,22 +328,18 @@ for ($i = 0; $i < count($boxes); $i++) {
         if( $box2 == 'INBOX' ) {
             $box2 = _("INBOX");
         }
         if( $box2 == 'INBOX' ) {
             $box2 = _("INBOX");
         }
-        if ($mailbox == $box) {
-            echo "         <OPTION VALUE=\"$box\" SELECTED>$box2</OPTION>\n";
-        }
-        else {
-            echo "         <OPTION VALUE=\"$box\">$box2</OPTION>\n";
-        }
+        echo '         <option value="' . $box . '"';
+        if ($mailbox == $box) { echo ' selected'; }
+        echo '>' . $box2 . '</option>' . "\n";
     }
 }
     }
 }
-        echo "<OPTION VALUE=\"All Folders\"";
-        if ($mailbox == "All Folders") {
-            echo "SELECTED";
+        echo '<option value="All Folders"';
+        if ($mailbox == 'All Folders') {
+            echo ' selected';
         }
         }
-        echo ">All folders</OPTION>\n";
-echo '         </SELECT>'.
-     "       </TD>\n".
-     "        <TD ALIGN=\"CENTER\">\n";
+        echo ">All folders</option>\n";
+echo '         </select>'.
+     "       </td>\n";
 if ( !isset( $what ) ) {
     $what = '';
 }
 if ( !isset( $what ) ) {
     $what = '';
 }
@@ -346,25 +352,22 @@ $what_disp = str_replace(',', ' ', $what);
 $what_disp = str_replace('\\\\', '\\', $what_disp);
 $what_disp = str_replace('\\"', '"', $what_disp);
 $what_disp = str_replace('"', '&quot;', $what_disp);
 $what_disp = str_replace('\\\\', '\\', $what_disp);
 $what_disp = str_replace('\\"', '"', $what_disp);
 $what_disp = str_replace('"', '&quot;', $what_disp);
-echo "          <INPUT TYPE=\"TEXT\" SIZE=\"35\" NAME=\"what\" VALUE=\"$what_disp\">\n".
-     "        </TD>\n".
-     "<TD ALIGN=\"RIGHT\">\n".
-     "<SELECT NAME=\"where\">";
+echo html_tag( 'td', '<input type="text" size="35" name="what" value="' . $what_disp . '">' . "\n", 'center' )
+     . html_tag( 'td', '', 'right' )
+     . "<select name=\"where\">";
 s_opt( 'BODY', $where, _("Body") );
 s_opt( 'TEXT', $where, _("Everywhere") );
 s_opt( 'SUBJECT', $where, _("Subject") );
 s_opt( 'FROM', $where, _("From") );
 s_opt( 'CC', $where, _("Cc") );
 s_opt( 'TO', $where, _("To") );
 s_opt( 'BODY', $where, _("Body") );
 s_opt( 'TEXT', $where, _("Everywhere") );
 s_opt( 'SUBJECT', $where, _("Subject") );
 s_opt( 'FROM', $where, _("From") );
 s_opt( 'CC', $where, _("Cc") );
 s_opt( 'TO', $where, _("To") );
-echo "         </SELECT>\n" .
-     "        </TD>\n".
-     "       <TD COLSPAN=\"3\" ALIGN=\"CENTER\">\n".
-     "         <INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"" . _("Search") . "\">\n".
-     "       </TD>\n".
-     "     </TR>\n".
-     "</FORM>\n".
-     "   </TABLE>\n".
-     "</TD></TR></TABLE>\n";
+echo "         </select>\n" .
+     "        </td>\n".
+     html_tag( 'td', '<input type="submit" name="submit" value="' . _("Search") . '">' . "\n", 'center', '', 'colspan="3"' ) .
+     "     </tr>\n".
+     "</form>\n".
+     "   </table>\n".
+     "</td></tr></table>\n";
 
 
 do_hook('search_after_form');
 
 
 do_hook('search_after_form');
@@ -383,9 +386,9 @@ if ($allow_thread_sort == TRUE) {
 if ($search_all == 'all') {
     $mailbox == '';
     $boxcount = count($boxes);
 if ($search_all == 'all') {
     $mailbox == '';
     $boxcount = count($boxes);
-    echo '<BR><CENTER><B>' .
+    echo '<br><center><b>' .
          _("Search Results") .
          _("Search Results") .
-         "</B><CENTER><BR>\n";
+         "</b><center><br>\n";
     for ($x=0;$x<$boxcount;$x++) {
         if (!in_array('noselect', $boxes[$x]['flags'])) {
             $mailbox = $boxes[$x]['unformatted'];
     for ($x=0;$x<$boxcount;$x++) {
         if (!in_array('noselect', $boxes[$x]['flags'])) {
             $mailbox = $boxes[$x]['unformatted'];
@@ -412,9 +415,8 @@ if ($search_all == 'all') {
 /*  search one folder option  */
 else {
     if (($submit == _("Search") || $submit == 'Search_no_update') && !empty($what)) {
 /*  search one folder option  */
 else {
     if (($submit == _("Search") || $submit == 'Search_no_update') && !empty($what)) {
-        echo '<BR><CENTER><B>' .
-             _("Search Results") .
-             "</B></CENTER>\n";
+        echo '<br>'
+        . html_tag( 'div', '<b>' . _("Search Results") . '</b>', 'center' ) . "\n";
         sqimap_mailbox_select($imapConnection, $mailbox);
         sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all);
     }
         sqimap_mailbox_select($imapConnection, $mailbox);
         sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all);
     }
@@ -422,7 +424,8 @@ else {
 
 /*  must have search terms to search  */
 if ($submit == _("Search") && empty($what)) {
 
 /*  must have search terms to search  */
 if ($submit == _("Search") && empty($what)) {
-    echo "<BR><CENTER><B>Please enter something to search for</B></CENTER>\n";
+        echo '<br>'
+        . html_tag( 'div', '<b>Please enter something to search for</b>', 'center' ) . "\n";
 }
 
 $allow_thread_sort = $old_value;
 }
 
 $allow_thread_sort = $old_value;
index 1b095056580fd703c43998d527f64de28f18595e..9bf32180d1a51dd6c67e47bb6f0252d1f75b8249 100644 (file)
@@ -15,6 +15,7 @@ require_once('../src/validate.php');
 require_once('../functions/prefs.php');
 require_once('../functions/plugin.php');
 require_once('../functions/strings.php');
 require_once('../functions/prefs.php');
 require_once('../functions/plugin.php');
 require_once('../functions/strings.php');
+require_once('../functions/html.php');
 
 /* Erase any lingering attachments */
 if (isset($attachments) && is_array($attachments) 
 
 /* Erase any lingering attachments */
 if (isset($attachments) && is_array($attachments) 
@@ -52,42 +53,38 @@ if ($signout_page) {
     exit; /* we send no content if we're redirecting. */
 }
 ?>
     exit; /* we send no content if we're redirecting. */
 }
 ?>
-<HTML>
-   <HEAD>
+<html>
+   <head>
 <?php
     if ($theme_css != '') {
 ?>
 <?php
     if ($theme_css != '') {
 ?>
-<LINK REL="stylesheet" TYPE="text/css" HREF="<?php echo $theme_css ?>">
+<link rel="stylesheet" type="text/css" href="<?php echo $theme_css ?>">
 <?php
     }
 ?>
 <?php
     }
 ?>
-<TITLE><?php echo $org_title ?> - Signout</TITLE>
-</HEAD>
-<BODY TEXT="<?php echo $color[8] ?>" BGCOLOR="<?php echo $color[4] ?>" 
-LINK="<?php echo $color[7] ?>" VLINK="<?php echo $color[7] ?>"
-ALINK="<?php echo $color[7] ?>">
-<BR><BR>
-<TABLE BGCOLOR="<?php echo $color[4]; ?>" BORDER="0" COLS="1" WIDTH="50%" CELLSPACING="0" 
-CELLPADDING="2" ALIGN="CENTER">
-  <TR BGCOLOR="<?php echo $color[0] ?>" WIDTH="100%">
-    <TD ALIGN="CENTER">
-      <B><?php echo _("Sign Out") ?></B>
-    </TD>
-  </TR>
-  <TR BGCOLOR="<?php echo $color[4] ?>" WIDTH="100%">
-    <TD ALIGN="CENTER">
-      <?php do_hook('logout_above_text'); ?>
-      <?php echo _("You have been successfully signed out.") ?><BR>
-      <A HREF="login.php" TARGET="<?php echo $frame_top ?>">
-      <?php echo _("Click here to log back in.") ?>
-      </A><BR><BR>
-    </TD>
-  </TR>
-  <TR BGCOLOR="<?php echo $color[0] ?>" WIDTH="100%">
-    <TD ALIGN="CENTER">
-      <BR>
-    </TD>
-  </TR>
-</TABLE>
-</BODY>
-</HTML>
\ No newline at end of file
+<title><?php echo $org_title ?> - Signout</title>
+</head>
+<body text="<?php echo $color[8] ?>" bgcolor="<?php echo $color[4] ?>" 
+link="<?php echo $color[7] ?>" vlink="<?php echo $color[7] ?>"
+alink="<?php echo $color[7] ?>">
+<br><br>
+<?
+do_hook('logout_above_text');
+echo
+html_tag( 'table',
+    html_tag( 'tr',
+         html_tag( 'td', '<b>'. _("Sign Out") . '</b>', 'center' ) ,
+    '', $color[0], 'width="100%"' ) .
+    html_tag( 'tr',
+         html_tag( 'td', _("You have been successfully signed out.") .
+             '<br><a href="login.php" target="' . $frame_to . '"><br>' .
+             _("Click here to log back in.") . '</a><br><br>' ,
+         'center' ) ,
+    '', $color[4], 'width="100%"' ) .
+    html_tag( 'tr',
+         html_tag( 'td', '<br>', 'center' ) ,
+    '', $color[0], 'width="100%"' ) ,
+'center', $color[4], 'width="50%" cols="1" cellpadding="2" cellspacing="0" border="0"' )
+?>
+</body>
+</html>
\ No newline at end of file
index e6343006b2804e278a9a9cea0d44219db3cc6a68..bf9d46f1c499df8a1268b6eb89205660264443e9 100644 (file)
@@ -23,11 +23,12 @@ sqimap_mailbox_select($imapConnection, $mailbox);
 
 displayPageHeader($color, 'None');
 
 
 displayPageHeader($color, 'None');
 
-echo '<br><table width="100%" border="0" cellspacing="0" cellpadding="2" ' .
-            'align="center">' . "\n" .
-        '<tr><td bgcolor="' . $color[0] . '">' .
+echo '<br>' .
+    html_tag( 'table', '', 'center', '', 'width="100%" border="0" cellspacing="0" cellpadding="2"' ) ."\n" .
+    html_tag( 'tr' ) . "\n" .
+    html_tag( 'td', '', 'left', $color[0] ) .
         '<b><center>' .
         '<b><center>' .
-        _("Viewing a Business Card") . " - ";
+        _("Viewing a Business Card") . ' - ';
 if (isset($where) && isset($what)) {
     // from a search
     echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
 if (isset($where) && isset($what)) {
     // from a search
     echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
@@ -70,9 +71,12 @@ if ($vcard_nice['version'] == '2.1') {
     $vcard_nice["lastname"] = substr($vcard_nice["n"], 0,
         strpos($vcard_nice["n"], "\n"));
 } else {
     $vcard_nice["lastname"] = substr($vcard_nice["n"], 0,
         strpos($vcard_nice["n"], "\n"));
 } else {
-    echo '<tr><td align=center>vCard Version ' . $vcard_nice['version'] .
-        ' is not supported.  Some information might not be converted ' .
-    "correctly.</td></tr>\n";
+    echo html_tag( 'tr',
+               html_tag( 'td', 'vCard Version ' . $vcard_nice['version'] .
+                    ' is not supported.  Some information might not be converted ' .
+                    'correctly.' ,
+               'center' )
+           ) . "\n";
 }
 
 foreach ($vcard_nice as $k => $v) {
 }
 
 foreach ($vcard_nice as $k => $v) {
@@ -94,16 +98,16 @@ $ShowValues = array(
     'tel;fax' =>        _("Fax"),
     'note' =>           _("Note"));
 
     'tel;fax' =>        _("Fax"),
     'note' =>           _("Note"));
 
-echo '<tr><td><br>' .
-        '<TABLE border=0 cellpadding=2 cellspacing=0 align=center>' . "\n";
+echo html_tag( 'tr' ) . html_tag( 'td', '', 'left' ) . '<br>' .
+        html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0"' ) . "\n";
 
 
-if (isset($vcard_safe['email;internet'])) {     $vcard_safe['email;internet'] = '<A HREF="../src/compose.php?send_to=' .
+if (isset($vcard_safe['email;internet'])) {     $vcard_safe['email;internet'] = '<a href="../src/compose.php?send_to=' .
         $vcard_safe['email;internet'] . '">' . $vcard_safe['email;internet'] .
         $vcard_safe['email;internet'] . '">' . $vcard_safe['email;internet'] .
-        '</A>';
+        '</a>';
 }
 if (isset($vcard_safe['url'])) {
 }
 if (isset($vcard_safe['url'])) {
-    $vcard_safe['url'] = '<A HREF="' . $vcard_safe['url'] . '">' .
-        $vcard_safe['url'] . '</A>';
+    $vcard_safe['url'] = '<a href="' . $vcard_safe['url'] . '">' .
+        $vcard_safe['url'] . '</a>';
 }
 
 foreach ($ShowValues as $k => $v) {
 }
 
 foreach ($ShowValues as $k => $v) {
@@ -116,21 +120,29 @@ foreach ($ShowValues as $k => $v) {
 echo '</table>' .
         '<br>' .
         '</td></tr></table>' .
 echo '</table>' .
         '<br>' .
         '</td></tr></table>' .
-        '<table width="100%" border="0" cellspacing="0" cellpadding="2" ' .
-        'align="center">' .
-        '<tr>' .
-        '<td bgcolor="' . $color[0] . '">' .
-        '<b><center>' .
-        _("Add to Addressbook") .
-        '</td></tr>' .
-        '<tr><td align=center>' .
-        '<FORM ACTION="../src/addressbook.php" METHOD="POST" NAME=f_add>' .
-        '<table border=0 cellpadding=2 cellspacing=0 align=center>' .
-        '<tr><td align=right><b>Nickname:</b></td>' .
-        '<td><input type=text name="addaddr[nickname]" size=20 value="' .
-        $vcard_safe['firstname'] . '-' . $vcard_safe['lastname'] .
-        '"></td></tr>' .
-        '<tr><td align=right><b>Note Field Contains:</b></td><td>' .
+        html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0" width="100%"' ) . "\n";
+        html_tag( 'tr',
+            html_tag( 'td',
+                '<b><center>' .
+                _("Add to Addressbook") . '</b></center>' ,
+            'left', $color[0] )
+        ) .
+        html_tag( 'tr' ) .
+        html_tag( 'td', '', 'center' ) .
+        '<form action="../src/addressbook.php" method="post" name="f_add">' .
+        html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0" width="100%"' ) .
+        html_tag( 'tr',
+            html_tag( 'td',
+                '<b>Nickname:</b>' ,
+            'right' ) .
+            html_tag( 'td',
+                '<input type=text name="addaddr[nickname]" size=20 value="' .
+                $vcard_safe['firstname'] . '-' . $vcard_safe['lastname'] . '">' ,
+            'left' )
+        ) .
+        html_tag( 'tr' ) .
+        html_tag( 'td', '<b>Note Field Contains:</b>', 'right' ) .
+        html_tag( 'td', '', 'left' ) .
         '<select name="addaddr[label]">';
 
 if (isset($vcard_nice['url'])) {
         '<select name="addaddr[label]">';
 
 if (isset($vcard_nice['url'])) {
@@ -176,29 +188,36 @@ if (isset($vcard_nice['note'])) {
 }
 echo '</select>' .
         '</td></tr>' .
 }
 echo '</select>' .
         '</td></tr>' .
-        '<tr><td colspan=2 align=center>' .
-        '<INPUT NAME="addaddr[email]" type=hidden value="' .
-        htmlspecialchars($vcard_nice['email;internet']) . '">' .
-        '<INPUT NAME="addaddr[firstname]" type=hidden value="' .
-        $vcard_safe['firstname'] . '">' .
-        '<INPUT NAME="addaddr[lastname]" type=hidden value="' .
-        $vcard_safe['lastname'] . '">' .
-        '<INPUT TYPE=submit NAME="addaddr[SUBMIT]" ' .
-        'VALUE="Add to Address Book">' .
-        '</td></tr>' .
+        html_tag( 'tr',
+            html_tag( 'td',
+                '<input name="addaddr[email]" type=hidden value="' .
+                htmlspecialchars($vcard_nice['email;internet']) . '">' .
+                '<input name="addaddr[firstname]" type=hidden value="' .
+                $vcard_safe['firstname'] . '">' .
+                '<input name="addaddr[lastname]" type=hidden value="' .
+                $vcard_safe['lastname'] . '">' .
+                '<input type="submit" name="addaddr[SUBMIT]" ' .
+                'value="Add to Address Book">' ,
+            'center', '', 'colspan="2"' )
+        ) .
         '</table>' .
         '</table>' .
-        '</FORM>' .
+        '</form>' .
         '</td></tr>' .
         '</td></tr>' .
-        '<tr><td align=center>' .
-        '<a href="../src/download.php?absolute_dl=true&amp;passed_id=' .
-        $passed_id . '&amp;mailbox=' . urlencode($mailbox) .
-        '&amp;passed_ent_id=' . $passed_ent_id . '">' .
-        _("Download this as a file") . '</A>' .
-        '</TD></TR></TABLE>' .
-
-        '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
-        '<TR><TD BGCOLOR="' . $color[4] . '">' .
-        '</TD></TR></TABLE>' .
+        html_tag( 'tr',
+            html_tag( 'td',
+                '<a href="../src/download.php?absolute_dl=true&amp;passed_id=' .
+                $passed_id . '&amp;mailbox=' . urlencode($mailbox) .
+                '&amp;passed_ent_id=' . $passed_ent_id . '">' .
+                _("Download this as a file") . '</a>' ,
+            'center' )
+        ) .
+        '</table>' .
+
+        html_tag( 'table',
+            html_tag( 'tr',
+                html_tag( 'td', '&nbsp;', 'left', $color[4] )
+            ) ,
+        'center', '', 'border="0" cellspacing="0" cellpadding="2"' ) .
         '</body></html>';
 
 ?>
         '</body></html>';
 
 ?>
index 0220d843a86f9004a4679dec33b5606c128aa62f..34008cff68fbce9bc68ccd84dd25bd2e7ebac2e6 100644 (file)
@@ -44,13 +44,22 @@ if ($my_language != $squirrelmail_language) {
 set_up_language(getPref($data_dir, $username, 'language'));
 
 echo "<html><head>\n" .
 set_up_language(getPref($data_dir, $username, 'language'));
 
 echo "<html><head>\n" .
-     "<TITLE>$org_title</TITLE>";
+     "<title>$org_title</title>";
 
 $left_size = getPref($data_dir, $username, 'left_size');
 $location_of_bar = getPref($data_dir, $username, 'location_of_bar');
 
 $left_size = getPref($data_dir, $username, 'left_size');
 $location_of_bar = getPref($data_dir, $username, 'location_of_bar');
+
+if (strtolower($languages[$squirrelmail_language]['DIR']) == 'rtl') {
+    $temp_location_of_bar = 'right';
+} else {
+    $temp_location_of_bar = 'left';
+}
+
 if ($location_of_bar == '') {
 if ($location_of_bar == '') {
-    $location_of_bar = 'left';
+    $location_of_bar = $temp_location_of_bar;
 }
 }
+$temp_location_of_bar = '';
+
 if ($left_size == "") {
     if (isset($default_left_size)) {
          $left_size = $default_left_size;
 if ($left_size == "") {
     if (isset($default_left_size)) {
          $left_size = $default_left_size;
@@ -61,10 +70,10 @@ if ($left_size == "") {
 }
 
 if ($location_of_bar == 'right') {
 }
 
 if ($location_of_bar == 'right') {
-    echo "<FRAMESET COLS=\"*, $left_size\" BORDER=0 ID=fs1>";
+    echo "<frameset cols=\"*, $left_size\" border=\"0\" id=\"fs1\">";
 }
 else {
 }
 else {
-    echo "<FRAMESET COLS=\"$left_size, *\" BORDER=0 ID=fs1>";
+    echo "<frameset cols=\"$left_size, *\" border=\"0\" id=\"fs1\">";
 }
 
 /*
 }
 
 /*