Some plugins to rg=0: bug_report message_details newmail sent_subfolders spamcop...
[squirrelmail.git] / plugins / newmail / testsound.php
index f8ddde9d432fe4ef40a9d08b00e93601992a3197..56315ae01494cd1e6c0be4d3eba117c9e57bbfc1 100644 (file)
@@ -6,26 +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 ("../");
-   chdir('..');
-   define('SM_PATH','../');
-
-   /* SquirrelMail required files. */
-   require_once(SM_PATH . 'include/validate.php');
-   require_once(SM_PATH . 'functions/html.php');
-   require_once(SM_PATH . '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 );