Browse Source

XHTML fixes

Fredrik Jervfors 21 years ago
parent
commit
1c290fe8e1

+ 2 - 2
functions/page_header.php

@@ -49,7 +49,7 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
     
     if ($squirrelmail_language == 'ja_JP') {
         echo "<!-- \xfd\xfe -->\n";
-        echo '<meta http-equiv="Content-type" content="text/html; charset=euc-jp">' . "\n";
+        echo '<meta http-equiv="Content-type" content="text/html; charset=euc-jp" />' . "\n";
     }
     
     if ($do_hook) {
@@ -347,7 +347,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
         echo "</td>\n";
     }
     echo "   </tr>\n".
-        "</table><br>\n\n";
+        "</table><br />\n\n";
 }
 
 /**

+ 25 - 25
plugins/squirrelspell/modules/check_me.mod

@@ -121,9 +121,9 @@ if ($sqspell_exitcode){
      . sprintf(_("I tried to execute '%s', but it returned:"),
                $sqspell_command) . "<pre>"
      . join("\n", htmlspecialchars($sqspell_output)) . "</pre>"
-     . "<form onsubmit=\"return false\">"
-     . "<input type=\"submit\" value=\"  " . _("Close")
-     . "  \" onclick=\"self.close()\"></form></div>";
+     . '<form onsubmit="return false">'
+     . '<input type="submit" value="  ' . _("Close")
+     . '  " onclick="self.close()" /></form></div>';
   sqspell_makeWindow(null, _("SquirrelSpell is misconfigured."), null, $msg);
   exit;
 }
@@ -225,7 +225,7 @@ if ($errors){
    * Check if there are user-defined stylesheets.
    */
   if ($theme_css != '') {
-    echo "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"$theme_css\">\n";
+    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$theme_css\" />\n";
   }
   /**
    * Load the spelling errors into JavaScript arrays
@@ -311,7 +311,7 @@ if ($errors){
    </tr>
    <tr>
     <td>
-      <hr>
+      <hr />
     </td>
    </tr>
    <tr>
@@ -365,7 +365,7 @@ if ($errors){
         </td>
         <td align="left">
          <input name="sqspell_oruse" size="15" value=""
-                onfocus="if(!this.value) this.value=document.forms[0].sqspell_error.value">
+                onfocus="if(!this.value) this.value=document.forms[0].sqspell_error.value" />
         </td>
         <td align="right">
          <?php
@@ -373,12 +373,12 @@ if ($errors){
          ?>
         </td>
         <td align="left">
-         <input name="sqspell_likethis" size=3 value="" onfocus="this.blur()">
+         <input name="sqspell_likethis" size=3 value="" onfocus="this.blur()" />
         </td>
        </tr>
         <!-- hello? What is this? </td></tr> -->
        <tr>
-        <td colspan="4"><hr></td>
+        <td colspan="4"><hr /></td>
        </tr>
        <tr>
         <td colspan="4">
@@ -406,21 +406,21 @@ if ($errors){
         </td>
        </tr>
        <tr>
-        <td colspan="4"><hr></td>
+        <td colspan="4"><hr /></td>
        </tr>
        <tr>
-	<td colspan="4" align="center" bgcolor="<?php echo $color[9] ?>">
-	 <?php
-	  echo '<input type="button" value="  '
-	    . _("Close and Commit")
-	    . '  " onclick="if (confirm(\''
-	    . _("The spellcheck is not finished. Really close and commit changes?")
-	    . '\')) sqspellCommitChanges()">'
-            . ' <input type="button" value="  '
-            . _("Close and Cancel")
-            . '  " onclick="if (confirm(\''
-            . _("The spellcheck is not finished. Really close and discard changes?")
-            . '\')) self.close()">';
+        <td colspan="4" align="center" bgcolor="<?php echo $color[9] ?>">
+         <?php
+             echo '<input type="button" value="  '
+                . _("Close and Commit")
+                . '  " onclick="if (confirm(\''
+                . _("The spellcheck is not finished. Really close and commit changes?")
+                . '\')) sqspellCommitChanges()" />'
+                . ' <input type="button" value="  '
+                . _("Close and Cancel")
+                . '  " onclick="if (confirm(\''
+                . _("The spellcheck is not finished. Really close and discard changes?")
+                . '\')) self.close()" />';
          ?>
         </td>
        </tr>
@@ -435,9 +435,9 @@ if ($errors){
   /**
    * AREN'T YOU SUCH A KNOW-IT-ALL!
    */
-  $msg="<form onsubmit=\"return false\"><div align=\"center\">"
-     . "<input type=\"submit\" value=\"  " . _("Close") 
-     . "  \" onclick=\"self.close()\"></div></form>";
+  $msg='<form onsubmit="return false"><div align="center">'.
+       '<input type="submit" value="  ' . _("Close") .
+       '  " onclick="self.close()" /></div></form>';
   sqspell_makeWindow(null, _("No errors found"), null, $msg);
 }
 
@@ -448,4 +448,4 @@ if ($errors){
  * End:
  * vim: syntax=php et ts=4
  */
-?>
+?>

+ 7 - 7
plugins/squirrelspell/modules/edit_dic.mod

@@ -58,9 +58,9 @@ if (!$words){
 	 . sprintf( _("%s dictionary"), $langs[$i] ) . '</th></tr>'
 	 . '<tr><td align="center">'
 	 . '<form method="post">'
-	 . '<input type="hidden" name="MOD" value="forget_me">'
+	 . '<input type="hidden" name="MOD" value="forget_me" />'
 	 . '<input type="hidden" name="sqspell_use_app" value="' 
-	 . $langs[$i] . '">'
+	 . $langs[$i] . '" />'
 	 . '<table border="0" width="95%" align="center">'
 	 . '<tr>'
 	 . "<td valign=\"top\">\n";
@@ -82,14 +82,14 @@ if (!$words){
 	  $msg .= "</td><td valign=\"top\">\n";
 	}
 	$msg .= "<input type=\"checkbox\" name=\"words_ary[]\" "
-	   . 'value="'.htmlspecialchars($words_ary[$j]). '"> '
-           . htmlspecialchars($words_ary[$j]) . "<br>\n";
+	   . 'value="'.htmlspecialchars($words_ary[$j]). '" /> '
+           . htmlspecialchars($words_ary[$j]) . "<br />\n";
       }
       $msg .= '</td></tr></table></td></tr>'
 	 . "<tr bgcolor=\"$color[0]\" align=\"center\"><td>"
 	 . '<input type="submit" value="' . _("Delete checked words") 
-	 . '"></form>'
-	 . '</td></tr><tr><td><hr>'
+	 . '" /></form>'
+	 . '</td></tr><tr><td><hr />'
 	 . "</td></tr>\n";
     }
   }
@@ -112,4 +112,4 @@ if (!$words){
  * vim: syntax=php
  */
 
-?>
+?>

+ 7 - 7
plugins/squirrelspell/modules/enc_setup.mod

@@ -53,14 +53,14 @@ if ($SQSPELL_CRYPTO){
         . _("If you forget your password, your personal dictionary will become unaccessible, since it can no longer be decrypted. If you change your mailbox password, SquirrelSpell will recognize it and prompt you for your old password in order to re-encrypt the dictionary with a new key.")
         . '</p>'
         . '<form method="post" onsubmit="return checkMe()">'
-        . '<input type="hidden" name="MOD" value="crypto">'
+        . '<input type="hidden" name="MOD" value="crypto" />'
         . '<p align="center"><input type="checkbox" name="action" '
-        . 'value="decrypt"> '
+        . 'value="decrypt" /> '
         . _("Please decrypt my personal dictionary and store it in a clear-text format." )
         . '</p>'
         . '<p align="center"><input type="submit" value=" '
         . _("Change crypto settings")
-        . ' "></p>'
+        . ' " /></p>'
         . '</form>';
 } else {
     /**
@@ -78,13 +78,13 @@ if ($SQSPELL_CRYPTO){
         . _("If you decide to encrypt your personal dictionary, you must remember that it gets &quot;hashed&quot; with your mailbox password. If you forget your mailbox password and the administrator changes it to a new value, your personal dictionary will become useless and will have to be created anew. However, if you or your system administrator change your mailbox password but you still have the old password at hand, you will be able to enter the old key to re-encrypt the dictionary with the new value.")
         . '</p>'
         . '<form method="post" onsubmit="return checkMe()">'
-        . '<input type="hidden" name="MOD" value="crypto">'
+        . '<input type="hidden" name="MOD" value="crypto" />'
         . '<p align="center"><input type="checkbox" name="action" '
-        . 'value="encrypt"> '
+        . 'value="encrypt" /> '
         . _("Please encrypt my personal dictionary and store it in an encrypted format.")
         . '</p>'
         . '<p align="center"><input type="submit" value=" '
-        . _("Change crypto settings") . ' "></p>'
+        . _("Change crypto settings") . ' " /></p>'
         . '</form>';
 }
 sqspell_makePage(_("Personal Dictionary Crypto Settings"), 
@@ -98,4 +98,4 @@ sqspell_makePage(_("Personal Dictionary Crypto Settings"),
  * vim: syntax=php
  */ 
 
-?>
+?>

+ 2 - 2
plugins/squirrelspell/modules/forget_me_not.mod

@@ -71,7 +71,7 @@ sqspell_writeWords($words_dic);
 $onload = "setTimeout('self.close()', 2000)";
 $msg = '<form onsubmit="return false"><div align="center">'
    . '<input type="submit" value="  '
-   . _("Close") . '  " onclick="self.close()"></div></form>';
+   . _("Close") . '  " onclick="self.close()" /></div></form>';
 sqspell_makeWindow($onload, _("Personal Dictionary Updated"), null, $msg);
 
 /**
@@ -82,4 +82,4 @@ sqspell_makeWindow($onload, _("Personal Dictionary Updated"), null, $msg);
  * vim: syntax=php
  */
 
-?>
+?>

+ 6 - 6
plugins/squirrelspell/modules/init.mod

@@ -21,8 +21,8 @@
  */
 $langs=sqspell_getSettings(null);
 $msg = '<form method="post">'
-  . '<input type="hidden" name="MOD" value="check_me">'
-  . '<input type="hidden" name="sqspell_text">'
+  . '<input type="hidden" name="MOD" value="check_me" />'
+  . '<input type="hidden" name="sqspell_text" />'
   . '<p align="center">';
 if (sizeof($langs)==1){ 
   /**
@@ -32,7 +32,7 @@ if (sizeof($langs)==1){
   $onload="sqspell_init(true)";
   $msg .= _("Please wait, communicating with the server...")
     . '</p>'
-    . "<input type=\"hidden\" name=\"sqspell_use_app\" value=\"$langs[0]\">";
+    . "<input type=\"hidden\" name=\"sqspell_use_app\" value=\"$langs[0]\" />";
 } else {
   /**
    * More than one dictionary. Let the user choose the dictionary first
@@ -50,7 +50,7 @@ if (sizeof($langs)==1){
     $msg .= " value=\"$langs[$i]\"> " . _($langs[$i]) . "</option>\n";
   }  
   $msg .= ' </select>'
-    . '<input type="submit" value="' . _("Go") . '">'
+    . '<input type="submit" value="' . _("Go") . '" />'
     . '</p>';
 }
 $msg .="</form>\n";
@@ -63,5 +63,5 @@ sqspell_makeWindow($onload, _("SquirrelSpell Initiating"), "init.js", $msg);
  * End:
  * vim: syntax=php
  */
-    
-?>
+ 
+?>

+ 4 - 4
plugins/squirrelspell/modules/lang_setup.mod

@@ -22,7 +22,7 @@ $msg = '<p>'
   . _("Please check any available international dictionaries which you would like to use when spellchecking:")
   . '</p>'
   . '<form method="post">'
-  . '<input type="hidden" name="MOD" value="lang_change">'
+  . '<input type="hidden" name="MOD" value="lang_change" />'
   . '<blockquote><p>';
 /**
  * Present a nice listing.
@@ -37,7 +37,7 @@ while (list($avail_lang, $junk) = each($SQSPELL_APP)){
   if (in_array($avail_lang, $langs)) {
     $msg .= ' checked';
   }
-  $msg .= '> ' . _($avail_lang) . "<br>\n";
+  $msg .= ' /> ' . _($avail_lang) . "<br />\n";
   $add .= "<option";
   if ($avail_lang==$langs[0]) {
     $add .= ' selected';
@@ -46,7 +46,7 @@ while (list($avail_lang, $junk) = each($SQSPELL_APP)){
 }
 $msg .= "</p>\n" . $add . "</select>\n";
 $msg .= "</p></blockquote><p><input type=\"submit\" value=\" " 
-  . _("Make these changes") . " \"></p>";
+  . _("Make these changes") . " \" /></p>";
 sqspell_makePage(_("Add International Dictionaries"), null, $msg); 
 
 /**
@@ -57,4 +57,4 @@ sqspell_makePage(_("Add International Dictionaries"), null, $msg);
  * vim: syntax=php
  */
  
-?>
+?>

+ 41 - 41
plugins/squirrelspell/setup.php

@@ -21,13 +21,13 @@
  * @return void
  */
 function squirrelmail_plugin_init_squirrelspell() {
-  global $squirrelmail_plugin_hooks;
-  $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] = 
-     'squirrelspell_setup';
-  $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] = 
-     'squirrelspell_optpage_register_block';
-  $squirrelmail_plugin_hooks['options_link_and_description']['squirrelspell'] =
-     'squirrelspell_options';
+    global $squirrelmail_plugin_hooks;
+    $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] = 
+        'squirrelspell_setup';
+    $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] = 
+        'squirrelspell_optpage_register_block';
+    $squirrelmail_plugin_hooks['options_link_and_description']['squirrelspell'] =
+        'squirrelspell_options';
 }
 
 /**
@@ -37,22 +37,22 @@ function squirrelmail_plugin_init_squirrelspell() {
  * @return void
  */
 function squirrelspell_optpage_register_block() {
-  global $optpage_blocks;
-  /**
-   * Check if this browser is capable of using the plugin
-   */
-  if (checkForJavascript()) {
+    global $optpage_blocks;
     /**
-     * The browser checks out.
-     * Register Squirrelspell with the $optionpages array. 
+     * Check if this browser is capable of using the plugin
      */
-    $optpage_blocks[] =
-       array(
-	     'name' => _("SpellChecker Options"),
-	     'url'  => '../plugins/squirrelspell/sqspell_options.php',
-	     'desc' => _("Here you may set up how your personal dictionary is stored, edit it, or choose which languages should be available to you when spell-checking."),
-	     'js'   => TRUE);
-  }
+    if (checkForJavascript()) {
+        /**
+         * The browser checks out.
+         * Register Squirrelspell with the $optionpages array. 
+         */
+        $optpage_blocks[] =
+            array(
+                'name' => _("SpellChecker Options"),
+                'url'  => '../plugins/squirrelspell/sqspell_options.php',
+                'desc' => _("Here you may set up how your personal dictionary is stored, edit it, or choose which languages should be available to you when spell-checking."),
+                'js'   => TRUE);
+    }
 }
 
 /**
@@ -62,26 +62,26 @@ function squirrelspell_optpage_register_block() {
  * @return void
  */
 function squirrelspell_setup() {
-  /**
-   * Check if this browser is capable of displaying SquirrelSpell
-   * correctly.
-   */
-  if (checkForJavascript()) {
     /**
-     * Some people may choose to disable javascript even though their
-     * browser is capable of using it. So these freaks don't complain,
-     * use document.write() so the "Check Spelling" button is not
-     * displayed if js is off in the browser.
+     * Check if this browser is capable of displaying SquirrelSpell
+     * correctly.
      */
-    echo "<script type=\"text/javascript\">\n"
-      . "<!--\n"
-      . 'document.write("<input type=\"button\" value=\"'
-      . _("Check Spelling") 
-      . '\" onclick=\"window.open(\'../plugins/squirrelspell/sqspell_'
-      . 'interface.php\', \'sqspell\', \'status=yes,width=550,height=370,'
-      . 'resizable=yes\')\">");' . "\n"
-      . "//-->\n"
-      . "</script>\n";
-  }
+    if (checkForJavascript()) {
+        /**
+         * Some people may choose to disable javascript even though their
+         * browser is capable of using it. So these freaks don't complain,
+         * use document.write() so the "Check Spelling" button is not
+         * displayed if js is off in the browser.
+         */
+        echo "<script type=\"text/javascript\">\n".
+             "<!--\n".
+             'document.write("<input type=\"button\" value=\"'.
+             _("Check Spelling").
+             '\" onclick=\"window.open(\'../plugins/squirrelspell/sqspell_'.
+             'interface.php\', \'sqspell\', \'status=yes,width=550,height=370,'.
+             'resizable=yes\')\" />");' . "\n".
+             "//-->\n".
+             "</script>\n";
+    }
 }
-?>
+?>

+ 11 - 11
plugins/squirrelspell/sqspell_functions.php

@@ -47,7 +47,7 @@ function sqspell_makePage($title, $scriptsrc, $body){
           html_tag( 'td', '<strong>' . $title .'</strong>', 'center', $color[9] )
       ) . "\n"
     . html_tag( 'tr', "\n" .
-          html_tag( 'td', '<hr>', 'left' )
+          html_tag( 'td', '<hr />', 'left' )
       ) . "\n"
     . html_tag( 'tr', "\n" .
           html_tag( 'td', $body, 'left' )
@@ -58,7 +58,7 @@ function sqspell_makePage($title, $scriptsrc, $body){
    */
   if ($MOD != "options_main"){ 
     echo html_tag( 'tr', "\n" .
-                html_tag( 'td', '<hr>', 'left' )
+                html_tag( 'td', '<hr />', 'left' )
             ) . "\n"
       . html_tag( 'tr', "\n" .
             html_tag( 'td', '<a href="sqspell_options.php">'
@@ -71,7 +71,7 @@ function sqspell_makePage($title, $scriptsrc, $body){
    * Close the table and display the version.
    */
   echo html_tag( 'tr', "\n" .
-              html_tag( 'td', '<hr>', 'left' )
+              html_tag( 'td', '<hr />', 'left' )
           ) . "\n"
     . html_tag( 'tr',
           html_tag( 'td', 'SquirrelSpell ' . $SQSPELL_VERSION, 'center', $color[9] )
@@ -103,7 +103,7 @@ function sqspell_makeWindow($onload, $title, $scriptsrc, $body){
    * Check if we have a defined css theme to use.
    */
   if ($theme_css != "") {
-    echo "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"$theme_css\">\n";
+    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$theme_css\" />\n";
   }
   /**
    * Link in the .js file if needed
@@ -129,13 +129,13 @@ function sqspell_makeWindow($onload, $title, $scriptsrc, $body){
               html_tag( 'td', '<strong>' . $title . '</strong>', 'center', $color[9] )
           ) . "\n" .
           html_tag( 'tr', "\n" .
-              html_tag( 'td', '<hr>', 'left' )
+              html_tag( 'td', '<hr />', 'left' )
           ) . "\n" .
           html_tag( 'tr', "\n" .
               html_tag( 'td', $body, 'left' )
           ) . "\n" .
           html_tag( 'tr', "\n" .
-              html_tag( 'td', '<hr>', 'left' )
+              html_tag( 'td', '<hr />', 'left' )
           ) . "\n" .
           html_tag( 'tr', "\n" .
               html_tag( 'td', 'SquirrelSpell ' . $SQSPELL_VERSION, 'center', $color[9] )
@@ -375,17 +375,17 @@ function sqspell_getWords(){
                  'left' ) .  "\n"
 	 . '<blockquote>' . "\n"
 	 . '<form method="post" onsubmit="return AYS()">' . "\n"
-	 . '<input type="hidden" name="MOD" value="crypto_badkey">' . "\n"
+	 . '<input type="hidden" name="MOD" value="crypto_badkey" />' . "\n"
 	 . html_tag( 'p',  "\n" .
-	       '<input type="checkbox" name="delete_words" value="ON">'
+	       '<input type="checkbox" name="delete_words" value="ON" />'
 	       . _("Delete my dictionary and start a new one") . '<br />'
 	       . _("Decrypt my dictionary with my old password:")
-	       . '<input name="old_key" size=\"10\">' ,
+	       . '<input name="old_key" size="10" />' ,
 	   'left' ) . "\n"
 	 . '</blockquote>' . "\n"
 	 . html_tag( 'p', "\n" .
 	       '<input type="submit" value="' 
-	       . _("Proceed") . ' &gt;&gt;">' ,
+	       . _("Proceed") . ' &gt;&gt;" />' ,
 	   'center' ) . "\n"
 	 . '</form>' . "\n";
       /**
@@ -537,4 +537,4 @@ function sqspell_ckMOD($rMOD){
  * stuff. :)
  */
 $SQSPELL_VERSION="v0.3.8";
-?>
+?>

+ 16 - 16
src/addrbook_popup.php

@@ -25,19 +25,19 @@ require_once(SM_PATH . 'functions/addressbook.php');
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
 
-<HTML>
-    <HEAD>
-        <TITLE><?php echo "$org_title: " . _("Address Book"); ?></TITLE>
-    </HEAD>
-    <FRAMESET ROWS="60,*" BORDER=0>
-        <FRAME NAME="abookmain"
-               MARGINWIDTH="0"
-               SCROLLING="NO"
-               BORDER="0"
-               SRC="addrbook_search.php?show=form">
-        <FRAME NAME="abookres"
-               MARGINWIDTH="0"
-               BORDER="0"
-              SRC="addrbook_search.php?show=blank">
-    </FRAMESET>
-</HTML>
+<html>
+    <head>
+        <title><?php echo "$org_title: " . _("Address Book"); ?></title>
+    </head>
+    <frameset rows="60,*" border=0>
+        <frame name="abookmain"
+               marginwidth="0"
+               scrolling="no"
+               border="0"
+               src="addrbook_search.php?show=form" />
+        <frame name="abookres"
+               marginwidth="0"
+               border="0"
+               src="addrbook_search.php?show=blank" />
+    </frameset>
+</html>

+ 1 - 1
themes/darkness.php

@@ -41,7 +41,7 @@ function Darkness_HeaderPlugin() {
    
    if (substr($PHP_SELF, -18) == '/src/left_main.php') {
       echo '<meta http-equiv="Page-Enter" content="' .
-         'blendTrans(Duration=2.0)">' . "\n";
+         'blendTrans(Duration=2.0)" />' . "\n";
    }
 	 
 ?><script language=javascript>