1) Corrected errors with relative paths that prevented sounds from
[squirrelmail.git] / plugins / newmail / testsound.php
1 <?php
2
3 /**
4 * testsound.php
5 *
6 * Copyright (c) 1999-2003 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * $Id$
10 */
11
12 define('SM_PATH','../../');
13
14 /* SquirrelMail required files. */
15 require_once(SM_PATH . 'include/validate.php');
16 require_once(SM_PATH . 'functions/global.php');
17 require_once(SM_PATH . 'functions/html.php');
18
19 displayHtmlHeader( _("Test Sound"), '', FALSE );
20
21 echo '<body bgcolor="'.$color[4].'" topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>'."\n";
22
23 if ( ! sqgetGlobalVar('sound', $sound, SQ_GET) ) {
24 $sound = 'Click.wav';
25 } elseif ( $sound == '(none)' ) {
26 echo '<center><form><br /><br />'.
27 '<b>' . _("No sound specified") . '</b><br /><br />'.
28 '<input type="button" name="close" value="' . _("Close") . '" onClick="window.close()">'.
29 '</form></center>'.
30 '</body></html>';
31 return;
32 }
33
34 echo html_tag( 'table',
35 html_tag( 'tr',
36 html_tag( 'td',
37 "<embed src=\"$sound\" hidden=true autostart=true>".
38 '<br>'.
39 '<b>' . _("Loading the sound...") . '</b><br>'.
40 '<form>'.
41 '<input type="button" name="close" value=" ' .
42 _("Close") .
43 ' " onClick="window.close()">'.
44 '</form>' ,
45 'center' )
46 ) ,
47 'center' ) .
48 '</body></html>';
49 ?>