849bdf42 |
1 | <?php |
4b4abf93 |
2 | |
d112ed5a |
3 | /** |
91e0dccc |
4 | * sqspell_options.php |
8d6a115b |
5 | * |
d112ed5a |
6 | * Main wrapper for the options interface. |
7 | * |
4b4abf93 |
8 | * @author Konstantin Riabitsev <icon at duke.edu> |
9 | * @copyright © 1999-2005 The SquirrelMail Project Team |
10 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
7996c920 |
11 | * @version $Id$ |
ea5f4b8e |
12 | * @package plugins |
13 | * @subpackage squirrelspell |
d112ed5a |
14 | */ |
849bdf42 |
15 | |
d112ed5a |
16 | /** |
91e0dccc |
17 | * Set a couple of constants and defaults. Don't change these, |
d112ed5a |
18 | * the configurable stuff is in sqspell_config.php |
e5af0839 |
19 | * @todo do we really need $SQSPELL_DIR var? |
d112ed5a |
20 | */ |
8d6a115b |
21 | $SQSPELL_DIR='plugins/squirrelspell/'; |
d112ed5a |
22 | $SQSPELL_CRYPTO=FALSE; |
849bdf42 |
23 | |
d112ed5a |
24 | /** |
598294a7 |
25 | * Load some necessary stuff from SquirrelMail. |
ea5f4b8e |
26 | * @ignore |
d112ed5a |
27 | */ |
92219031 |
28 | define('SM_PATH','../../'); |
7e54b325 |
29 | |
30 | /* SquirrelMail required files. */ |
31 | require_once(SM_PATH . 'include/validate.php'); |
7996c920 |
32 | include_once(SM_PATH . 'functions/display_messages.php'); |
7996c920 |
33 | include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php'); |
d112ed5a |
34 | |
35 | /** |
36 | * $MOD is the name of the module to invoke. |
7996c920 |
37 | * If $MOD is unspecified, assign "options_main" to it. Else check for |
d112ed5a |
38 | * security breach attempts. |
39 | */ |
7996c920 |
40 | if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) { |
41 | $MOD = 'options_main'; |
8a9f9d09 |
42 | } |
7996c920 |
43 | sqspell_ckMOD($MOD); |
8a9f9d09 |
44 | |
7996c920 |
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"); |
d112ed5a |
48 | } else { |
7996c920 |
49 | error_box(_("Invalid SquirrelSpell module."),$color); |
50 | echo '</body></html>'; |
d112ed5a |
51 | } |
ce68b76b |
52 | ?> |