bug 985: replace occurences of $_SESSION['_config']['translations']
[cacert-devel.git] / pages / wot / 5.php
1 <? /*
2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 include_once("../includes/shutdown.php");
19 require_once("../includes/lib/l10n.php");
20 ?>
21 <?
22 if(array_key_exists('error',$_SESSION['_config']) && $_SESSION['_config']['error'] != "")
23 {
24 if(array_key_exists('reminderset',$_SESSION['_config']) && $_SESSION['_config']['remindersent'] == 1)
25 {
26 ?><font color="orange" size="+1"><?
27 }
28 else
29 {
30 ?><font color="orange" size="+1"><?=_("ERROR")?>: <?
31 }
32 echo $_SESSION['_config']['error']."</font>";
33 unset($_SESSION['_config']['error']);
34 }
35 ?>
36 <? if(array_key_exists('noemailfound',$_SESSION['_config']) && $_SESSION['_config']['noemailfound'] == 1) { ?>
37 <form method="post" action="wot.php">
38 <input type="hidden" name="email" value="<?=sanitizeHTML($_POST['email'])?>"><br>
39 <select name="reminder-lang">
40 <?
41 if($_SESSION['_config']['reminder-lang'] == "")
42 $_SESSION['_config']['reminder-lang'] = $_SESSION['profile']['language'];
43 foreach(L10n::$translations as $key => $val)
44 {
45 echo "<option value='$key'";
46 if($key == $_SESSION['_config']['reminder-lang'])
47 echo " selected";
48 echo ">$val</option>\n";
49 }
50 ?>
51 </select><br>
52 <input type="hidden" name="oldid" value="<?=$id?>">
53 <input type="submit" name="reminder" value="<?=_("Send reminder notice")?>">
54 </form>
55 <? unset($_SESSION['_config']['noemailfound']); } ?>
56 <form method="post" action="wot.php" name="form1">
57 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
58 <tr>
59 <td colspan="2" class="title"><?=_("Assure Someone")?></td>
60 </tr>
61 <tr>
62 <td class="DataTD"><?=_("Email")?>:</td>
63 <? if(array_key_exists('remindersent',$_SESSION['_config']) && $_SESSION['_config']['remindersent'] == 1) { unset($_SESSION['_config']['remindersent']) ?>
64 <td class="DataTD"><input type="text" name="email" id="email" value=""></td>
65 <? } else { ?>
66 <td class="DataTD"><input type="text" name="email" id="email" value="<?=array_key_exists('email',$_POST)?sanitizeHTML($_POST['email']):""?>"></td>
67 <? } ?>
68 </tr>
69 <tr>
70 <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td>
71 </tr>
72 </table>
73 <input type="hidden" name="oldid" value="<?=$id?>">
74 </form>
75 <SCRIPT LANGUAGE="JavaScript">
76 //<![CDATA[
77 function my_init()
78 {
79 document.getElementById("email").focus();
80 }
81
82 window.onload = my_init();
83 //]]>
84 </script>