From 02e0fca62593375faeafc3bdb0e6a804c68fb361 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 15 Aug 2006 23:00:25 +0000 Subject: [PATCH] bug #168 --- includes/account.php | 14 ++++++++++++-- pages/account/41.php | 14 ++++++++++++++ pages/wot/9.php | 3 +-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/includes/account.php b/includes/account.php index 9547c46..cae3f56 100644 --- a/includes/account.php +++ b/includes/account.php @@ -1924,8 +1924,18 @@ 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'"); + $addlang = mysql_real_escape_string($_REQUEST['addlang']); + mysql_query("insert into `addlang` set `userid`='".$_SESSION['profile']['id']."', `lang`='$addlang'"); + showheader(_("My CAcert.org Account!")); + echo _("Your language setting has been updated."); + showfooter(); + exit; + } + + if($oldid == 41 && $_REQUEST['action'] == 'dellang') + { + $remove = mysql_real_escape_string($_REQUEST['remove']); + mysql_query("delete from `addlang` where `userid`='".$_SESSION['profile']['id']."' and `lang`='$remove'"); showheader(_("My CAcert.org Account!")); echo _("Your language setting has been updated."); showfooter(); diff --git a/pages/account/41.php b/pages/account/41.php index 0f7d20b..358dd2b 100644 --- a/pages/account/41.php +++ b/pages/account/41.php @@ -21,6 +21,7 @@ : diff --git a/pages/wot/9.php b/pages/wot/9.php index 7fb679c..96a9251 100644 --- a/pages/wot/9.php +++ b/pages/wot/9.php @@ -52,9 +52,8 @@ 0) + while($row = mysql_fetch_assoc($res)) { - $row = mysql_fetch_assoc($res); $lang = mysql_fetch_assoc(mysql_query("select * from `languages` where `locale`='${row['lang']}'")); ?>