remove cacert/ prefix
[cacert-devel.git] / pages / account / 41.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 <form method="post" action="account.php">
19 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="400">
20 <tr>
21 <td colspan="2" class="title"><?=_("My Language Settings")?></td>
22 </tr>
23 <tr>
24 <td class="DataTD"><?=_("My prefered language")?>:</td>
25 <td class="DataTD"><select name="lang">
26 <?
27 echo $_SESSION['_config']['language'];
28 foreach($_SESSION['_config']['translations'] as $key => $val)
29 {
30 echo "<option value='$key'";
31 if($key == $_SESSION['_config']['language'])
32 echo " selected";
33 echo ">$val</option>\n";
34 }
35 ?>
36 </select>
37 </td>
38 </tr>
39 <tr>
40 <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Update")?>"></td>
41 </tr>
42 </table>
43 <input type="hidden" name="oldid" value="<?=$id?>">
44 <input type="hidden" name="action" value="default">
45 <input type="hidden" name="csrf" value="<?=make_csrf('mainlang')?>" />
46 </form>
47 <form method="post" action="account.php">
48 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="400">
49 <tr>
50 <td colspan="2" class="title"><?=_("Additional Language Preferences")?></td>
51 </tr>
52 <?
53 $query = "select * from `addlang` where `userid`='".intval($_SESSION['profile']['id'])."'";
54 $res = mysql_query($query);
55 while($row = mysql_fetch_assoc($res))
56 {
57 $lang = mysql_fetch_assoc(mysql_query("select * from `languages` where `locale`='".mysql_escape_string($row['lang'])."'"));
58 ?>
59 <tr>
60 <td class="DataTD"><?=_("Additional Language")?>:</td>
61 <td class="DataTD" align="left"><? echo "${lang['lang']} - ${lang['country']}"; ?>
62 <a href="account.php?oldid=41&amp;action=dellang&amp;remove=<?=$row['lang']?>&amp;csrf=<?=make_csrf('seclang')?>"><?=_("Delete")?></a></td>
63 </tr>
64 <? } ?>
65 <tr>
66 <td class="DataTD"><?=_("Secondary languages")?>:</td>
67 <td class="DataTD"><select name="addlang">
68 <?
69 $query = "select * from `languages` order by `locale`";
70 $res = mysql_query($query);
71 while($row = mysql_fetch_assoc($res))
72 {
73 echo "<option value='".sanitizeHTML($row['locale'])."'";
74 echo ">".$row['country']." - ".$row['lang']."</option>\n";
75 }
76 ?>
77 </select>
78 </td>
79 </tr>
80 <tr>
81 <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Add")?>"></td>
82 </tr>
83 </table>
84 <input type="hidden" name="oldid" value="<?=$id?>">
85 <input type="hidden" name="action" value="addsec">
86 <input type="hidden" name="csrf" value="<?=make_csrf('seclang')?>" />
87 </form>