if 'js' => TRUE, javascript support is checked by src/options.php
[squirrelmail.git] / plugins / squirrelspell / sqspell_interface.php
CommitLineData
849bdf42 1<?php
d112ed5a 2/**
3 * sqspell_interface.php
8d6a115b 4 *
d112ed5a 5 * Main wrapper for the pop-up.
6 *
9eb3fcb3 7 * Copyright (c) 1999-2005 The SquirrelMail Project Team
d112ed5a 8 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 *
10 * This is a main wrapper for the pop-up window interface of
91e0dccc 11 * SquirrelSpell.
d112ed5a 12 *
7996c920 13 * @author Konstantin Riabitsev <icon@duke.edu>
14 * @version $Id$
ea5f4b8e 15 * @package plugins
16 * @subpackage squirrelspell
d112ed5a 17 */
849bdf42 18
91e0dccc 19/**
d112ed5a 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 */
8d6a115b 24$SQSPELL_DIR='plugins/squirrelspell/';
d112ed5a 25$SQSPELL_CRYPTO=FALSE;
91e0dccc 26
d112ed5a 27/**
598294a7 28 * Load the stuff needed from SquirrelMail
ea5f4b8e 29 * @ignore
d112ed5a 30 */
92219031 31define('SM_PATH','../../');
7e54b325 32
33/* SquirrelMail required files. */
34require_once(SM_PATH . 'include/validate.php');
7996c920 35include_once(SM_PATH . 'functions/display_messages.php');
36include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_config.php');
37include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
91e0dccc 38
d112ed5a 39/**
40 * $MOD is the name of the module to invoke.
7996c920 41 * If $MOD is unspecified, assign "init" to it. Else check for
42 * security breach attempts.
d112ed5a 43 */
7996c920 44if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) {
45 $MOD = 'init';
91e0dccc 46}
7996c920 47sqspell_ckMOD($MOD);
8a9f9d09 48
7996c920 49/* Load the stuff already. */
50if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) {
51 require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
d112ed5a 52} else {
7996c920 53 error_box(_("Invalid SquirrelSpell module."),$color);
54 echo '</body></html>';
d112ed5a 55}
91e0dccc 56?>