Some random documentation updates.
[squirrelmail.git] / plugins / squirrelspell / modules / enc_setup.mod
CommitLineData
849bdf42 1<?php
d112ed5a 2/**
3 * enc_setup.mod
4 * --------------
5 * Squirrelspell module
6 *
76911253 7 * Copyright (c) 1999-2003 The SquirrelMail development team
d112ed5a 8 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 *
10 * This module shows the user a nice invitation to encrypt or decypt
11 * his/her personal dictionary and explains the caveats of such a decision.
12 *
13 * $Id$
14 *
15 * @author Konstantin Riabitsev <icon@duke.edu> ($Author$)
16 * @version $Date$
17 */
849bdf42 18
d112ed5a 19global $SQSPELL_CRYPTO;
2b5a7157 20
a8380e75 21/**
22 * Set up some i18n'able wrappers for javascript.
23 */
24$msg = "<script type='text/javascript'><!--\n"
25 . "var ui_makesel = \"" . _("Please make your selection first.") . "\";\n"
26 . "var ui_encrypt = \""
27 . _("This will encrypt your personal dictionary and store it in an encrypted format. Proceed?")
28 . "\";\n"
29 . "var ui_decrypt = \""
30 . _("This will decrypt your personal dictionary and store it in a clear-text format. Proceed?")
31 . "\";\n"
32 . "//-->\n</script>";
33
d112ed5a 34$words=sqspell_getWords();
35/**
36 * When getting the user dictionary, the SQSPELL_CRYPTO flag will be
37 * set to "true" if the dictionary is encrypted, or "false" if it is
38 * in plain text.
39 */
40if ($SQSPELL_CRYPTO){
41 /**
42 * Current format is encrypted.
43 * Unfortunately, the following text needs to be all on one line,
44 * unless someone fixes xgettext. ;(
45 */
a8380e75 46 $msg .=
d112ed5a 47 _("<p>Your personal dictionary is <strong>currently encrypted</strong>. This helps protect your privacy in case the web-mail system gets compromized and your personal dictionary ends up stolen. It is currently encrypted with the password you use to access your mailbox, making it hard for anyone to see what is stored in your personal dictionary.</p> <p><strong>ATTENTION:</strong> If you forget your password, your personal dictionary will become unaccessible, since it can no longer be decrypted. If you change your mailbox password, SquirrelSpell will recognize it and prompt you for your old password in order to re-encrypt the dictionary with a new key.</p>")
48 . '<form method="post" onsubmit="return checkMe()">'
49 . '<input type="hidden" name="MOD" value="crypto">'
50 . '<p align="center"><input type="checkbox" name="action" '
51 . 'value="decrypt"> '
52 . _("Please decrypt my personal dictionary and store it in a clear-text format." )
53 . '</p>'
54 . '<p align="center"><input type="submit" value=" '
55 . _("Change crypto settings")
56 . ' "></p>'
57 . '</form>';
58} else {
59 /**
60 * Current format is clear text.
61 * Unfortunately, the following text needs to be all on one line,
62 * unless someone fixes xgettext. ;(
63 */
a8380e75 64 $msg .=
d112ed5a 65 _("<p>Your personal dictionary is <strong>currently not encrypted</strong>. You may wish to encrypt your personal dictionary to protect your privacy in case the webmail system gets compromized and your personal dictionary file gets stolen. When encrypted, the file's contents look garbled and are hard to decrypt without knowing the correct key (which is your mailbox password).</p> <strong>ATTENTION:</strong> If you decide to encrypt your personal dictionary, you must remember that it gets &quot;hashed&quot; with your mailbox password. If you forget your mailbox password and the administrator changes it to a new value, your personal dictionary will become useless and will have to be created anew. However, if you or your system administrator change your mailbox password but you still have the old password at hand, you will be able to enter the old key to re-encrypt the dictionary with the new value.</p>")
66 . '<form method="post" onsubmit="return checkMe()">'
67 . '<input type="hidden" name="MOD" value="crypto">'
68 . '<p align="center"><input type="checkbox" name="action" '
69 . 'value="encrypt"> '
70 . _("Please encrypt my personal dictionary and store it in an encrypted format.")
71 . '</p>'
72 . '<p align="center"><input type="submit" value=" '
73 . _("Change crypto settings") . ' "></p>'
74 . '</form>';
75}
76sqspell_makePage(_("Personal Dictionary Crypto Settings"),
77 "crypto_settings.js", $msg);
78
79/**
80 * For Emacs weenies:
81 * Local variables:
82 * mode: php
83 * End:
2b6b400e 84 * vim: syntax=php
d112ed5a 85 */
2b5a7157 86
15e6162e 87?>