sqspell_interface.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * sqspell_interface.php
  4. *
  5. * Main wrapper for the pop-up.
  6. *
  7. * This is a main wrapper for the pop-up window interface of
  8. * SquirrelSpell.
  9. *
  10. * @author Konstantin Riabitsev <icon at duke.edu>
  11. * @copyright &copy; 1999-2007 The SquirrelMail Project Team
  12. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  13. * @version $Id$
  14. * @package plugins
  15. * @subpackage squirrelspell
  16. */
  17. /**
  18. * Include the SquirrelMail initialization file.
  19. */
  20. require('../../include/init.php');
  21. /**
  22. * Set up a couple of non-negotiable constants and
  23. * defaults. Don't change these, * the setuppable stuff is in
  24. * sqspell_config.php
  25. */
  26. $SQSPELL_DIR='plugins/squirrelspell/';
  27. $SQSPELL_CRYPTO=FALSE;
  28. include_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
  29. /**
  30. * $MOD is the name of the module to invoke.
  31. * If $MOD is unspecified, assign "init" to it. Else check for
  32. * security breach attempts.
  33. */
  34. if(! sqgetGlobalVar('MOD',$MOD,SQ_FORM)) {
  35. $MOD = 'init';
  36. }
  37. sqspell_ckMOD($MOD);
  38. /* Load the stuff already. */
  39. if (file_exists(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod")) {
  40. require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
  41. } else {
  42. error_box(_("Invalid SquirrelSpell module."));
  43. // display sm footer (closes html tags)
  44. $oTemplate->display('footer.tpl');
  45. }