X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fnewmail%2Ftestsound.php;h=d8d5ac7ef0c49cf43984e4813e757dfea7e79bc6;hp=f8ddde9d432fe4ef40a9d08b00e93601992a3197;hb=a67cf4877d741cffdf17affd2fae6359921b12ab;hpb=d0dbdb1441f83386e2284e99ab0f4e14db8d218f diff --git a/plugins/newmail/testsound.php b/plugins/newmail/testsound.php index f8ddde9d..d8d5ac7e 100644 --- a/plugins/newmail/testsound.php +++ b/plugins/newmail/testsound.php @@ -3,47 +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 ("../"); - 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'); - require_once(SM_PATH . 'src/load_prefs.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