From 819ec0877172d61ea6eb4aa545dd7837ef5699c6 Mon Sep 17 00:00:00 2001 From: hecht Date: Wed, 20 Sep 2017 20:22:14 +0000 Subject: [PATCH] Fixed issue that money wasn't correctly displayed. --- ag/inclu/user-controll.php | 2 +- ag/include/user.inc.php | 6 +++--- ag/kampf_list.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ag/inclu/user-controll.php b/ag/inclu/user-controll.php index 592ea6d..5c50984 100644 --- a/ag/inclu/user-controll.php +++ b/ag/inclu/user-controll.php @@ -112,7 +112,7 @@ if ($name AND $passwort) { $user_geld = getRelevantMoney($user_ida['id']); - if ($user_info_test['geld']== $user_geld) { + if ($user_info_test['geld'] == $user_geld) { $geldstring = $user_info_test2['geld']; } else { $geldstring = displayMoney($user_geld) . ' (' . $user_info_test2['geld'] . ')'; diff --git a/ag/include/user.inc.php b/ag/include/user.inc.php index e05ad0d..7401ac9 100644 --- a/ag/include/user.inc.php +++ b/ag/include/user.inc.php @@ -59,11 +59,11 @@ function getRelevantMoney($userid) { $auktionensumme = mysqli_fetch_assoc(db_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = ' . $user['id'] . ' GROUP BY bieter')); $auktionensumme = $auktionensumme['summe']; - $qry = db_query('SELECT max(range_to) FROM test_ag.inverse_auktion_gebote WHERE bieter = '.$userid.' group by auktionsid'); + $qry = db_query('SELECT max(range_to) FROM inverse_auktion_gebote WHERE bieter = '.$userid.' group by auktionsid'); while( $inverse_summe = mysqli_fetch_row($qry) ) { $auktionensumme += $inverse_summe[0]; - } + } if ($auktionensumme == 0) { $money = $user['geld']; @@ -164,4 +164,4 @@ function setUserMetaDataEntry($userid, $key, $value) { } -?> \ No newline at end of file +?> diff --git a/ag/kampf_list.php b/ag/kampf_list.php index 885d0f8..4b1a41b 100644 --- a/ag/kampf_list.php +++ b/ag/kampf_list.php @@ -448,7 +448,7 @@ function displayKampfErstellen($user, $portal, $pagenum){ $qry = db_query('Select * from arena where besitzer = '.$user['id']); $arena = mysqli_fetch_assoc($qry); if(mysqli_num_rows($qry) == 0){ - db_query('INSERT arena(besitzer, exp) values (\''.$user_ida['id'].'\', \'0,'.calculateRequiredExpArena(1).'\')'); + db_query('INSERT arena(besitzer, exp) values (\''.$user['id'].'\', \'0,'.calculateRequiredExpArena(1).'\')'); $arena = mysqli_fetch_assoc(db_query('Select * from arena where besitzer = '.$user['id'])); } if($arena['mietlasten'] > 7){