sqspell_options.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * sqspell_options.php
  4. *
  5. * Main wrapper for the options interface.
  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. * $Id$
  11. *
  12. * @author Konstantin Riabitsev <icon@duke.edu> ($Author$)
  13. * @version $Date$
  14. * @package plugins
  15. * @subpackage squirrelspell
  16. */
  17. /**
  18. * Set a couple of constants and defaults. Don't change these,
  19. * the configurable stuff is in sqspell_config.php
  20. */
  21. $SQSPELL_DIR='plugins/squirrelspell/';
  22. $SQSPELL_CRYPTO=FALSE;
  23. /**
  24. * Load some necessary stuff from squirrelmail.
  25. * @ignore
  26. */
  27. define('SM_PATH','../../');
  28. /* SquirrelMail required files. */
  29. require_once(SM_PATH . 'include/validate.php');
  30. require_once(SM_PATH . 'include/load_prefs.php');
  31. require_once(SM_PATH . 'functions/strings.php');
  32. require_once(SM_PATH . 'functions/page_header.php');
  33. require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_config.php');
  34. require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
  35. /**
  36. * $MOD is the name of the module to invoke.
  37. * If $MOD is unspecified, assign "init" to it. Else check for
  38. * security breach attempts.
  39. */
  40. if(isset($_POST['MOD'])) {
  41. $MOD = $_POST['MOD'];
  42. } elseif (isset($_GET['MOD'])) {
  43. $MOD = $_GET['MOD'];
  44. }
  45. if(!isset($MOD) || !$MOD) {
  46. $MOD = 'options_main';
  47. } else {
  48. sqspell_ckMOD($MOD);
  49. }
  50. /* Load the stuff already. */
  51. require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
  52. ?>