*
* Displays all options relating to new mail sounds
*
- * @copyright 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2017 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
html_tag( 'tr' ) . "\n" .
html_tag( 'td', '', 'left', $color[4] ) . "<br />\n";
-echo html_tag( 'p',_("Based on the Folder Preferences option "Enable Unread Message Notification", you can be notified when new messages arrive in your account.")) . "\n" .
+echo html_tag( 'p', sprintf(_("Based on the Folder Preferences option %s, you can be notified when new messages arrive in your account."), '"' . _("Enable Unread Message Notification") . '"')) . "\n" .
html_tag( 'p',
sprintf(_("Selecting the %s option will enable the showing of a popup window when unseen mail is in one of your folders (requires JavaScript)."), '"'._("Show popup window on new mail").'"')
) . "\n" .
echo '>' . _("(none)") . '</option>' . "\n";
// Iterate sound files for options
$d = dir(SM_PATH . 'plugins/newmail/sounds');
- while($entry=$d->read()) {
- // $fname = get_location () . '/sounds/' . $entry;
- if ($entry != '..' && $entry != '.' && $entry != 'CVS' && $entry != 'index.php') {
- echo '<option ';
- if ($entry == $newmail_media) {
- echo 'selected="selected" ';
+ if ($d) {
+ while($entry=$d->read()) {
+ // $fname = get_location () . '/sounds/' . $entry;
+ if ($entry != '..' && $entry != '.' && $entry != 'CVS' && $entry != 'index.php') {
+ echo '<option ';
+ if ($entry == $newmail_media) {
+ echo 'selected="selected" ';
+ }
+ echo 'value="' . sm_encode_html_special_chars($entry) . '">' .
+ sm_encode_html_special_chars($entry) . "</option>\n";
}
- echo 'value="' . htmlspecialchars($entry) . '">' .
- htmlspecialchars($entry) . "</option>\n";
}
+ $d->close();
}
- $d->close();
// display media selection
foreach($newmail_mmedia as $newmail_mm_name => $newmail_mm_data) {
echo '<option ';
echo 'selected="selected" ';
}
echo 'value="mmedia_' . $newmail_mm_name . '">'
- .htmlspecialchars($newmail_mm_name) . "</option>\n";
+ .sm_encode_html_special_chars($newmail_mm_name) . "</option>\n";
}
if($newmail_uploadsounds) {
// display currently uploaded file information
echo html_tag('tr')
. html_tag('td',_("Uploaded Media File:"),'right','','style="white-space: nowrap;"')
- . html_tag('td',($newmail_userfile_name!='' ? htmlspecialchars($newmail_userfile_name) : _("unavailable")))
+ . html_tag('td',($newmail_userfile_name!='' ? sm_encode_html_special_chars($newmail_userfile_name) : _("unavailable")))
."</tr>\n";
if ($newmail_userfile_name!='') {
echo html_tag( 'tr', "\n" .
html_tag( 'td', _("Current File:"), 'right', '', 'style="white-space: nowrap;"' ) .
html_tag( 'td', '<input type="hidden" value="' .
- htmlspecialchars($newmail_media) . '" name="media_default" />' .
- htmlspecialchars($media_output) . '', 'left' )
+ sm_encode_html_special_chars($newmail_media) . '" name="media_default" />' .
+ sm_encode_html_special_chars($media_output) . '', 'left' )
) . "\n";
}
echo html_tag( 'tr', "\n" .