moving functions to separate file, adding configuration files
[squirrelmail.git] / plugins / squirrelspell / sqspell_interface.php
CommitLineData
849bdf42 1<?php
2
d112ed5a 3/**
4 * sqspell_interface.php
8d6a115b 5 *
d112ed5a 6 * Main wrapper for the pop-up.
7 *
82d304a0 8 * Copyright (c) 1999-2004 The SquirrelMail development team
d112ed5a 9 * Licensed under the GNU GPL. For full terms see the file COPYING.
10 *
11 * This is a main wrapper for the pop-up window interface of
12 * SquirrelSpell.
13 *
14 * $Id$
15 *
16 * @author Konstantin Riabitsev <icon@duke.edu> ($Author$)
17 * @version $Date$
ea5f4b8e 18 * @package plugins
19 * @subpackage squirrelspell
d112ed5a 20 */
849bdf42 21
d112ed5a 22/**
23 * Set up a couple of non-negotiable constants and
24 * defaults. Don't change these, * the setuppable stuff is in
25 * sqspell_config.php
26 */
8d6a115b 27$SQSPELL_DIR='plugins/squirrelspell/';
d112ed5a 28$SQSPELL_CRYPTO=FALSE;
9804bcde 29
d112ed5a 30/**
31 * Load the stuff needed from squirrelmail
ea5f4b8e 32 * @ignore
d112ed5a 33 */
92219031 34define('SM_PATH','../../');
7e54b325 35
36/* SquirrelMail required files. */
37require_once(SM_PATH . 'include/validate.php');
aa7fb30c 38require_once(SM_PATH . 'include/load_prefs.php');
cd7fc9e6 39require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_config.php');
40require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
9804bcde 41
d112ed5a 42/**
43 * $MOD is the name of the module to invoke.
44 * If $MOD is undefined, use "init", else check for security
45 * breaches.
46 */
8a9f9d09 47if(isset($_POST['MOD'])) {
48 $MOD = $_POST['MOD'];
49} elseif (isset($_GET['MOD'])) {
50 $MOD = $_GET['MOD'];
51}
52
88cb1b4d 53if (!isset($MOD) || !$MOD){
8d6a115b 54 $MOD='init';
d112ed5a 55} else {
8d6a115b 56 sqspell_ckMOD($MOD);
d112ed5a 57}
58
8d6a115b 59/* Include the module. */
cd7fc9e6 60require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
8d6a115b 61
15e6162e 62?>