8 * This module lets the user edit his/her personal dictionary.
10 * @author Konstantin Riabitsev <icon at duke.edu>
11 * @copyright 1999-2018 The SquirrelMail Project Team
12 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
15 * @subpackage squirrelspell
21 . _("Please check any words you wish to delete from your dictionary.")
23 $pre_msg .= "<table border=\"0\" width=\"95%\" align=\"center\">\n";
26 * Get how many dictionaries this user has defined.
28 $langs=sqspell_getSettings();
30 foreach ($langs as $lang) {
32 * Get all words from this language dictionary.
34 $lang_words = sqspell_getLang($lang);
35 if (! empty($lang_words)){
37 * There are words in this dictionary. If this is the first
38 * language we're processing, prepend the output with the
41 if (!isset($msg) || !$msg) {
44 $msg .= "<tr bgcolor=\"$color[0]\" align=\"center\"><th>"
45 . sprintf( _("%s dictionary"), $lang ) . '</th></tr>'
46 . '<tr><td align="center">'
47 . '<form method="post">'
48 . '<input type="hidden" name="MOD" value="forget_me" />'
49 . '<input type="hidden" name="sqspell_use_app" value="'
51 . '<table border="0" width="95%" align="center">'
53 . "<td valign=\"top\">\n";
55 * Do some fancy stuff to separate the words into three
58 for ($j=0; $j<sizeof($lang_words); $j++){
59 if ($j==intval(sizeof($lang_words)/3)
60 || $j==intval(sizeof($lang_words)/3*2)){
61 $msg .= "</td><td valign=\"top\">\n";
63 $msg .= "<input type=\"checkbox\" name=\"words_ary[]\" "
64 . 'value="'.sm_encode_html_special_chars($lang_words[$j]). '" id="words_ary_'
65 . $j . '" /> <label for="words_ary_' . $j .'">'
66 . sm_encode_html_special_chars($lang_words[$j]) . "</label><br />\n";
68 $msg .= '</td></tr></table></td></tr>'
69 . "<tr bgcolor=\"$color[0]\" align=\"center\"><td>"
70 . '<input type="submit" value="' . _("Delete checked words")
72 . '</td></tr><tr><td><hr />'
77 * Check if all dictionaries were empty.
80 $msg = '<p>' . _("No words in your personal dictionary.") . '</p>';
84 sqspell_makePage(_("Edit your Personal Dictionary"), null, $msg);