X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fnewmail%2Ftestsound.php;h=cba784dcf5162319f166a2061ac2113cc32f274e;hp=56315ae01494cd1e6c0be4d3eba117c9e57bbfc1;hb=c435f076fe6b5b58e09ae19a8e216f37b069d802;hpb=04f6008a45f667d2ce38925f5b2dc4b56076d28e diff --git a/plugins/newmail/testsound.php b/plugins/newmail/testsound.php index 56315ae0..cba784dc 100644 --- a/plugins/newmail/testsound.php +++ b/plugins/newmail/testsound.php @@ -3,45 +3,48 @@ /** * testsound.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. + * Copyright (c) 1999-2004 The SquirrelMail Project Team + * Licensed under the GNU GPL. For full terms see the file COPYING. * * $Id$ + * @package plugins + * @subpackage newmail */ +/** @ignore */ define('SM_PATH','../../'); /* SquirrelMail required files. */ require_once(SM_PATH . 'include/validate.php'); -require_once(SM_PATH . 'functions/html.php'); -if (!isset($_GET['sound'])) { - $sound = 'Click.wav'; -} else { - $sound = $_GET['sound']; -} +displayHtmlHeader( _("Test Sound"), '', FALSE ); -$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', + ''."\n". + '
'. + '' . _("Loading the sound...") . '
'. '
'. ''. + ' " onclick="window.close()" />'. '
' , 'center' ) ) , 'center' ) . ''; - -?> +?> \ No newline at end of file