5 ** Displays all options relating to new mail sounds
10 require_once('../src/validate.php');
11 require_once('../functions/page_header.php');
12 require_once('../functions/display_messages.php');
13 require_once('../functions/imap.php');
14 require_once('../functions/array.php');
15 require_once('../src/load_prefs.php');
17 displayPageHeader($color, "None");
19 $media_enable = getPref($data_dir,$username,"newmail_enable");
20 if ($media_enable == '') {
21 $media_enable = 'FALSE';
24 $media_popup = getPref($data_dir, $username,"newmail_popup");
25 $media_allbox = getPref($data_dir,$username,"newmail_allbox");
26 $media_recent = getPref($data_dir,$username,"newmail_recent");
27 $media_changetitle = getPref($data_dir,$username,"newmail_changetitle");
29 $media = getPref($data_dir,$username,"newmail_media");
31 $media = "../plugins/newmail/sounds/Notify.wav";
36 <table width
=95% align
=center border
=0 cellpadding
=2 cellspacing
=0><tr
><td bgcolor
="<?php echo $color[0] ?>">
37 <center
><b
><?php
echo _("Options") ?
> - New Mail Notification v1
.2
</b
></center
>
40 Select
<b
>Enable Media Playing
</b
> to turn on playing a media file when
41 unseen mail is in your folders
. When enabled
, you can specify the media file to play in the provided
44 The
<b
>Check all boxes
, not just INBOX
</b
> option will check ALL of your
45 folders
for unseen mail
, not just the inbox
for notification
.<p
>
47 Selecting the
<b
>Show popup
</b
> option will enable the showing of a popup
48 window when unseen mail is in your
folders (requires JavaScript
).<p
>
50 Use the
<b
>Check RECENT
</b
> to only check
for messages that are recent
.
51 Recent messages are those that have just recently showed up
and have not
52 been
"viewed" or checked yet
. This can prevent being continuously annoyed
53 by sounds
or popups
for unseen mail
.<p
>
55 Selecting the
<b
>Change title
</b
> option will change the title in some
56 browsers to let you know when you have
new mail (requires JavaScript
, and
57 only works in IE but you won
't see errors with other browsers).
58 This will always tell you if you have new mail, even if you have
59 <b>Check RECENT</b> enabled.<p>
61 Select from the list of <b>server files</b> the media file to play when
62 new mail arrives. Selecting <b>local media</b> will play the file
63 specified in the <b>local media file</b> box to play from the local
64 computer. If no file is specified, the system will use a default from the
67 <form action="../../src/options.php" method=post>
68 <table width=100% cellpadding=0 cellspacing=2 border=0>
70 <td align=right nowrap> 
72 <input type=checkbox <?php
73 if($media_enable == "on") {
76 name=media_enable><b> Enable Media Playing</b>
80 <td align=right nowrap> 
82 <input type=checkbox <?php
83 if($media_allbox == "on") {
86 name=media_allbox><b> Check all boxes, not just INBOX</b>
90 <td align=right nowrap> 
92 <input type=checkbox <?php
93 if($media_recent == "on") {
96 name=media_recent><b> Count only messages that are RECENT</b>
100 <td align=right nowrap> 
102 <input type=checkbox <?php
103 if($media_changetitle == "on") {
106 name=media_changetitle><b> Change title on supported browsers.</b>
107 (requires IE and JavaScript to work)
111 <td align=right nowrap> 
113 <input type=checkbox <?php
114 if($media_popup == "on") {
117 name=media_popup><b> Show popup window on new mail</b>
118 (requires JavaScript to work)
122 <td align=right nowrap>Select server file:
124 <SELECT NAME=media_sel><?php
126 echo "<OPTION VALUE=\"(local media)\">(local media)";
128 // Iterate sound files for options
130 $d = dir("../plugins/newmail/sounds");
131 while($entry=$d->read()) {
132 $fname = $d->path . "/" . $entry;
133 if ($entry != ".." && $entry != ".") {
135 if ($fname == $media) {
138 echo "VALUE=\"" . $fname . "\">" . $entry . "\n";
145 <input type="submit" value=" Try " name="test" onClick="
146 window.open('testsound
.php?sound
='+media_sel.options[media_sel.selectedIndex].value, 'TestSound
',
147 'width
=150,height
=30,scrollbars
=no
');
153 <td align=right nowrap>Local Media File :
155 <input type=file size=40 name=media_file>
159 <td align=right nowrap>Current File:
161 <input type=hidden value=\"" <?php echo $media; ?>
163 <?php echo $media; ?>
169 <input type="submit" value="Submit" name="submit_newmail">