$xMeeting = $_POST['xMeeting']; // +++ set session and cookie if (!defined('CFG_CURRENT_EVENT')) { define('CFG_CURRENT_EVENT', $xSerie); } $_SESSION[CFG_SESSION]['xSerie'] = $xSerie; set_cookie('xSerie', $xSerie); if (!defined('CFG_CURRENT_MEETING')) { define('CFG_CURRENT_MEETING', $xMeeting); } $_SESSION[CFG_SESSION]['xMeeting'] = $xMeeting; set_cookie('xMeeting', $xMeeting); // --- set session and cookie location('index.php'); } elseif (isset($_POST['frm_action']) && $_POST['frm_action'] == 'quit_event') { resetActiveAthlete(CFG_CURRENT_EVENT); closeEvent($_POST['xRunde'], $glb_status_quit); location('index.php'); } include ROOT_PATH . 'header.php'; // +++ get events $meetings = getMeetings(CFG_CURRENT_MEETING); $events = getEvents(CFG_CURRENT_MEETING, CFG_CURRENT_EVENT); // --- get events if (CFG_CURRENT_EVENT > 0) { if ($events) { $type = $glb_types_results[$events['disc_type']]; } else { closeEvent(0, $glb_status_quit); location('index.php'); }
function setActiveAthlete($event, $athlete) { global $glb_connection_server; try { resetActiveAthlete($event); $sql_set = "UPDATE serienstart\r\n SET AktivAthlet = 'y'\r\n WHERE xSerienstart = :serienstart;"; $query_set = $glb_connection_server->prepare($sql_set); $query_set->bindValue(':serienstart', $athlete); $query_set->execute(); } catch (PDOException $e) { trigger_error($e->getMessage()); } }