XHTML fixes
[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 */
2ad4cea9 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 plain text format. Proceed?")
31 . "\";\n"
32 . "//-->\n</script>";
a8380e75 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){
2ad4cea9 41 /**
42 * Current format is encrypted.
43 * Unfortunately, the following text needs to be all on one line,
44 * unless someone fixes xgettext. ;(
45 */
46 $msg .=
47 '<p>'
48 . _("Your personal dictionary is currently encrypted.")
49 . '</p><p>'
50 . _("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.")
51 . '</p><p>'
52 . '<strong>' . _("ATTENTION:") . '</strong><br />'
53 . _("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.")
54 . '</p>'
55 . '<form method="post" onsubmit="return checkMe()">'
04fa3c41 56 . '<input type="hidden" name="MOD" value="crypto" />'
2ad4cea9 57 . '<p align="center"><input type="checkbox" name="action" '
04fa3c41 58 . 'value="decrypt" /> '
2ad4cea9 59 . _("Please decrypt my personal dictionary and store it in a clear-text format." )
60 . '</p>'
61 . '<p align="center"><input type="submit" value=" '
62 . _("Change crypto settings")
04fa3c41 63 . ' " /></p>'
2ad4cea9 64 . '</form>';
d112ed5a 65} else {
2ad4cea9 66 /**
67 * Current format is clear text.
68 * Unfortunately, the following text needs to be all on one line,
69 * unless someone fixes xgettext. ;(
70 */
71 $msg .=
72 '<p>'
73 . _("Your personal dictionary is currently not encrypted.")
74 . '</p><p>'
75 . _("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).")
76 . '</p><p>'
77 . '<strong>' . _("ATTENTION:") . '</strong><br />'
78 . _("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.")
79 . '</p>'
80 . '<form method="post" onsubmit="return checkMe()">'
04fa3c41 81 . '<input type="hidden" name="MOD" value="crypto" />'
2ad4cea9 82 . '<p align="center"><input type="checkbox" name="action" '
04fa3c41 83 . 'value="encrypt" /> '
2ad4cea9 84 . _("Please encrypt my personal dictionary and store it in an encrypted format.")
85 . '</p>'
86 . '<p align="center"><input type="submit" value=" '
04fa3c41 87 . _("Change crypto settings") . ' " /></p>'
2ad4cea9 88 . '</form>';
d112ed5a 89}
90sqspell_makePage(_("Personal Dictionary Crypto Settings"),
91 "crypto_settings.js", $msg);
92
93/**
94 * For Emacs weenies:
95 * Local variables:
96 * mode: php
97 * End:
2b6b400e 98 * vim: syntax=php
d112ed5a 99 */
2b5a7157 100
04fa3c41 101?>