if (isset($_GET['change_template_variable_action'])) { $pool = new Pool(); $template_id = $_GET['template_id']; $result_array_test = $pool->ChangeTemplateLiveVariable($template_id, $_GET['change_template_variable_action']); } //PUBLISH OR RETIRE SERIES if (isset($_GET['change_series_variable_action'])) { $pool = new Pool(); $series_id = $_GET['series_id']; $result_array_test = $pool->ChangeSeriesLiveVariable($series_id, $_GET['change_series_variable_action']); } //DELETE POOL - IF POOL IS TO BE DELETED if (isset($_GET['delete_pool_id'])) { $pool = new Pool(); $pool_to_be_deleted = $_GET['delete_pool_id']; $pool->DeletePool($pool_to_be_deleted); } //IF WE ARE UPDATING POOL SETTINGS (START/END DATES OR START/END TIMES) VIA EDIT_POOL.PHP PAGE: if ($_GET['edit_pool_settings'] == 1) { $pool = new Pool(); $error_message = $pool->UpdatePoolSettings($_GET['pool_id'], $_GET['edit_item'], $_GET['edit_value']); echo $error_message; } if ($_GET['make_live'] == '762' . $pool_id . '8354') { //if we are making the pool live $pool = new Pool($pool_id); $make_pool_live_result = $pool->MakePoolLive($pool_id); header("Location: pool.php?pool_id={$pool_id}"); //refresh the pool.php page once pool is live } if ($_GET['end_pool'] == '8341' . $pool_id . '8165') {
$current_user_id = $user->GetUserIDFromEmail($current_user); if ($current_user_id != 1) { //make sure user is a site admin, if not, return them to the home page header("Location: home.php"); } else { //if we successfully got the pool id from the URL and the user is a site ADMIN: include_once 'inc/class.pool.inc.php'; $pool = new Pool(); //new instance of the Pool class $pool_id = $_GET['pool_id']; //get pool ID from URL if (isset($_GET['delete'])) { //if delete variable is set if ($_GET['delete'] == 5668) { //if delete variable is the proper value (meaning the "delete button was clicked from this page") $pool->DeletePool($pool_id); //delete all entries associated with the pool header("Location: home.php"); //return user to the home page once pool is deleted } } else { $pool_fetch_result = $pool->GetPoolData($pool_id); $confirm_delete_url = "delete_pool.php?pool_id={$pool_id}&delete=5668"; } } } include_once "inc/header.php"; ?> <br> <div style="text-align: center"> <h1 style="color:red">WARNING</h1>