pull/1/head
root 18 years ago
parent 3a13ceb2da
commit 5a37deface

@ -1900,7 +1900,7 @@
unset($oldid);
}
if($oldid == 41)
if($oldid == 41 && $_REQUEST['action'] == 'default')
{
$lang = mysql_real_escape_string($_REQUEST['lang']);
foreach($_SESSION['_config']['translations'] as $key => $val)
@ -1922,6 +1922,16 @@
exit;
}
if($oldid == 41 && $_REQUEST['action'] == 'addsec')
{
$lang = mysql_real_escape_string($_REQUEST['addlang']);
mysql_query("insert into `addlang` set `userid`='".$_SESSION['profile']['id']."', `lang`='$lang'");
showheader(_("My CAcert.org Account!"));
echo _("Your language setting has been updated.");
showfooter();
exit;
}
if(($id == 42 || $id == 43 || $id == 44 || $id == 48 || $id == 49 || $id == 50 ||
$oldid == 42 || $oldid == 43 || $oldid == 44 || $oldid == 48 || $oldid == 49 || $oldid == 50) &&
$_SESSION['profile']['admin'] != 1)

@ -37,4 +37,32 @@
</tr>
</table>
<input type="hidden" name="oldid" value="<?=$id?>">
<input type="hidden" name="action" value="default">
</form>
<form method="post" action="account.php">
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="400">
<tr>
<td colspan="2" class="title"><?=_("Additional Language Preferences")?></td>
</tr>
<tr>
<td class="DataTD"><?=_("Secondary languages")?>:</td>
<td class="DataTD"><select name="addlang">
<?
$query = "select * from `languages` order by `locale`";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
echo "<option value='${row['locale']}'";
echo ">${row['country']} - ${row['lang']}</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Add")?>"></td>
</tr>
</table>
<input type="hidden" name="oldid" value="<?=$id?>">
<input type="hidden" name="action" value="addsec">
</form>

Loading…
Cancel
Save