userdata["acclevel"] < 80) die ("Access denied!"); function delete_game($game) { global $db; $srvtables = array( "hlstats_Events_Admin", "hlstats_Events_ChangeName", "hlstats_Events_ChangeRole", "hlstats_Events_ChangeTeam", "hlstats_Events_Chat", "hlstats_Events_Connects", "hlstats_Events_Disconnects", "hlstats_Events_Entries", "hlstats_Events_Frags", "hlstats_Events_Latency", "hlstats_Events_PlayerActions", "hlstats_Events_PlayerPlayerActions", "hlstats_Events_Rcon", "hlstats_Events_Statsme", "hlstats_Events_Statsme2", "hlstats_Events_StatsmeLatency", "hlstats_Events_StatsmeTime", "hlstats_Events_Suicides", "hlstats_Events_TeamBonuses", "hlstats_Events_Teamkills", "hlstats_Servers_Config" ); $pltables = array( "hlstats_PlayerNames" ); $dbtables = array( "hlstats_Actions", "hlstats_Awards", "hlstats_Ribbons", "hlstats_Roles", "hlstats_Teams", "hlstats_Weapons", "hlstats_Ranks", "hlstats_Maps_Counts", "hlstats_Servers", "hlstats_Players_History", "hlstats_Players_Awards", "hlstats_Players_Ribbons", "hlstats_PlayerUniqueIds", "hlstats_Players", "hlstats_Clans", "hlstats_Trend" ); $resultServers = $db->query("SELECT serverId FROM hlstats_Servers WHERE game = '$game'"); if ($db->num_rows($resultServers) > 0) { $serverlist = "("; while ($server = $db->fetch_row($resultServers)) { $serverlist .= $server[0].','; } $serverlist = preg_replace('/,$/', ')',$serverlist); foreach ($srvtables as $srvt) { echo "
\n"; echo "Done.
"; } function removeGameSettings($table, $game) { global $db; $db->query("SELECT COUNT(game) AS cnt FROM $table WHERE game='$game';"); $r = $db->fetch_array(); if ($r['cnt'] == 0) { $ret = "No data existent for selected gametype."; } else { $ret = $r['cnt']." entries deleted!"; $SQL = "DELETE FROM $table WHERE game='$game';"; $db->query($SQL); } return $ret."\n"; } $edlist = new EditList("code", "hlstats_Games", "game", false, false, "", 'delete_game'); $edlist->columns[] = new EditListColumn("code", "Game Code", 10, true, "readonly", "", 16); $edlist->columns[] = new EditListColumn("name", "Display Name", 30, true, "text", "", 128); $edlist->columns[] = new EditListColumn("realgame", "Game", 50, true, "select", "hlstats_Games_Supported.name/code/", 128); $edlist->columns[] = new EditListColumn("hidden", "