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> |
33aab559 |
9 | * @copyright 1999-2024 The SquirrelMail Project Team |
4b4abf93 |
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 | |
030aec2e |
16 | /** |
17 | * Include the SquirrelMail initialization file. |
18 | */ |
19 | require('../../include/init.php'); |
20 | |
d112ed5a |
21 | /** |
91e0dccc |
22 | * Set a couple of constants and defaults. Don't change these, |
d112ed5a |
23 | * the configurable stuff is in sqspell_config.php |
e5af0839 |
24 | * @todo do we really need $SQSPELL_DIR var? |
d112ed5a |
25 | */ |
8d6a115b |
26 | $SQSPELL_DIR='plugins/squirrelspell/'; |
d112ed5a |
27 | $SQSPELL_CRYPTO=FALSE; |
849bdf42 |
28 | |
202bcbcc |
29 | |
7e54b325 |
30 | |
7996c920 |
31 | include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php'); |
d112ed5a |
32 | |
33 | /** |
34 | * $MOD is the name of the module to invoke. |
7996c920 |
35 | * If $MOD is unspecified, assign "options_main" to it. Else check for |
d112ed5a |
36 | * security breach attempts. |
37 | */ |
7996c920 |
38 | if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) { |
39 | $MOD = 'options_main'; |
8a9f9d09 |
40 | } |
7996c920 |
41 | sqspell_ckMOD($MOD); |
8a9f9d09 |
42 | |
7996c920 |
43 | /* Load the stuff already. */ |
44 | if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) { |
45 | require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod"); |
d112ed5a |
46 | } else { |
1b858d86 |
47 | error_box(_("Invalid SquirrelSpell module.")); |
48 | // display footer (closes html tags) |
49 | $oTemplate->display('footer.tpl'); |
d112ed5a |
50 | } |