849bdf42 |
1 | <?php |
4b4abf93 |
2 | |
d112ed5a |
3 | /** |
4 | * sqspell_interface.php |
8d6a115b |
5 | * |
d112ed5a |
6 | * Main wrapper for the pop-up. |
7 | * |
d112ed5a |
8 | * This is a main wrapper for the pop-up window interface of |
91e0dccc |
9 | * SquirrelSpell. |
d112ed5a |
10 | * |
4b4abf93 |
11 | * @author Konstantin Riabitsev <icon at duke.edu> |
1977ab55 |
12 | * @copyright 1999-2010 The SquirrelMail Project Team |
4b4abf93 |
13 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
7996c920 |
14 | * @version $Id$ |
ea5f4b8e |
15 | * @package plugins |
16 | * @subpackage squirrelspell |
d112ed5a |
17 | */ |
849bdf42 |
18 | |
030aec2e |
19 | /** |
20 | * Include the SquirrelMail initialization file. |
21 | */ |
22 | require('../../include/init.php'); |
23 | |
91e0dccc |
24 | /** |
d112ed5a |
25 | * Set up a couple of non-negotiable constants and |
26 | * defaults. Don't change these, * the setuppable stuff is in |
27 | * sqspell_config.php |
28 | */ |
8d6a115b |
29 | $SQSPELL_DIR='plugins/squirrelspell/'; |
d112ed5a |
30 | $SQSPELL_CRYPTO=FALSE; |
91e0dccc |
31 | |
7996c920 |
32 | include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php'); |
91e0dccc |
33 | |
d112ed5a |
34 | /** |
35 | * $MOD is the name of the module to invoke. |
7996c920 |
36 | * If $MOD is unspecified, assign "init" to it. Else check for |
37 | * security breach attempts. |
d112ed5a |
38 | */ |
7996c920 |
39 | if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) { |
40 | $MOD = 'init'; |
91e0dccc |
41 | } |
7996c920 |
42 | sqspell_ckMOD($MOD); |
8a9f9d09 |
43 | |
7996c920 |
44 | /* Load the stuff already. */ |
45 | if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) { |
46 | require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod"); |
d112ed5a |
47 | } else { |
1b858d86 |
48 | error_box(_("Invalid SquirrelSpell module.")); |
49 | // display sm footer (closes html tags) |
50 | $oTemplate->display('footer.tpl'); |
d112ed5a |
51 | } |