<?php define('GLOBAL_PATH', '../../../../'); define('ROOT_PATH', '../../../'); define('CURRENT_CATEGORY', 'athletica_tech'); define('CURRENT_PAGE', 'results'); require_once ROOT_PATH . 'lib/inc.init.php'; require_once ROOT_PATH . 'lib/cls.result_high.php'; $athlete = $_POST['athlete']; $height = $_POST['height']; if ($height != "") { $height = formatResultDB($height); } else { $height = 0; } if (checkStartHeight($height, CFG_CURRENT_EVENT)) { $height_out = saveStartHeight($athlete, $height); createHeightTable(CFG_CURRENT_EVENT); updateResultTable($athlete, CFG_CURRENT_EVENT, $height); } else { $height_out = 'height'; } echo $height_out;
$query->bindValue(':ath_res', $ath_res_db); $query->bindValue(':height', $height); $query->bindValue(':ath_pts', $points); $query->bindValue(':ath_id', $ath_id); // --- bind parameters $query->execute(); } else { $sql_delete = "DELETE\r\n FROM resultat\r\n WHERE xResultat = :res_id;"; $query_delete = $glb_connection_server->prepare($sql_delete); $query_delete->bindValue(':res_id', $res_id); $query_delete->execute(); } $sql_athlete = "SELECT Starthoehe AS ath_start\r\n FROM serienstart\r\n WHERE xSerienstart = :serienstart;"; $query_athlete = $glb_connection_server->prepare($sql_athlete); $query_athlete->bindValue(':serienstart', $ath_id); $query_athlete->execute(); $athlete = $query_athlete->fetch(PDO::FETCH_ASSOC); createHeightTable(CFG_CURRENT_EVENT); updateResultTable($ath_id, CFG_CURRENT_EVENT, $athlete['ath_start']); rankAthletes(CFG_CURRENT_EVENT); calcRankingPoints($round); resetQualification($round); StatusChanged($round); $return = "ok"; } } catch (PDOException $e) { trigger_error($e->getMessage()); $return = $e; } echo $return; //---------------------------------------------------------------------
<?php define('GLOBAL_PATH', '../../../../'); define('ROOT_PATH', '../../../'); define('CURRENT_CATEGORY', 'athletica_tech'); define('CURRENT_PAGE', 'results'); require_once ROOT_PATH . 'lib/inc.init.php'; require_once ROOT_PATH . 'lib/cls.result_high.php'; $ath_id = $_POST['ath_id']; $ath_start = $_POST['ath_start']; $ath_res = $_POST['ath_res']; $sql_delete = "DELETE\r\n FROM resultat\r\n WHERE xSerienstart = :athlete\r\n AND Leistung = :result;"; $query_delete = $glb_connection_server->prepare($sql_delete); $query_delete->bindValue(':athlete', $ath_id); $query_delete->bindValue(':result', $ath_res); $query_delete->execute(); updateResultTable($ath_id, CFG_CURRENT_EVENT, $ath_start); rankAthletes(CFG_CURRENT_EVENT); calcRankingPoints($round); resetQualification($round); StatusChanged($round);