sqspell_interface.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * sqspell_interface.php
  4. * ----------------------
  5. * Main wrapper for the pop-up.
  6. *
  7. * Copyright (c) 1999-2002 The SquirrelMail development team
  8. * Licensed under the GNU GPL. For full terms see the file COPYING.
  9. *
  10. * This is a main wrapper for the pop-up window interface of
  11. * SquirrelSpell.
  12. *
  13. * $Id$
  14. *
  15. * @author Konstantin Riabitsev <icon@duke.edu> ($Author$)
  16. * @version $Date$
  17. */
  18. /**
  19. * Set up a couple of non-negotiable constants and
  20. * defaults. Don't change these, * the setuppable stuff is in
  21. * sqspell_config.php
  22. */
  23. $SQSPELL_DIR='squirrelspell';
  24. $SQSPELL_CRYPTO=FALSE;
  25. /**
  26. * Load the stuff needed from squirrelmail
  27. */
  28. chdir('..');
  29. require_once('../src/validate.php');
  30. require_once('../src/load_prefs.php');
  31. require_once("$SQSPELL_DIR/sqspell_config.php");
  32. require_once("$SQSPELL_DIR/sqspell_functions.php");
  33. /**
  34. * $MOD is the name of the module to invoke.
  35. * If $MOD is undefined, use "init", else check for security
  36. * breaches.
  37. */
  38. if (!isset($MOD) || !$MOD){
  39. $MOD='init';
  40. } else {
  41. sqspell_ckMOD($MOD);
  42. }
  43. /**
  44. * Include the module.
  45. */
  46. require_once("$SQSPELL_DIR/modules/$MOD.mod");
  47. ?>