Centralized init
[squirrelmail.git] / plugins / squirrelspell / sqspell_interface.php
1 <?php
2
3 /**
4 * sqspell_interface.php
5 *
6 * Main wrapper for the pop-up.
7 *
8 * This is a main wrapper for the pop-up window interface of
9 * SquirrelSpell.
10 *
11 * @author Konstantin Riabitsev <icon at duke.edu>
12 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
13 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
14 * @version $Id$
15 * @package plugins
16 * @subpackage squirrelspell
17 */
18
19 /**
20 * Set up a couple of non-negotiable constants and
21 * defaults. Don't change these, * the setuppable stuff is in
22 * sqspell_config.php
23 */
24 $SQSPELL_DIR='plugins/squirrelspell/';
25 $SQSPELL_CRYPTO=FALSE;
26
27
28 /**
29 * Include the SquirrelMail initialization file.
30 */
31 require('../../include/init.php');
32
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 "init" to it. Else check for
38 * security breach attempts.
39 */
40 if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) {
41 $MOD = 'init';
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 ?>