Seriously? The variable is named as an array and initialized as a string? Well, I...
[squirrelmail.git] / plugins / squirrelspell / sqspell_interface.php
... / ...
CommitLineData
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 1999-2017 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 * Include the SquirrelMail initialization file.
21 */
22require('../../include/init.php');
23
24/**
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 */
29$SQSPELL_DIR='plugins/squirrelspell/';
30$SQSPELL_CRYPTO=FALSE;
31
32include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
33
34/**
35 * $MOD is the name of the module to invoke.
36 * If $MOD is unspecified, assign "init" to it. Else check for
37 * security breach attempts.
38 */
39if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) {
40 $MOD = 'init';
41}
42sqspell_ckMOD($MOD);
43
44/* Load the stuff already. */
45if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) {
46 require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
47} else {
48 error_box(_("Invalid SquirrelSpell module."));
49 // display sm footer (closes html tags)
50 $oTemplate->display('footer.tpl');
51}