| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * options_main.mod |
| 5 | * |
| 6 | * Squirrelspell module |
| 7 | * |
| 8 | * Default page called when accessing SquirrelSpell's options. |
| 9 | * |
| 10 | * @author Konstantin Riabitsev <icon at duke.edu> |
| 11 | * @copyright 1999-2022 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 | global $SQSPELL_APP, $main_options_changed_message; |
| 19 | |
| 20 | if (!empty($main_options_changed_message)) |
| 21 | $msg = $main_options_changed_message; |
| 22 | else |
| 23 | $msg = ''; |
| 24 | |
| 25 | $msg .= '<p>' |
| 26 | . _("Please choose which options you wish to set up:") |
| 27 | . '</p>' |
| 28 | . '<ul>' |
| 29 | . '<li><a href="sqspell_options.php?MOD=edit_dic">' |
| 30 | . _("Edit your personal dictionary") . '</a></li>'; |
| 31 | /** |
| 32 | * See if more than one dictionary is defined system-wide. |
| 33 | * If so, let the user choose his preferred ones. |
| 34 | */ |
| 35 | if (sizeof($SQSPELL_APP)>1) { |
| 36 | $msg .= '<li><a href="sqspell_options.php?MOD=lang_setup">' |
| 37 | . _("Set up international dictionaries") |
| 38 | . "</a></li>\n"; |
| 39 | } |
| 40 | /** |
| 41 | * See if MCRYPT is available. |
| 42 | * If so, let the user choose whether s/he wants to encrypt the |
| 43 | * personal dictionary file. |
| 44 | */ |
| 45 | if (function_exists("mcrypt_generic")) { |
| 46 | $msg .= '<li><a href="sqspell_options.php?MOD=enc_setup">' |
| 47 | . _("Encrypt or decrypt your personal dictionary") |
| 48 | . "</a></li>\n"; |
| 49 | } else { |
| 50 | $msg .= '<li>' |
| 51 | . _("Personal dictionary encryption options are not available") |
| 52 | . '</li>'; |
| 53 | } |
| 54 | $msg .= "</ul>\n"; |
| 55 | |
| 56 | |
| 57 | |
| 58 | // add checkbox to enable/disable the spellcheck button on compose screen |
| 59 | // |
| 60 | $sqspell_show_button = getPref($data_dir, $username, 'sqspell_show_button', 1); |
| 61 | $msg .= '<form method="post">' |
| 62 | . '<input type="hidden" name="MOD" value="change_main_options" />' |
| 63 | . '<input type="hidden" name="smtoken" value="' . sm_generate_security_token() . '" />' |
| 64 | . '<p>' |
| 65 | . '<input type="checkbox" id="sqspell_show_button" name="sqspell_show_button" value="1"'; |
| 66 | if ($sqspell_show_button) { |
| 67 | $msg .= ' checked="checked"'; |
| 68 | } |
| 69 | $msg .= ' /><label for="sqspell_show_button"> ' |
| 70 | . sprintf(_("Show \"%s\" button when composing"), _("Check Spelling")) |
| 71 | . "</label>\n"; |
| 72 | $msg .= " <input type=\"submit\" value=\" " |
| 73 | . _("Make these changes") . " \" /></p></form>"; |
| 74 | |
| 75 | |
| 76 | sqspell_makePage( _("SquirrelSpell Options Menu"), null, $msg); |
| 77 | |
| 78 | /** |
| 79 | * For Emacs weenies: |
| 80 | * Local variables: |
| 81 | * mode: php |
| 82 | * End: |
| 83 | * vim: syntax=php |
| 84 | */ |