849bdf42 |
1 | <?php |
2 | |
3 | /** |
4 | SQSPELL_INTERFACE.PHP |
5 | ---------------------- |
6 | This is a main wrapper for the pop-up window interface of |
7 | SquirrelSpell. |
8 | **/ |
9 | |
10 | // Set up a couple of non-negotiable constants. Don't change these, |
11 | // the setuppable stuff is in sqspell_config.php |
12 | $SQSPELL_DIR="squirrelspell"; |
13 | $SQSPELL_CRYPTO=false; |
14 | |
15 | // Load the necessary stuff. |
16 | chdir(".."); |
17 | include("../src/validate.php"); |
18 | include("../src/load_prefs.php"); |
19 | include ("$SQSPELL_DIR/sqspell_config.php"); |
20 | require ("$SQSPELL_DIR/sqspell_functions.php"); |
21 | |
22 | // Now load the necessary module from the modules dir. |
23 | // |
24 | if (!$MOD) $MOD="init"; |
25 | |
26 | // see if someone is attempting to be nasty by trying to get out of the |
27 | // modules directory, although it probably wouldn't do them any good, |
28 | // since every module has to end with .mod.php. Still, they deserve |
29 | // to be warned. ;) |
30 | if (strstr($MOD, ".") || strstr($MOD, "/") || strstr($MOD, "%")){ |
31 | echo "SECURITY BREACH ON DECK 5! CMDR TUVOK AND SECURITY TEAM REQUESTED."; |
32 | exit; |
33 | } |
34 | // fetch the module now. |
35 | include ("$SQSPELL_DIR/modules/$MOD.mod.php"); |
36 | ?> |