rg=0 fix for attachment_common_types
[squirrelmail.git] / plugins / newmail / testsound.php
index 0bcb4a7264e913d1c25c736dad85f3f96bf7729e..56315ae01494cd1e6c0be4d3eba117c9e57bbfc1 100644 (file)
@@ -6,21 +6,24 @@
  * 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$
  */
 
-   chdir ("../");
-   require_once('../src/validate.php');
-   require_once('../functions/html.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);
+define('SM_PATH','../../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/html.php');
+
+if (!isset($_GET['sound'])) {
+    $sound = 'Click.wav';
+} else {
+    $sound = $_GET['sound'];
+}
+
+$sound = str_replace('../plugins/newmail/', '', $sound);
+$sound = str_replace('../', '', $sound);
+$sound = str_replace("..\\", '', $sound);
 
    displayHtmlHeader( _("Test Sound"), '', FALSE );