/**
** 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".
'<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();
'<tr>'.
'<td> </td>'.
'<td>'.
+ '<INPUT TYPE=HIDDEN NAME=optmode VALUE=submit>'.
'<input type="submit" value="' . _("Submit") . '" name="submit_newmail">'.
'</td>'.
'</tr>'.
'</td></tr></table>'.
'</body></html>';
-?>
\ No newline at end of file
+?>