Centralized init
[squirrelmail.git] / plugins / squirrelspell / sqspell_interface.php
CommitLineData
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>
47ccfad4 12 * @copyright &copy; 1999-2006 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
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
202bcbcc 27
d112ed5a 28/**
202bcbcc 29 * Include the SquirrelMail initialization file.
d112ed5a 30 */
202bcbcc 31require('../../include/init.php');
7e54b325 32
7996c920 33include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
91e0dccc 34
d112ed5a 35/**
36 * $MOD is the name of the module to invoke.
7996c920 37 * If $MOD is unspecified, assign "init" to it. Else check for
38 * security breach attempts.
d112ed5a 39 */
7996c920 40if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) {
41 $MOD = 'init';
91e0dccc 42}
7996c920 43sqspell_ckMOD($MOD);
8a9f9d09 44
7996c920 45/* Load the stuff already. */
46if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) {
47 require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
d112ed5a 48} else {
7996c920 49 error_box(_("Invalid SquirrelSpell module."),$color);
50 echo '</body></html>';
d112ed5a 51}
91e0dccc 52?>