} if (isset($_POST['update_all_games'])) { updateAllGames(); //header("Location: {$_SERVER['HTTP_REFERER']}"); echo '<META HTTP-EQUIV="Refresh" Content="0; URL=admin_config.php?eb_games">'; } if (isset($_POST['add_games'])) { insertGames(); header("Location: admin_config.php?eb_games"); exit; } if (isset($_POST['addfaction'])) { $faction_name = $_POST['factionname']; $faction_icon = $_POST['factionicon']; if ($faction_icon != "" && $faction_name != "") { add_faction($game_id, $faction_icon, $faction_name); } //dbg: echo "Faction: $game_id, $faction_icon, $faction_name"; header("Location: admin_config.php?eb_games&gameid={$game_id}"); exit; } if (isset($_POST['edit_faction']) && $_POST['edit_faction'] != "") { $faction = $_POST['edit_faction']; $faction_name = $_POST['factionname' . $faction]; $faction_icon = $_POST['factionicon' . $faction]; if ($faction_icon != "" && $faction_name != "") { update_faction($faction, $faction_icon, $faction_name); } //dbg: echo "Update Faction: $faction, $faction_icon, $faction_name"; header("Location: admin_config.php?eb_games&gameid={$game_id}"); exit;
if ($results) { $body->set("results", $results); } break; case 4: // Add faction check_authorization(); $body = new Template("templates/faction/faction.add.tmpl.php"); $body->set('currzone', $z); $body->set('suggested_id', suggest_faction_id()); $breadcrumbs .= " >> Add New Faction"; break; case 5: // Insert faction check_authorization(); add_faction(); $fid = $_POST['id']; header("Location: index.php?editor=faction&fid={$fid}"); exit; case 6: // Delete faction check_authorization(); delete_faction(); header("Location: index.php?editor=faction"); exit; case 7: // ToDo: Copy faction check_authorization(); $body = new Template("templates/faction/faction.default.tmpl.php"); break; case 8: