X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fnewmail%2Ftestsound.php;h=5de4d0b04d0be1edcc78064baaa64985f6038673;hp=4f2331bdbcb0ddeb83e823aec62b9a9f3e6aa5a2;hb=170883a4a7c0b4c2ba10d9dfb65cc8b9007337d3;hpb=8d6a115b0ef06dbcf9b149ba2509208f09b3a2ab diff --git a/plugins/newmail/testsound.php b/plugins/newmail/testsound.php index 4f2331bd..5de4d0b0 100644 --- a/plugins/newmail/testsound.php +++ b/plugins/newmail/testsound.php @@ -3,42 +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-2006 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage newmail */ -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 ); -$sound = (!isset($sound) ? 'Click.wav' : $sound); -$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