if 'js' => TRUE, javascript support is checked by src/options.php
[squirrelmail.git] / plugins / squirrelspell / sqspell_options.php
1 <?php
2 /**
3 * sqspell_options.php
4 *
5 * Main wrapper for the options interface.
6 *
7 * Copyright (c) 1999-2005 The SquirrelMail Project Team
8 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 *
10 * @author Konstantin Riabitsev <icon@duke.edu>
11 * @version $Id$
12 * @package plugins
13 * @subpackage squirrelspell
14 */
15
16 /**
17 * Set a couple of constants and defaults. Don't change these,
18 * the configurable stuff is in sqspell_config.php
19 */
20 $SQSPELL_DIR='plugins/squirrelspell/';
21 $SQSPELL_CRYPTO=FALSE;
22
23 /**
24 * Load some necessary stuff from SquirrelMail.
25 * @ignore
26 */
27 define('SM_PATH','../../');
28
29 /* SquirrelMail required files. */
30 require_once(SM_PATH . 'include/validate.php');
31 include_once(SM_PATH . 'functions/display_messages.php');
32 include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_config.php');
33 include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
34
35 /**
36 * $MOD is the name of the module to invoke.
37 * If $MOD is unspecified, assign "options_main" to it. Else check for
38 * security breach attempts.
39 */
40 if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) {
41 $MOD = 'options_main';
42 }
43 sqspell_ckMOD($MOD);
44
45 /* Load the stuff already. */
46 if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) {
47 require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
48 } else {
49 error_box(_("Invalid SquirrelSpell module."),$color);
50 echo '</body></html>';
51 }
52 ?>