testsound.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * testsound.php
  4. *
  5. * Copyright (c) 1999-2004 The SquirrelMail Project Team
  6. * Licensed under the GNU GPL. For full terms see the file COPYING.
  7. *
  8. * $Id$
  9. * @package plugins
  10. * @subpackage newmail
  11. */
  12. /** @ignore */
  13. define('SM_PATH','../../');
  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. displayHtmlHeader( _("Test Sound"), '', FALSE );
  19. echo '<body bgcolor="'.$color[4].'" topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>'."\n";
  20. if ( ! sqgetGlobalVar('sound', $sound, SQ_GET) ) {
  21. $sound = 'Click.wav';
  22. } elseif ( $sound == '(none)' ) {
  23. echo '<center><form><br /><br />'.
  24. '<b>' . _("No sound specified") . '</b><br /><br />'.
  25. '<input type="button" name="close" value="' . _("Close") . '" onClick="window.close()">'.
  26. '</form></center>'.
  27. '</body></html>';
  28. return;
  29. }
  30. echo html_tag( 'table',
  31. html_tag( 'tr',
  32. html_tag( 'td',
  33. '<embed src="'.htmlspecialchars($sound)."\" hidden=\"true\" autostart=\"true\">\n".
  34. '<br>'.
  35. '<b>' . _("Loading the sound...") . '</b><br>'.
  36. '<form>'.
  37. '<input type="button" name="close" value=" ' .
  38. _("Close") .
  39. ' " onClick="window.close()">'.
  40. '</form>' ,
  41. 'center' )
  42. ) ,
  43. 'center' ) .
  44. '</body></html>';
  45. ?>