X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fnewmail%2Ftestsound.php;h=cba784dcf5162319f166a2061ac2113cc32f274e;hp=e8d1dcb4d479929a886bdcfe89765e20f0e75fc8;hb=c435f076fe6b5b58e09ae19a8e216f37b069d802;hpb=15e6162eacc97158393bc75aed3afeb7b19c24a6 diff --git a/plugins/newmail/testsound.php b/plugins/newmail/testsound.php index e8d1dcb4..cba784dc 100644 --- a/plugins/newmail/testsound.php +++ b/plugins/newmail/testsound.php @@ -3,37 +3,48 @@ /** * 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 + * 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 */ - chdir ("../"); - require_once('../src/validate.php'); - require_once("../src/load_prefs.php"); - if (!isset($sound)) { - $sound = "Click.wav"; - } - $sound = str_replace('../plugins/newmail/', '', $sound); - $sound = str_replace('../', '', $sound); - $sound = str_replace("..\\", '', $sound); +/** @ignore */ +define('SM_PATH','../../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); + +displayHtmlHeader( _("Test Sound"), '', FALSE ); - displayHtmlHeader( _("Test Sound"), '', FALSE ); +echo ''."\n"; - echo "\n". - '
'. - "". - '
'. - '' . _("Loading the sound...") . '

'. - '
'. - ''. - '
'. - '
'. - ''; +if ( ! sqgetGlobalVar('sound', $sound, SQ_GET) ) { + $sound = 'Click.wav'; +} elseif ( $sound == '(none)' ) { + echo '


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

'. + ''. + '
'. + ''; + return; +} -?> +echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', + ''."\n". + '
'. + '' . _("Loading the sound...") . '
'. + '
'. + ''. + '
' , + 'center' ) + ) , + 'center' ) . + ''; +?> \ No newline at end of file