reducing size of setup.php
[squirrelmail.git] / plugins / squirrelspell / sqspell_options.php
CommitLineData
849bdf42 1<?php
d112ed5a 2/**
91e0dccc 3 * sqspell_options.php
8d6a115b 4 *
d112ed5a 5 * Main wrapper for the options interface.
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 *
7996c920 10 * @author Konstantin Riabitsev <icon@duke.edu>
11 * @version $Id$
ea5f4b8e 12 * @package plugins
13 * @subpackage squirrelspell
d112ed5a 14 */
849bdf42 15
d112ed5a 16/**
91e0dccc 17 * Set a couple of constants and defaults. Don't change these,
d112ed5a 18 * the configurable stuff is in sqspell_config.php
e5af0839 19 * @todo do we really need $SQSPELL_DIR var?
d112ed5a 20 */
8d6a115b 21$SQSPELL_DIR='plugins/squirrelspell/';
d112ed5a 22$SQSPELL_CRYPTO=FALSE;
849bdf42 23
d112ed5a 24/**
598294a7 25 * Load some necessary stuff from SquirrelMail.
ea5f4b8e 26 * @ignore
d112ed5a 27 */
92219031 28define('SM_PATH','../../');
7e54b325 29
30/* SquirrelMail required files. */
31require_once(SM_PATH . 'include/validate.php');
7996c920 32include_once(SM_PATH . 'functions/display_messages.php');
7996c920 33include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
d112ed5a 34
35/**
36 * $MOD is the name of the module to invoke.
7996c920 37 * If $MOD is unspecified, assign "options_main" to it. Else check for
d112ed5a 38 * security breach attempts.
39 */
7996c920 40if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) {
41 $MOD = 'options_main';
8a9f9d09 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}
ce68b76b 52?>