sqspell_interface.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * sqspell_interface.php
  4. *
  5. * Main wrapper for the pop-up.
  6. *
  7. * Copyright (c) 1999-2004 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. * @package plugins
  18. * @subpackage squirrelspell
  19. */
  20. /**
  21. * Set up a couple of non-negotiable constants and
  22. * defaults. Don't change these, * the setuppable stuff is in
  23. * sqspell_config.php
  24. */
  25. $SQSPELL_DIR='plugins/squirrelspell/';
  26. $SQSPELL_CRYPTO=FALSE;
  27. /**
  28. * Load the stuff needed from squirrelmail
  29. * @ignore
  30. */
  31. define('SM_PATH','../../');
  32. /* SquirrelMail required files. */
  33. require_once(SM_PATH . 'include/validate.php');
  34. require_once(SM_PATH . 'include/load_prefs.php');
  35. require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_config.php');
  36. require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
  37. /**
  38. * $MOD is the name of the module to invoke.
  39. * If $MOD is undefined, use "init", else check for security
  40. * breaches.
  41. */
  42. if(isset($_POST['MOD'])) {
  43. $MOD = $_POST['MOD'];
  44. } elseif (isset($_GET['MOD'])) {
  45. $MOD = $_GET['MOD'];
  46. }
  47. if (!isset($MOD) || !$MOD){
  48. $MOD='init';
  49. } else {
  50. sqspell_ckMOD($MOD);
  51. }
  52. /* Include the module. */
  53. require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
  54. ?>