8 * Initial loading of the popup window interface.
10 * @author Konstantin Riabitsev <icon at duke.edu>
11 * @copyright 1999-2013 The SquirrelMail Project Team
12 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
15 * @subpackage squirrelspell
19 * See if we need to give user the option of choosing which dictionary
20 * s/he wants to use to spellcheck his message.
22 $langs=sqspell_getSettings();
23 $msg = '<form method="post">'
24 . '<input type="hidden" name="MOD" value="check_me" />'
25 . '<input type="hidden" name="sqspell_text" />'
26 . '<p align="center">';
27 if (sizeof($langs)==1){
29 * Only one dictionary defined by the user. Submit the form
32 $onload="sqspell_init(true)";
33 $msg .= _("Please wait, communicating with the server...")
35 . "<input type=\"hidden\" name=\"sqspell_use_app\" value=\"$langs[0]\" />";
38 * More than one dictionary. Let the user choose the dictionary first
39 * then manually submit the form.
41 $onload="sqspell_init(false)";
42 $msg .= _("Please choose which dictionary you would like to use to spellcheck this message:")
43 . '</p><p align="center">'
44 . '<select name="sqspell_use_app">';
45 for ($i=0; $i<sizeof($langs); $i++){
48 $msg .= ' selected="selected"';
50 $msg .= " value=\"$langs[$i]\"> " . _($langs[$i]) . "</option>\n";
53 . '<input type="submit" value="' . _("Go") . '" />'
57 sqspell_makeWindow($onload, _("SquirrelSpell Initiating"), "init.js", $msg);
60 * For the Emacs weenies: