sqspell_options.php 1.2 KB

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