- remove first !IE6 check and send Pragma and NoCache Headers
[squirrelmail.git] / plugins / squirrelspell / modules / init.mod
1 <?php
2 /**
3 * init.mod
4 * ---------
5 * Squirrelspell module
6 *
7 * Copyright (c) 1999-2003 The SquirrelMail development team
8 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 *
10 * Initial loading of the popup window interface.
11 *
12 * $Id$
13 *
14 * @author Konstantin Riabitsev <icon@duke.edu> ($Author$)
15 * @version $Date$
16 */
17
18 /**
19 * See if we need to give user the option of choosing which dictionary
20 * s/he wants to use to spellcheck his message.
21 */
22 $langs=sqspell_getSettings(null);
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){
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>'
35 . "<input type=\"hidden\" name=\"sqspell_use_app\" value=\"$langs[0]\">";
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) {
48 $msg .= ' selected';
49 }
50 $msg .= " value=\"$langs[$i]\"> " . _($langs[$i]) . "</option>\n";
51 }
52 $msg .= ' </select>'
53 . '<input type="submit" value="' . _("Go") . '">'
54 . '</p>';
55 }
56 $msg .="</form>\n";
57 sqspell_makeWindow($onload, _("SquirrelSpell Initiating"), "init.js", $msg);
58
59 /**
60 * For the Emacs weenies:
61 * Local variables:
62 * mode: php
63 * End:
64 */
65
66 ?>