continue; } #update the var, and be sure to only update it if the new range is in value. Otherwise leave it alone. dbn("update se_db_vars set {$db_name}_value = '" . (int) $value . "' where name = '" . mysql_escape_string((string) $var) . "' && '{$value}' >= min && '{$value}' <= max"); } //save the changed variables to files. require_once "build_vars.php"; insert_history($user['login_id'], "Updated Game Vars"); //update all player scores } elseif (isset($_GET['update_scores'])) { if ($GAME_VARS['score_method'] == 0) { $out .= "Scoring is presently turned off. Set the admin var to something other than 0 to turn it on.<br /><br />"; } else { $resultat = mysql_query("select * from {$db_name}_users where login_id > 5"); while ($data = mysql_fetch_array($resultat)) { score_func($data['login_id'], 0); } $out .= "Scores successfully updated.<br /><br />"; } insert_history($user['login_id'], "Updated All Player Scores"); //give players money } elseif (isset($_REQUEST['more_money'])) { if (!isset($_POST['money_amount'])) { get_var('Increase Money', $_SERVER['PHP_SELF'], "How much money do you want to give to each player?", "money_amount", ''); } elseif ($_POST['money_amount'] < 1) { $out .= "You can't decrease the players money.<br /><br />"; } else { $money_amount = (int) $_POST['money_amount']; $out .= "Player's money reserves increased by <b>{$money_amount}</b><br />Note: This has NOT sent a message to the players. That is your job.<br /><br />"; dbn("update {$db_name}_users set cash = cash + '{$money_amount}' where login_id != 1"); insert_history($user['login_id'], "Gave <b>{$money_amount}</b> credits to all players.");
if (!empty($in_game)) { //see if user is banned from the selected game if (($in_game['banned_time'] > time() || $in_game['banned_time'] == -1) && $login_id > 5) { print_header("Banned"); if ($in_game['banned_time'] > time()) { echo sprintf($st[795], date("D jS M - H:i", $in_game['banned_time']), stripslashes($in_game['banned_reason'])); } elseif ($in_game['banned_time'] < 0) { echo $st[796] . ":<br /><br />" . stripslashes($in_game['banned_reason']); } print_footer(); exit; } //not banned from game, so may continue. insert_history($login_id, "Logged into {$db_name}"); //Update score score_func($login_id, 0); //set the user in the game, and increase login count by 1. dbn("update {$db_name}_users set game_login_count = game_login_count + 1 where login_id = '{$login_id}'"); dbn("update user_accounts set in_game = '{$db_name}' where login_id = '{$login_id}'"); // header("Location: ".URL_PREFIX."/location.php"); echo "<script>self.location='location.php';</script>"; exit; //user joining selected game } else { db("select count(login_id) from {$db_name}_users where login_id = '{$login_id}'"); $check_count = dbr(); db("select * from se_games where db_name = '{$db_name}'"); $game_info = dbr(1); //get the vars for the game require_once "{$directories['includes']}/{$db_name}_vars.inc.php"; //determine when retired if retired, and that isn't rejoining within illicit time.