2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
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.
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.
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
19 require_once($_SESSION['_config']['filepath'].'/includes/lib/l10n.php');
22 <form method
="post" action
="account.php">
23 <table align
="center" valign
="middle" border
="0" cellspacing
="0" cellpadding
="0" class="wrapper" width
="400">
25 <td colspan
="2" class="title"><?
=_("My Language Settings")?
></td
>
28 <td
class="DataTD"><?
=_("My preferred language")?
>:</td
>
29 <td
class="DataTD"><select name
="lang">
31 foreach(L10n
::$translations as $key => $val)
33 echo "<option value='$key'";
34 if($key == L10n
::get_translation())
36 echo ">$val</option>\n";
43 <td
class="DataTD" colspan
="2"><input type
="submit" name
="process" value
="<?=_("Update
")?>"></td
>
46 <input type
="hidden" name
="oldid" value
="<?=$id?>">
47 <input type
="hidden" name
="action" value
="default">
48 <input type
="hidden" name
="csrf" value
="<?=make_csrf('mainlang')?>" />
50 <form method
="post" action
="account.php">
51 <table align
="center" valign
="middle" border
="0" cellspacing
="0" cellpadding
="0" class="wrapper" width
="400">
53 <td colspan
="2" class="title"><?
=_("Additional Language Preferences")?
></td
>
56 $query = "select * from `addlang` where `userid`='".intval($_SESSION['profile']['id'])."'";
57 $res = mysql_query($query);
58 while($row = mysql_fetch_assoc($res))
60 $lang = mysql_fetch_assoc(mysql_query("select * from `languages` where `locale`='".mysql_escape_string($row['lang'])."'"));
63 <td
class="DataTD"><?
=_("Additional Language")?
>:</td
>
64 <td
class="DataTD" align
="left"><?
echo "${lang['lang']} - ${lang['country']}"; ?
>
65 <a href
="account.php?oldid=41&action=dellang&remove=<?=$row['lang']?>&csrf=<?=make_csrf('seclang')?>"><?
=_("Delete")?
></a
></td
>
69 <td
class="DataTD"><?
=_("Secondary languages")?
>:</td
>
70 <td
class="DataTD"><select name
="addlang">
72 $query = "select * from `languages` order by `locale`";
73 $res = mysql_query($query);
74 while($row = mysql_fetch_assoc($res))
76 printf("<option value=\"%s\">[%s] %s (%s)</option>\n",
77 sanitizeHTML($row['locale']),
78 sanitizeHTML($row['locale']),
88 <td
class="DataTD" colspan
="2"><input type
="submit" name
="process" value
="<?=_("Add
")?>"></td
>
91 <input type
="hidden" name
="oldid" value
="<?=$id?>">
92 <input type
="hidden" name
="action" value
="addsec">
93 <input type
="hidden" name
="csrf" value
="<?=make_csrf('seclang')?>" />