fix, removed debug message (from signup tournament)

fix, arena will now be created on demand (even when levelup)
adjusted the date in config.inc.php
main
hecht 13 years ago
parent 346246e63c
commit b9f7a6efb8

@ -313,12 +313,7 @@ function renovate($user, $arena, $vermoegen){
} }
$arena = mysql_fetch_assoc(mysql_query('SELECT * FROM arena where besitzer = \''.$user_ida['id'].'\'')); $arena = getArena($user_id);
if(!$arena['name']) {
$sql = 'INSERT arena(besitzer, exp) values (\''.$user_ida['id'].'\', \'0,'.calculateRequiredExpArena(1).'\')';
mysql_query($sql);
$arena = mysql_fetch_assoc(mysql_query('SELECT * FROM arena where besitzer = \''.$user_ida['id'].'\''));
}
$auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = '.$user_ida[id].' GROUP BY bieter')); $auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = '.$user_ida[id].' GROUP BY bieter'));
$auktionensumme = $auktionensumme['summe']; $auktionensumme = $auktionensumme['summe'];

@ -56,4 +56,17 @@ function calculateRenovierungsKosten($arena){
return (1-$arena['zustand'])*($arena['steh']*10+$arena['sitz']*150+$arena['loge']*18000); return (1-$arena['zustand'])*($arena['steh']*10+$arena['sitz']*150+$arena['loge']*18000);
} }
function getArena($user_id) {
$sql = 'SELECT * FROM arena where besitzer = \''.$user_id.'\'';
$qry = mysql_query($sql);
if(mysql_num_rows($qry) == 0) {
$sql = 'INSERT arena(besitzer, exp) values (\''.$user_id.'\', \'0,'.calculateRequiredExpArena(1).'\')';
mysql_query($sql);
$qry = mysql_query($sql);
}
$arena = mysql_fetch_assoc($qry);
return $arena;
}
?> ?>

@ -43,7 +43,7 @@ $name = validateName($_COOKIE['name']);
$passwort = validateString($_COOKIE['passwort']); $passwort = validateString($_COOKIE['passwort']);
$usergroups = getUserGroups($name); $usergroups = getUserGroups($name);
if(!isUserInGroup($usergroups, ADMIN) && time() < mktime(22, 10, 0, 1, 4, 2012)) { if(!isUserInGroup($usergroups, ADMIN) && time() < mktime(18, 0, 0, 1, 6, 2012)) {
$passwort = null; $passwort = null;
} }

@ -7,6 +7,7 @@
*/ */
include_once (ROOT_PATH . '/include/char.inc.php'); include_once (ROOT_PATH . '/include/char.inc.php');
include_once (ROOT_PATH . '/include/arena.inc.php');
function beautifyNumericValue($value, $step){ function beautifyNumericValue($value, $step){
@ -174,9 +175,9 @@ function addExpToChar($char_id, $n_exp){
} }
function addExpToArena($user_id, $n_exp){ function addExpToArena($user_id, $n_exp){
$sql = 'SELECT * from arena where besitzer = '.$user_id; // $sql = 'SELECT * from arena where besitzer = '.$user_id;
$qry = mysql_query($sql); // $qry = mysql_query($sql);
$arena = mysql_fetch_assoc($qry); $arena = getArena($user_id);
$arena_exp = explode(',', $arena['exp']); $arena_exp = explode(',', $arena['exp']);
$arena_exp[0] += $n_exp; $arena_exp[0] += $n_exp;
$lvls = 0; $lvls = 0;

@ -107,9 +107,9 @@ function displayDefault($user, $art){
} }
// sehr speziell und deswegen nicht getChar(); // sehr speziell und deswegen nicht getChar();
$sql = 'SELECT id, name FROM chars WHERE besitzer='.$user['id'].$special_clue; $sql = 'SELECT id, name FROM chars WHERE besitzer='.$user['id'].$special_clue;
echo $sql;
$char = mysql_query($sql); $char = mysql_query($sql);
if(!$char)
echo $sql;
?> ?>
<script type="text/javascript"> <script type="text/javascript">

Loading…
Cancel
Save