using 'pass' instead of 'ascii'. internal mbstring encoding that should
[squirrelmail.git] / plugins / squirrelspell / modules / init.mod
CommitLineData
849bdf42 1<?php
d112ed5a 2/**
91e0dccc 3 * init.mod
d112ed5a 4 * ---------
5 * Squirrelspell module
6 *
9eb3fcb3 7 * Copyright (c) 1999-2005 The SquirrelMail Project Team
d112ed5a 8 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 *
10 * Initial loading of the popup window interface.
11 *
44d661aa 12 * @author Konstantin Riabitsev <icon@duke.edu>
13 * @version $Id$
14 * @package plugins
15 * @subpackage squirrelspell
d112ed5a 16 */
849bdf42 17
d112ed5a 18/**
91e0dccc 19 * See if we need to give user the option of choosing which dictionary
d112ed5a 20 * s/he wants to use to spellcheck his message.
21 */
22$langs=sqspell_getSettings(null);
23$msg = '<form method="post">'
04fa3c41 24 . '<input type="hidden" name="MOD" value="check_me" />'
25 . '<input type="hidden" name="sqspell_text" />'
d112ed5a 26 . '<p align="center">';
91e0dccc 27if (sizeof($langs)==1){
d112ed5a 28 /**
29 * Only one dictionary defined by the user. Submit the form
30 * automatically.
31 */
32 $onload="sqspell_init(true)";
33 $msg .= _("Please wait, communicating with the server...")
34 . '</p>'
04fa3c41 35 . "<input type=\"hidden\" name=\"sqspell_use_app\" value=\"$langs[0]\" />";
d112ed5a 36} else {
37 /**
38 * More than one dictionary. Let the user choose the dictionary first
39 * then manually submit the form.
40 */
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++){
46 $msg .= "<option";
47 if (!$i) {
e1728a7a 48 $msg .= ' selected="selected"';
2b5a7157 49 }
d112ed5a 50 $msg .= " value=\"$langs[$i]\"> " . _($langs[$i]) . "</option>\n";
91e0dccc 51 }
d112ed5a 52 $msg .= ' </select>'
04fa3c41 53 . '<input type="submit" value="' . _("Go") . '" />'
d112ed5a 54 . '</p>';
55}
56$msg .="</form>\n";
57sqspell_makeWindow($onload, _("SquirrelSpell Initiating"), "init.js", $msg);
58
59/**
60 * For the Emacs weenies:
61 * Local variables:
62 * mode: php
63 * End:
2b6b400e 64 * vim: syntax=php
d112ed5a 65 */
91e0dccc 66
04fa3c41 67?>