X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fnewmail%2Ftestsound.php;h=d8d5ac7ef0c49cf43984e4813e757dfea7e79bc6;hp=56315ae01494cd1e6c0be4d3eba117c9e57bbfc1;hb=c69bc63529c64510bdccbfb74bfcecc1d9d0d07b;hpb=04f6008a45f667d2ce38925f5b2dc4b56076d28e diff --git a/plugins/newmail/testsound.php b/plugins/newmail/testsound.php index 56315ae0..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. - * - * $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 + */ + +/** + * Path for SquirrelMail required files. + * @ignore */ +require('../../include/init.php'); -define('SM_PATH','../../'); +displayHtmlHeader( _("Test Sound"), '', FALSE ); -/* SquirrelMail required files. */ -require_once(SM_PATH . 'include/validate.php'); -require_once(SM_PATH . 'functions/html.php'); +echo ''."\n"; -if (!isset($_GET['sound'])) { +if ( ! sqgetGlobalVar('sound', $sound, SQ_GET) ) { $sound = 'Click.wav'; -} else { - $sound = $_GET['sound']; +} elseif ( $sound == '(none)' ) { + echo '


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

'. + ''. + '
'. + ''; + return; } -$sound = str_replace('../plugins/newmail/', '', $sound); -$sound = str_replace('../', '', $sound); -$sound = str_replace("..\\", '', $sound); - - displayHtmlHeader( _("Test Sound"), '', FALSE ); - - 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