Updated help files to reflect new functionality.
[squirrelmail.git] / plugins / newmail / newmail_opt.php
index d8ad6f49acb046a83d834e759335474180967400..5a2bd7148132238443a58065777dccecd88eff5a 100644 (file)
@@ -2,7 +2,8 @@
 
    /**
     **  newmails_opt.php
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
+    **
+    **  Copyright (c) 1999-2002 The SquirrelMail Project Team
     **  Licensed under the GNU GPL. For full terms see the file COPYING.
     **
     **  Displays all options relating to new mail sounds
 
     displayPageHeader($color, 'None');
 
-    $media_enable = getPref($data_dir,$username, 'newmail_enable');
-    if ($media_enable == '') {
-        $media_enable = 'FALSE';
-    }
-
+    $media_enable = getPref($data_dir,$username, 'newmail_enable', 'FALSE' );
     $media_popup = getPref($data_dir, $username,'newmail_popup');
     $media_allbox = getPref($data_dir,$username,'newmail_allbox');
     $media_recent = getPref($data_dir,$username,'newmail_recent');
     $media_changetitle = getPref($data_dir,$username,'newmail_changetitle');
-
-    $media = getPref($data_dir,$username,'newmail_media');
-    if ($media == '') {
-        $media = '../plugins/newmail/sounds/Notify.wav';
-    }
+    $media = getPref($data_dir,$username,'newmail_media', '../plugins/newmail/sounds/Notify.wav');
 
     echo '<br>' .
          "<table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor=\"$color[0]\">\n".
@@ -85,7 +78,7 @@ _("Select from the list of <b>server files</b> the media file to play when new m
     if ($media_changetitle == 'on') {
               echo 'checked ';
     }
-    echo 'name=media_changetitle><b> ' . _("Change title on supported browsers.") . '</b> &nbsp; (' . _("requires IE and JavaScript to work") . ')</td>'.
+    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>'.
@@ -98,19 +91,19 @@ _("Select from the list of <b>server files</b> the media file to play when new m
             '<tr>'.
                 '<td align=right nowrap>' . _("Select server file:") . '</td>'.
                 '<td><SELECT NAME=media_sel>'.
-                    '<OPTION VALUE="(local media)">' . _("(local media)");
+                    '<OPTION VALUE="(local media)">' . _("(local media)") . '</option>';
 
     // Iterate sound files for options
 
     $d = dir('../plugins/newmail/sounds');
     while($entry=$d->read()) {
         $fname = $d->path . "/" . $entry;
-        if ($entry != ".." && $entry != ".") {
+        if ($entry != '..' && $entry != '.') {
             echo "<OPTION ";
             if ($fname == $media) {
                 echo "SELECTED ";
             }
-            echo "VALUE=\"" . $fname . "\">" . $entry . "\n";
+            echo "VALUE=\"" . $fname . "\">" . $entry . "</option>\n";
         }
     }
     $d->close();
@@ -136,6 +129,7 @@ _("Select from the list of <b>server files</b> the media file to play when new m
          '<tr>'.
             '<td>&nbsp;</td>'.
             '<td>'.
+               '<INPUT TYPE=HIDDEN NAME=optmode VALUE=submit>'. 
                '<input type="submit" value="' . _("Submit") . '" name="submit_newmail">'.
             '</td>'.
          '</tr>'.
@@ -144,4 +138,4 @@ _("Select from the list of <b>server files</b> the media file to play when new m
    '</td></tr></table>'.
 '</body></html>';
 
-?>
\ No newline at end of file
+?>