add swf and mp3 support
[squirrelmail.git] / plugins / newmail / testsound.php
index 711036da62bd0190703d936143dcaa1be0fc2b81..fa1192dd7268b957f6865c91ab7824ecdcc9fa2b 100644 (file)
@@ -3,8 +3,8 @@
 /**
  * testsound.php
  *
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.        
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * $Id$
  * @package plugins
@@ -16,8 +16,6 @@ define('SM_PATH','../../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
-require_once(SM_PATH . 'functions/global.php');
-require_once(SM_PATH . 'functions/html.php');
 
 displayHtmlHeader( _("Test Sound"), '', FALSE );
 
@@ -28,7 +26,7 @@ if ( ! sqgetGlobalVar('sound', $sound, SQ_GET) ) {
 } elseif ( $sound == '(none)' ) {
     echo '<center><form><br /><br />'.
          '<b>' . _("No sound specified") . '</b><br /><br />'.
-         '<input type="button" name="close" value="' . _("Close") . '" onClick="window.close()" />'.
+         '<input type="button" name="close" value="' . _("Close") . '" onclick="window.close()" />'.
          '</form></center>'.
          '</body></html>';
     return;
@@ -37,16 +35,16 @@ if ( ! sqgetGlobalVar('sound', $sound, SQ_GET) ) {
 echo html_tag( 'table',
          html_tag( 'tr',
              html_tag( 'td',
-                    '<embed src="'.htmlspecialchars($sound).'" hidden="true" autostart="true">'."\n".
+                    newmail_create_media_tags($sound)."\n".
                     '<br />'.
                     '<b>' . _("Loading the sound...") . '</b><br />'.
                     '<form>'.
                     '<input type="button" name="close" value="  ' .
                     _("Close") .
-                    '  " onClick="window.close()" />'.
+                    '  " onclick="window.close()" />'.
                     '</form>' ,
                 'center' )
             ) ,
         'center' ) .
         '</body></html>';
-?>
+?>
\ No newline at end of file