X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fnewmail%2Ftestsound.php;h=d8d5ac7ef0c49cf43984e4813e757dfea7e79bc6;hp=36f3241b950c32e58e40ce0adeacdc683d88afaa;hb=a67cf4877d741cffdf17affd2fae6359921b12ab;hpb=aa7fb30cfbfef6ef28ebde963f6312c79122f411 diff --git a/plugins/newmail/testsound.php b/plugins/newmail/testsound.php index 36f3241b..d8d5ac7e 100644 --- a/plugins/newmail/testsound.php +++ b/plugins/newmail/testsound.php @@ -3,45 +3,47 @@ /** * testsound.php * - * 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 - * - * $Id$ + * @copyright © 1999-2007 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage newmail */ - chdir('../'); - define('SM_PATH','../'); +/** + * Path for SquirrelMail required files. + * @ignore + */ +require('../../include/init.php'); - /* SquirrelMail required files. */ - require_once(SM_PATH . 'include/validate.php'); - require_once(SM_PATH . 'functions/html.php'); +displayHtmlHeader( _("Test Sound"), '', FALSE ); - if (!isset($sound)) { - $sound = "Click.wav"; - } - $sound = str_replace('../plugins/newmail/', '', $sound); - $sound = str_replace('../', '', $sound); - $sound = str_replace("..\\", '', $sound); +echo ''."\n"; - displayHtmlHeader( _("Test Sound"), '', FALSE ); +if ( ! sqgetGlobalVar('sound', $sound, SQ_GET) ) { + $sound = 'Click.wav'; +} elseif ( $sound == '(none)' ) { + echo '


'. + '' . _("No sound specified") . '

'. + ''. + '
'. + ''; + return; +} - echo "\n". - html_tag( 'table', - html_tag( 'tr', - html_tag( 'td', - "". - '
'. - '' . _("Loading the sound...") . '

'. +echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', + newmail_create_media_tags($sound)."\n". + '
'. + '' . _("Loading the sound...") . '
'. '
'. ''. + ' " onclick="window.close()" />'. '
' , 'center' ) ) , 'center' ) . ''; - -?> +?> \ No newline at end of file