5 ** Copyright (c) 1999-2001 The Squirrelmail Development Team
6 ** Licensed under the GNU GPL. For full terms see the file COPYING.
8 ** Displays all options relating to new mail sounds
15 require_once('../src/validate.php');
16 require_once("../functions/page_header.php");
17 require_once("../functions/display_messages.php");
18 require_once("../functions/imap.php");
19 require_once("../functions/array.php");
20 require_once("../src/load_prefs.php");
22 displayPageHeader($color, "None");
24 $media_enable = getPref($data_dir,$username,"newmail_enable");
25 if ($media_enable == '') {
26 $media_enable = 'FALSE';
29 $media_popup = getPref($data_dir, $username,"newmail_popup");
30 $media_allbox = getPref($data_dir,$username,"newmail_allbox");
31 $media_recent = getPref($data_dir,$username,"newmail_recent");
32 $media_changetitle = getPref($data_dir,$username,"newmail_changetitle");
34 $media = getPref($data_dir,$username,"newmail_media");
36 $media = "../plugins/newmail/sounds/Notify.wav";
41 <table width
=95% align
=center border
=0 cellpadding
=2 cellspacing
=0><tr
><td bgcolor
="<?php echo $color[0] ?>">
42 <center
><b
><?php
echo _("Options") ?
> - New Mail Notification v1
.2
</b
></center
>
45 Select
<b
>Enable Media Playing
</b
> to turn on playing a media file when
46 unseen mail is in your folders
. When enabled
, you can specify the media file to play in the provided
49 The
<b
>Check all boxes
, not just INBOX
</b
> option will check ALL of your
50 folders
for unseen mail
, not just the inbox
for notification
.<p
>
52 Selecting the
<b
>Show popup
</b
> option will enable the showing of a popup
53 window when unseen mail is in your
folders (requires JavaScript
).<p
>
55 Use the
<b
>Check RECENT
</b
> to only check
for messages that are recent
.
56 Recent messages are those that have just recently showed up
and have not
57 been
"viewed" or checked yet
. This can prevent being continuously annoyed
58 by sounds
or popups
for unseen mail
.<p
>
60 Selecting the
<b
>Change title
</b
> option will change the title in some
61 browsers to let you know when you have
new mail (requires JavaScript
, and
62 only works in IE but you won
't see errors with other browsers).
63 This will always tell you if you have new mail, even if you have
64 <b>Check RECENT</b> enabled.<p>
66 Select from the list of <b>server files</b> the media file to play when
67 new mail arrives. Selecting <b>local media</b> will play the file
68 specified in the <b>local media file</b> box to play from the local
69 computer. If no file is specified, the system will use a default from the
72 <form action="../../src/options.php" method=post>
73 <table width=100% cellpadding=0 cellspacing=2 border=0>
75 <td align=right nowrap> 
77 <input type=checkbox <?php
78 if($media_enable == "on") {
81 name=media_enable><b> Enable Media Playing</b>
85 <td align=right nowrap> 
87 <input type=checkbox <?php
88 if($media_allbox == "on") {
91 name=media_allbox><b> Check all boxes, not just INBOX</b>
95 <td align=right nowrap> 
97 <input type=checkbox <?php
98 if($media_recent == "on") {
101 name=media_recent><b> Count only messages that are RECENT</b>
105 <td align=right nowrap> 
107 <input type=checkbox <?php
108 if($media_changetitle == "on") {
111 name=media_changetitle><b> Change title on supported browsers.</b>
112 (requires IE and JavaScript to work)
116 <td align=right nowrap> 
118 <input type=checkbox <?php
119 if($media_popup == "on") {
122 name=media_popup><b> Show popup window on new mail</b>
123 (requires JavaScript to work)
127 <td align=right nowrap>Select server file:
129 <SELECT NAME=media_sel><?php
131 echo "<OPTION VALUE=\"(local media)\">(local media)";
133 // Iterate sound files for options
135 $d = dir("../plugins/newmail/sounds");
136 while($entry=$d->read()) {
137 $fname = $d->path . "/" . $entry;
138 if ($entry != ".." && $entry != ".") {
140 if ($fname == $media) {
143 echo "VALUE=\"" . $fname . "\">" . $entry . "\n";
150 <input type="submit" value=" Try " name="test" onClick="
151 window.open('testsound
.php?sound
='+media_sel.options[media_sel.selectedIndex].value, 'TestSound
',
152 'width
=150,height
=30,scrollbars
=no
');
158 <td align=right nowrap>Local Media File :
160 <input type=file size=40 name=media_file>
164 <td align=right nowrap>Current File:
166 <input type=hidden value=\"" <?php echo $media; ?>
168 <?php echo $media; ?>
174 <input type="submit" value="Submit" name="submit_newmail">