Replacing HTML "script" element deprecated attribute "language".
[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 * Load the stuff needed from SquirrelMail
29 * @ignore
30 */
31 define('SM_PATH','../../');
32
33 /* SquirrelMail required files. */
34 require_once(SM_PATH . 'include/validate.php');
35 include_once(SM_PATH . 'functions/display_messages.php');
36 include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
37
38 /**
39 * $MOD is the name of the module to invoke.
40 * If $MOD is unspecified, assign "init" to it. Else check for
41 * security breach attempts.
42 */
43 if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) {
44 $MOD = 'init';
45 }
46 sqspell_ckMOD($MOD);
47
48 /* Load the stuff already. */
49 if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) {
50 require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
51 } else {
52 error_box(_("Invalid SquirrelSpell module."),$color);
53 echo '</body></html>';
54 }
55 ?>