XHTML fixes
[squirrelmail.git] / plugins / newmail / setup.php
index d925f57fc191da52b9bf4d11b7a68be321ce75f7..c0c05c73c1ecdc740590e0419b3dad113a6bb5db 100644 (file)
     * too (with a plugin).
     *
     * $Id$
+    * @package plugins
+    * @subpackage newmail
+    */
+
+    /**
     */
     include_once(SM_PATH . 'functions/display_messages.php');
 
@@ -73,9 +78,8 @@
        // Gets added to the user's OPTIONS page.
        global $optpage_blocks;
 
-       if ( !soupNazi() ) {
-
-           /* Register Squirrelspell with the $optionpages array. */
+       if ( checkForJavascript() ) {
+       /* Register Squirrelspell with the $optionpages array. */
            $optpage_blocks[] = array(
                'name' => _("NewMail Options"),
                'url'  => SM_PATH . 'plugins/newmail/newmail_opt.php',
             }
 
             if ($totalNew > 0 && $newmail_enable == 'on' && $newmail_media != '' ) {
-                echo "<EMBED SRC=\"$newmail_media\" HIDDEN=TRUE AUTOSTART=TRUE>\n";
+                echo '<embed src="'.htmlspecialchars($newmail_media) .
+                    "\" hidden=\"true\" autostart=\"true\">\n";
             }
             if ($totalNew > 0 && $newmail_popup == 'on') {
-                echo "<SCRIPT LANGUAGE=\"JavaScript\">\n".
+                echo "<script language=\"JavaScript\">\n".
                     "<!--\n".
                     "function PopupScriptLoad() {\n".
-                        'window.open("'.sqm_baseuri().'plugins/newmail/newmail.php", "SMPopup",'.
+                        'window.open("'.sqm_baseuri().'plugins/newmail/newmail.php?numnew='.$totalNew.
+                                    '", "SMPopup",'.
                                      "\"width=200,height=130,scrollbars=no\");\n".
                         "if (BeforePopupScript != null)\n".
                             "BeforePopupScript();\n".
             }
         }
     }
-?>
+?>
\ No newline at end of file