if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } } mysql_query("UNLOCK TABLES"); } } $arg = isset($_GET['arg']) ? $_GET['arg'] : (isset($_COOKIE['sort_enrolement']) ? $_COOKIE['sort_enrolement'] : 'nbr'); setcookie('sort_enrolement', $arg, time() + 2419200); // // Display enrolement list // $page = new GUI_Page('event_enrolement', TRUE); $page->startPage(); $page->printPageTitle($strEnrolement . ": " . $_COOKIE['meeting']); $menu = new GUI_Menulist(); if ($teamsm) { $menu->addButton("dlg_print_event_enrolement.php?category={$category}&event={$event}&comb={$comb}&catFrom={$catFrom}&catTo={$catTo}&discFrom={$discFrom}&discTo={$discTo}&mDate={$mDate}&teamsm={$teamsm}&group={$tm_group}", $strPrint . " ...", '_self'); } else { $menu->addButton("dlg_print_event_enrolement.php?category={$category}&event={$event}&comb={$comb}&catFrom={$catFrom}&catTo={$catTo}&discFrom={$discFrom}&discTo={$discTo}&mDate={$mDate}&group={$mk_group}", $strPrint . " ...", '_self'); } $menu->addButton($cfgURLDocumentation . 'help/event/enrolement.html', $strHelp, '_blank'); $menu->printMenu(); // sort argument $img_nbr = "img/sort_inact.gif"; $img_name = "img/sort_inact.gif"; $img_club = "img/sort_inact.gif"; $img_team = "img/sort_inact.gif"; if ($arg == "nbr") { $argument = "a.Startnummer"; $img_nbr = "img/sort_act.gif";
return; // abort } if (AA_checkMeetingID() == FALSE) { // no meeting selected return; // abort } $ukc_meeting = AA_checkMeeting_UKC(); // // Display data // ------------ $page = new GUI_Page('meeting_entries_header'); $page->startPage(); $page->printPageTitle($strEntries . ": " . $_COOKIE['meeting']); $menu = new GUI_Menulist(); if ($ukc_meeting == 'n') { $menu->addButton("meeting_entry_add.php", $strNewEntry, "detail"); } else { $menu->addButton("meeting_entry_add_UKC.php", $strNewEntryUKC, "detail"); } $menu->addButton("meeting_entries_efforts.php", $strUpdateEfforts, "detail"); $menu->addButton("meeting_entries_startnumbers.php", "{$strStartnumbers}", "detail"); $menu->addButton("meeting_entries_setteams.php", "{$strTeamsAutoAssign}", "detail"); $menu->addButton("meeting_entries_setgroups.php", $strCombinedGroupsAutoAssign, "detail"); $menu->addButton('meeting_entries_print.php', "{$strPrint} ...", "detail"); $menu->addButton('meeting_entries_payment_print.php', "{$strPayed}", "detail"); $menu->addButton('meeting_entries_receipt.php', "{$strReceipt}", "detail"); //$menu->addButton('meeting_entries_export.php', "$strExport (Excel)", "detail"); $menu->addButton($cfgURLDocumentation . 'help/meeting/entries.html', $strHelp, '_blank'); $menu->addSearchfield('meeting_entries_search.php', 'detail');
} // // Display administration // $page = new GUI_Page('admin_service'); $page->startPage(); $page->printPageTitle($strServiceMenu); $menu = new GUI_Menulist(); $menu->printMenu(); ?> <p/> <?php if ($res_srv_lg == 'ok') { if (isset($_SESSION['temp']) && $_SESSION['temp']['action'] == 'disc' && $_SESSION['temp']['res'] == 'select') { $menu = new GUI_Menulist(); $menu->addButton('admin_service.php', $strBack); $menu->printMenu(); ?> <br/> <form name="frmDisc" action="admin_service.php" method="post"> <input type="hidden" name="arg" value="disc"/> <input type="hidden" name="xMeeting" value="<?php echo $_SESSION['temp']['xMeeting']; ?> "/> <table width="430" border="0" cellpadding="0" cellspacing="0" class="dialog"> <colgroup> <col width="100"/> <col width="330"/>
} } } } } } } } } // // Display heats // $page = new GUI_Page('event_heats'); $page->startPage(); $page->printPageTitle($strHeatSeeding . ": " . $_COOKIE['meeting']); $menu = new GUI_Menulist(); $menu->addButton($cfgURLDocumentation . 'help/event/heats.html', $strHelp, '_blank'); $menu->printMenu(); ?> <script type="text/javascript"> <!-- var selected = 0; var oldClass = 0; var focus = ""; var obj = 0; var value1 = ""; var value2 = ""; function clickTrack(o, item, heatID, heatName, position) { // Select Athlete
} /*if($omega->connection == "ftp"){ $ftp = "checked"; }else{ $local = "checked"; }*/ $optic = "checked"; $optic2 = ""; $local = "checked"; // // Display options for time measurement // $page = new GUI_Page('meeting_timing'); $page->startPage(); $page->printPageTitle($strTiming); $menu = new GUI_Menulist(); $menu->addButton($cfgURLDocumentation . 'help/meeting/timing.html', $strHelp, '_blank'); $menu->addButton($cfgURLDocumentation . 'help/meeting/athletica_netzwerk.pdf', $strOmegaManual, '_blank'); $menu->printMenu(); if (!empty($GLOBALS['ERROR'])) { AA_printErrorMsg($GLOBALS['ERROR']); } ?> <p/> <table class='dialog'> <form name="system" action="meeting_timing.php" method="post"> <input type="hidden" name="arg" value="change_system"> <tr> <th class='dialog'><?php echo $strTiming; ?>
require './lib/cl_xml_data.lib.php'; require './lib/cl_http_data.lib.php'; if (AA_connectToDB() == FALSE) { // invalid DB connection return; } /*if(AA_checkMeetingID() == FALSE){ // no meeting selected return; // abort }*/ // // Display enrolement list // $page = new GUI_Page('admin_base'); $page->startPage(); $page->printPageTitle($strBaseUpdate); $menu = new GUI_Menulist(); $menu->addButton($cfgURLDocumentation . 'help/administration/base.html', $strHelp, '_blank'); $menu->printMenu(); ?> <p/> <?php // handle reset request if ($_GET['arg'] == "reset") { ?> <p><?php echo $strResetDo; ?> </p> <input type="button" value="<?php echo $strYes;
return; // abort } if (AA_checkMeetingID() == FALSE) { // no meeting selected return; // abort } $round = 0; if (!empty($_GET['round'])) { $round = $_GET['round']; } $page = new GUI_Page('speaker_entry'); $page->startPage(); $page->printPageTitle($strEntry . ": " . $_COOKIE['meeting']); $menu = new GUI_Menulist(); $menu->addButton($cfgURLDocumentation . 'help/speaker/entry.html', $strHelp, '_blank'); if (!empty($_POST['back'])) { $menu->addButton($_POST['back'], $strBack); } $menu->printMenu(); ?> <p /> <?php $item = 0; if (!empty($_GET['item'])) { $item = $_GET['item']; } $relay = 0; if (!empty($_GET['relay'])) { $relay = $_GET['relay'];
function AA_speaker_Track($event, $round, $layout) { require './lib/cl_gui_menulist.lib.php'; require './lib/cl_gui_resulttable.lib.php'; require './lib/cl_performance.lib.php'; require './config.inc.php'; require './lib/common.lib.php'; $mergedMain = AA_checkMainRound($round); if ($mergedMain != 1) { $relay = AA_checkRelay($event); // check, if this is a relay event $status = AA_getRoundStatus($round); $svm = AA_checkSVM(0, $round); // decide whether to show club or team name // No action yet if ($status == $cfgRoundStatus['open'] || $status == $cfgRoundStatus['enrolement_done'] || $status == $cfgRoundStatus['heats_in_progress']) { AA_printWarningMsg($strHeatsNotDone); } else { if ($status == $cfgRoundStatus['enrolement_pending']) { AA_printWarningMsg($strEnrolementNotDone); } else { if ($status >= $cfgRoundStatus['heats_done']) { // show link to rankinglist if results done if ($status == $cfgRoundStatus['results_done']) { $menu = new GUI_Menulist(); $menu->addButton("print_rankinglist.php?event={$event}&round={$round}&type=single&formaction=speaker&show_efforts=none", $GLOBALS['strRankingList']); $menu->addButton("print_rankinglist.php?event={$event}&round={$round}&type=single&formaction=speaker&show_efforts=sb_pb", $GLOBALS['strRankingListEfforts']); $menu->printMenu(); echo "<p/>"; } // show qualification info if another round follows $nextRound = AA_getNextRound($event, $round); if ($nextRound > 0) { $result = mysql_query("\r\n\t\t\t\tSELECT\r\n\t\t\t\t\tQualifikationSieger\r\n\t\t\t\t\t, QualifikationLeistung\r\n\t\t\t\tFROM\r\n\t\t\t\t\trunde\r\n\t\t\t\tWHERE xRunde = {$round}\r\n\t\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { if (($row = mysql_fetch_row($result)) == TRUE) { } echo "{$strQualification}: {$row['0']} {$strQualifyTop}, {$row['1']} {$strQualifyPerformance}"; echo "<p/>"; } // ET DB error mysql_free_result($result); } // ET next round // display all athletes if ($relay == FALSE) { // single event $query = "\r\n SELECT\r\n r.Bahnen\r\n , rt.Name\r\n , rt.Typ\r\n , s.xSerie\r\n , s.Bezeichnung\r\n , s.Wind\r\n , s.Film\r\n , s.Status\r\n , ss.xSerienstart\r\n , ss.Position\r\n , ss.Rang\r\n , ss.Qualifikation\r\n , a.Startnummer\r\n , at.Name\r\n , at.Vorname\r\n , at.Jahrgang\r\n , if('" . $svm . "', te.Name, IF(a.Vereinsinfo = '', v.Name, a.Vereinsinfo)) \r\n , LPAD(s.Bezeichnung,5,'0') as heatid\r\n , at.Land\r\n , st.Bestleistung\r\n , at.xAthlet\r\n FROM\r\n runde AS r\r\n LEFT JOIN serie AS s ON (s.xRunde = r.xRunde)\r\n LEFT JOIN serienstart AS ss ON (ss.xSerie = s.xSerie )\r\n LEFT JOIN start AS st ON (st.xStart = ss.xStart)\r\n LEFT JOIN anmeldung AS a ON (a.xAnmeldung = st.xAnmeldung)\r\n LEFT JOIN athlet AS at ON (at.xAthlet = a.xAthlet)\r\n LEFT JOIN verein AS v ON (v.xVerein = at.xVerein)\r\n LEFT JOIN team AS te ON(a.xTeam = te.xTeam)\r\n LEFT JOIN rundentyp_" . $_COOKIE['language'] . " AS rt ON rt.xRundentyp = r.xRundentyp\r\n LEFT JOIN anlage AS an ON an.xAnlage = s.xAnlage\r\n WHERE \r\n r.xRunde = {$round} \r\n ORDER BY\r\n heatid\r\n , ss.Position\r\n "; } else { // relay event $query = "\r\n SELECT\r\n r.Bahnen\r\n , rt.Name\r\n , rt.Typ\r\n , s.xSerie\r\n , s.Bezeichnung\r\n , s.Wind\r\n , s.Film\r\n , s.Status\r\n , ss.xSerienstart\r\n , ss.Position\r\n , ss.Rang\r\n , ss.Qualifikation\r\n , sf.Name\r\n , if('" . $svm . "', te.Name, v.Name) \r\n , LPAD(s.Bezeichnung,5,'0') as heatid\r\n , r.xRunde\r\n , st.xStart\r\n FROM\r\n runde AS r\r\n LEFT JOIN serie AS s ON (s.xRunde = r.xRunde)\r\n LEFT JOIN serienstart AS ss ON (ss.xSerie = s.xSerie)\r\n LEFT JOIN start AS st ON (st.xStart = ss.xStart )\r\n LEFT JOIN staffel AS sf ON (sf.xStaffel = st.xStaffel )\r\n LEFT JOIN verein AS v ON (v.xVerein = sf.xVerein)\r\n LEFT JOIN team AS te ON(sf.xTeam = te.xTeam)\r\n LEFT JOIN rundentyp_" . $_COOKIE['language'] . " AS rt ON rt.xRundentyp = r.xRundentyp\r\n LEFT JOIN anlage AS an ON an.xAnlage = s.xAnlage\r\n WHERE \r\n r.xRunde = {$round} \r\n ORDER BY\r\n heatid\r\n , ss.Position"; } $result = mysql_query($query); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { // initialize variables $h = 0; // heat counter $p = 0; // position counter (to evaluate empty heats $tracks = 0; $resTable = new GUI_TrackResultTable($round, $layout, $status, $nextRound); while ($row = mysql_fetch_row($result)) { $p++; // increment position counter /* * Heat headerline */ if ($h != $row[3]) { $tracks = $row[0]; // keep nbr of planned tracks // fill previous heat with empty tracks if ($p > 1) { $resTable->printEmptyTracks($p, $tracks, 5 + $c); } $h = $row[3]; // keep heat ID $p = 1; // start with track one if (is_null($row[1])) { // only one round $title = "{$strFinalround} {$row['4']}"; } else { // more than one round $title = "{$row['1']}: {$row['2']}{$row['4']}"; } // increment colspan to include ranking and qualification $c = 0; if ($status == $cfgRoundStatus['results_done']) { $c++; if ($nextRound > 0) { $c++; } } $resTable->printHeatTitle($row[3], $row[4], $title, $row[7], $row[6], $row[5]); if ($relay == FALSE) { // athlete display $resTable->printAthleteHeader('', $round); } else { // relay display $resTable->printRelayHeader('', $round); } } // ET new heat /* * Empty tracks */ if ($layout == $cfgDisciplineType[$strDiscTypeTrack] || $layout == $cfgDisciplineType[$strDiscTypeTrackNoWind] || $layout == $cfgDisciplineType[$strDiscTypeRelay]) { // current track and athlete's position not identical if ($p < $row[9]) { $p = $resTable->printEmptyTracks($p, $row[9] - 1, 6 + $c); } } // ET empty tracks /* * Athlete/Relay data lines */ // get performance $perf = ''; $perfRounded = ''; $res = mysql_query("\r\n\t\t\t\t\tSELECT\r\n\t\t\t\t\t\trs.xResultat\r\n\t\t\t\t\t\t, rs.Leistung\r\n\t\t\t\t\t\t, rs.Info\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\tresultat AS rs\r\n\t\t\t\t\tWHERE rs.xSerienstart = {$row['8']}\r\n\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\trs.Leistung ASC\r\n\t\t\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $resrow = mysql_fetch_row($res); if ($resrow != NULL) { // result found $perf = AA_formatResultTime($resrow[1]); $perfRounded = AA_formatResultTime($resrow[1], true); } mysql_free_result($res); } // ET DB error // print lines if ($relay == FALSE) { $resTable->printAthleteLine($row[9], $row[12], "{$row['13']} {$row['14']}", AA_formatYearOfBirth($row[15]), $row[16], AA_formatResultTime($row[19], true), $perfRounded, $row[10], $row[11], $row[18], $row[20]); } else { // relay // get Athletes $arrAthletes = array(); $sql = "SELECT at.Vorname, at.Name, at.Jahrgang, a.Startnummer FROM\r\n\t\t\t\t\t\t\t\tstaffelathlet as sfat\r\n\t\t\t\t\t\t\t\tLEFT JOIN start as st ON sfat.xAthletenstart = st.xStart\r\n\t\t\t\t\t\t\t\tLEFT JOIN anmeldung as a USING(xAnmeldung)\r\n\t\t\t\t\t\t\t\tLEFT JOIN athlet as at USING(xAthlet)\r\n\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\tsfat.xStaffelstart = {$row['16']}\r\n\t\t\t\t\t\t\tAND\tsfat.xRunde = {$row['15']}\r\n\t\t\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\t\t\tsfat.Position"; $res_at = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($row_at = mysql_fetch_array($res_at)) { $arrAthletes[] = array($row_at[1], $row_at[0], AA_formatYearOfBirth($row_at[2]), $row_at[3]); } } $arrAthletes = count($arrAthletes) > 0 ? $arrAthletes : 0; $resTable->printRelayLine($row[9], $row[12], $row[13], $perfRounded, $row[10], $row[11], $arrAthletes); } } // Fill last heat with empty tracks for disciplines run in // individual tracks if ($layout == $cfgDisciplineType[$strDiscTypeTrack] || $layout == $cfgDisciplineType[$strDiscTypeTrackNoWind] || $layout == $cfgDisciplineType[$strDiscTypeRelay]) { if ($p > 0) { // heats set up $p++; $resTable->printEmptyTracks($p, $tracks, 6 + $c); } } // ET track disciplines $resTable->endTable(); mysql_free_result($result); } // ET DB error } } } // ET heat seeding done } else { AA_printErrorMsg($strErrMergedRoundSpeaker); } }
$p = new Protect(); if (!empty($_POST['password'])) { $p->secureMeeting($_COOKIE['meeting_id'], $_POST['password']); } } if ($_POST['arg'] == "del_password") { $p = new Protect(); $p->unsecureMeeting($_COOKIE['meeting_id']); } // // Display administration // $page = new GUI_Page('admin'); $page->startPage(); $page->printPageTitle($strAdministration . ' - ' . $strVersionCheck); $menu = new GUI_Menulist(); $menu->addButton('admin.php', $strBack, '_self'); $menu->printMenu(); ?> <p/> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="475" style="vertical-align: top;"> <?php $newer = false; $http = new HTTP_data(); $webserverDomain = $cfgSLVhost; // domain of swiss-athletics webserver $result = $http->send_post($webserverDomain, '/meetings/athletica/version.php', '', 'ini'); $version = $result['version'];
function AA_speaker_Tech($event, $round, $layout) { require './lib/cl_gui_resulttable.lib.php'; require './config.inc.php'; require './lib/common.lib.php'; require './lib/results.lib.php'; $status = AA_getRoundStatus($round); $mergedMain = AA_checkMainRound($round); if ($mergedMain != 1) { // No action yet if ($status == $cfgRoundStatus['open'] || $status == $cfgRoundStatus['enrolement_done'] || $status == $cfgRoundStatus['heats_in_progress']) { AA_printWarningMsg($strHeatsNotDone); } else { if ($status == $cfgRoundStatus['enrolement_pending']) { AA_printWarningMsg($strEnrolementNotDone); } else { if ($status >= $cfgRoundStatus['heats_done']) { $temp = mysql_query("\r\n\t\t\tCREATE TABLE `temp` (\r\n `id` int(10) NOT NULL auto_increment,\r\n `athlet` int(10) NOT NULL default '0',\r\n `leistung` int(11) NOT NULL default '0',\r\n `rang` int(10) NOT NULL default '0',\r\n PRIMARY KEY (`id`)\r\n) TYPE=MyISAM AUTO_INCREMENT=1\r\n\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } $sql = "\r\n SELECT\r\n rt.Name\r\n , rt.Typ\r\n , s.xSerie\r\n , s.Bezeichnung\r\n , s.Wind\r\n , s.Status\r\n , ss.xSerienstart\r\n , ss.Position\r\n , ss.Rang\r\n , a.Startnummer\r\n , at.Name\r\n , at.Vorname\r\n , at.Jahrgang\r\n , v.Name\r\n , LPAD(s.Bezeichnung,5,'0') as heatid\r\n , w.Windmessung\r\n , at.xAthlet\r\n , at.Land\r\n FROM\r\n runde AS r\r\n LEFT JOIN serie AS s ON (s.xRunde = r.xRunde )\r\n LEFT JOIN serienstart AS ss ON (ss.xSerie = s.xSerie)\r\n LEFT JOIN start AS st ON (st.xStart = ss.xStart)\r\n LEFT JOIN anmeldung AS a ON (a.xAnmeldung = st.xAnmeldung)\r\n LEFT JOIN athlet AS at ON (at.xAthlet = a.xAthlet)\r\n LEFT JOIN verein AS v ON (v.xVerein = at.xVerein)\r\n LEFT JOIN wettkampf AS w ON (w.xWettkampf = r.xWettkampf)\r\n LEFT JOIN rundentyp_" . $_COOKIE['language'] . " AS rt ON rt.xRundentyp = r.xRundentyp\r\n WHERE \r\n r.xRunde = {$round} \r\n ORDER BY\r\n heatid\r\n , ss.Position\r\n "; $temp = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($row = mysql_fetch_row($temp)) { $tempsql = "SELECT\r\n\t\t\t\t\t\tMAX(r.Leistung) As maxLeistung\r\n\t\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\tresultat AS r\r\n\t\t\t\t\tWHERE r.xSerienstart = {$row['6']}"; $tempres = mysql_query($tempsql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($restemp = mysql_fetch_row($tempres)) { if (!empty($restemp[0])) { mysql_query("INSERT INTO `temp` ( `athlet` , `leistung` , `rang`) \r\n\t\t\t\t VALUES ({$row['6']}, {$restemp['0']} , 1);"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } } } } mysql_free_result($tempres); } mysql_free_result($temp); } $xrang = 1; $templeistung = 0; $temprang = mysql_query("SELECT * FROM temp ORDER BY leistung DESC"); while ($rowrang = mysql_fetch_row($temprang)) { if ($rowrang[2] == $templeistung) { $rangieren = mysql_query("UPDATE temp SET rang = {$yrang} WHERE id={$rowrang['0']}"); } else { $rangieren = mysql_query("UPDATE temp SET rang = {$xrang} WHERE id={$rowrang['0']}"); $yrang = $xrang; } $templeistung = $rowrang[2]; $xrang = $xrang + 1; } // if this is a combined event, rank all rounds togheter $roundSQL = ""; if ($combined) { $roundSQL = "AND s.xRunde IN ("; $res_c = mysql_query("SELECT xRunde FROM runde WHERE xWettkampf = " . $event); while ($row_c = mysql_fetch_array($res_c)) { $roundSQL .= $row_c[0] . ","; } $roundSQL = substr($roundSQL, 0, -1) . ")"; } else { $roundSQL = "AND s.xRunde = {$round}"; } $countAthlete = 0; $sql_at = "SELECT \r\n Count(*)\r\n FROM \r\n start AS s \r\n WHERE \r\n s.xWettkampf = " . $event; $result_at = mysql_query($sql_at); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } $row_at = mysql_fetch_row($result_at); if (mysql_num_rows($result_at) > 0) { $countAthlete = $row_at[0]; } // show link to rankinglist if results done if ($status == $cfgRoundStatus['results_done']) { $menu = new GUI_Menulist(); $menu->addButton("print_rankinglist.php?event={$event}&round={$round}&type=single&formaction=speaker", $GLOBALS['strRankingList']); $menu->addButton("print_rankinglist.php?event={$event}&round={$round}&type=single&formaction=speaker&show_efforts=sb_pb", $GLOBALS['strRankingListEfforts']); $menu->printMenu(); echo "<p/>"; } $svm = AA_checkSVM(0, $round); // decide whether to show club or team name $prog_mode = AA_results_getProgramMode(); // find current athlete (show yellow) when more than one attempt $roundSQL_C = substr($roundSQL, 4); $sql_curr = "SELECT \r\n count( * ) , \r\n ss.xSerienstart,\r\n if (ss.Position2 > 0, if (ss.Position3 > 0, ss.Position3, ss.Position2) , ss.Position ) as posOrder,\r\n s.MaxAthlet,\r\n ss.Position2,\r\n ss.Position3\r\n FROM \r\n resultat as r \r\n LEFT JOIN serienstart AS ss ON ( r.xSerienstart = ss.xSerienstart)\r\n LEFT JOIN serie AS s ON (ss.xSerie = s.xSerie )\r\n WHERE \r\n {$roundSQL_C} \r\n GROUP BY ss.xSerienstart\r\n ORDER BY posOrder "; $res_curr = mysql_query($sql_curr); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $ss = 0; $keep_ss = 0; // current athlete to show yellow $keep_ss_first = 0; // first athlete is current when all have same count of attempts $c = 0; $z = 0; $maxAthlete = 0; while ($row_curr = mysql_fetch_row($res_curr)) { if ($z > 0 && $z == $maxAthlete) { break; } if ($c > 0) { if ($row_curr[0] < $c) { $keep_ss_save = $keep_ss; $keep_ss = $row_curr[1]; break; } } $c = $row_curr[0]; $ss = $row_curr[1]; if ($z == 0) { $keep_ss_first = $row_curr[1]; if ($row_curr[4] > 0 || $row_curr[5] > 0) { $maxAthlete = $row_curr[3]; } } $z++; } } if ($prog_mode == 0) { if ($keep_ss == 0 && $r < $r_attempts) { $keep_ss = $keep_ss_first; } else { if ($r < $r_attempts) { $keep_ss = $keep_ss_save; } } } else { if ($keep_ss == 0 && $z % $countAthlete == 0) { $keep_ss = $keep_ss_first; } } $arg = isset($_GET['arg']) ? $_GET['arg'] : (isset($_COOKIE['sort_speaker']) ? $_COOKIE['sort_speaker'] : 'pos'); setcookie('sort_speaker', $arg, time() + 2419200); // display all athletes if ($arg == "nbr" && !$relay) { $argument = "a.Startnummer"; $img_nbr = "img/sort_act.gif"; } else { if ($arg == "pos") { $argument = "ss.Position"; $img_pos = "img/sort_act.gif"; } else { if ($arg == "name") { $argument = "at.Name, at.Vorname"; $img_name = "img/sort_act.gif"; } else { if ($arg == "club") { if ($svm) { $argument = "te.Name, a.Startnummer"; } else { $argument = "v.Name, a.Startnummer"; } $img_club = "img/sort_act.gif"; } else { if ($arg == "perf") { $argument = "st.Bestleistung, ss.Position"; $img_perf = "img/sort_act.gif"; } else { if ($arg == "rang") { $argument = "t.rang, ss.Position"; $img_rang = "img/sort_act.gif"; } else { if ($relay == FALSE) { // single event $argument = "ss.Position"; $img_pos = "img/sort_act.gif"; } } } } } } } $sql = "\r\n SELECT\r\n rt.Name\r\n , rt.Typ\r\n , s.xSerie\r\n , s.Bezeichnung\r\n , s.Wind\r\n , s.Status\r\n , ss.xSerienstart\r\n , ss.Position\r\n , ss.Rang\r\n , a.Startnummer\r\n , at.Name\r\n , at.Vorname\r\n , at.Jahrgang\r\n , if('" . $svm . "', te.Name, IF(a.Vereinsinfo = '', v.Name, a.Vereinsinfo)) \r\n , LPAD(s.Bezeichnung,5,'0') as heatid\r\n , w.Windmessung\r\n , st.Bestleistung\r\n , at.xAthlet\r\n , at.Land\r\n , t.rang\r\n , r.xRunde\r\n FROM\r\n runde AS r\r\n LEFT JOIN serie AS s ON (s.xRunde = r.xRunde )\r\n LEFT JOIN serienstart AS ss ON (ss.xSerie = s.xSerie)\r\n LEFT JOIN start AS st ON (st.xStart = ss.xStart)\r\n LEFT JOIN anmeldung AS a ON (a.xAnmeldung = st.xAnmeldung)\r\n LEFT JOIN athlet AS at ON (at.xAthlet = a.xAthlet)\r\n LEFT JOIN verein AS v ON (v.xVerein = at.xVerein)\r\n LEFT JOIN team AS te ON(a.xTeam = te.xTeam) \r\n LEFT JOIN wettkampf AS w ON (w.xWettkampf = r.xWettkampf)\r\n LEFT JOIN temp AS t ON (t.athlet = ss.xSerienstart)\r\n LEFT JOIN rundentyp_" . $_COOKIE['language'] . " AS rt ON rt.xRundentyp = r.xRundentyp\r\n WHERE \r\n r.xRunde = {$round} \r\n ORDER BY s.xSerie, \r\n " . $argument . "\r\n "; $result = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { // initialize variables $h = 0; $i = 0; $r = 0; $resTable = new GUI_TechResultTable($round, $layout, $status); while ($row = mysql_fetch_row($result)) { /* * Heat headerline */ if ($h != $row[2]) { $h = $row[2]; // keep heat ID if (is_null($row[0])) { // only one round $title = "{$strFinalround} {$row['3']}"; } else { // more than one round $title = "{$row['0']}: {$row['1']}{$row['3']}"; } $c = 0; $c++; // increment colspan to include ranking $resTable->printHeatTitle($row[2], $row[3], $title, $row[5]); $resTable->printAthleteHeader('', $row[20]); } // ET new heat /* * Athlete data lines */ $perfs = array(); $fett = array(); $sql = "SELECT\r\n\t\t\t\t\t\tr.Leistung\r\n\t\t\t\t\t\t, r.Info\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\tresultat AS r\r\n\t\t\t\t\tWHERE r.xSerienstart = {$row['6']}\r\n\t\t\t\t\tORDER BY\r\n\t\t\t\t\tr.xResultat"; $res = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($resrow = mysql_fetch_row($res)) { $sql2 = "SELECT\r\n\t\t\t\t\t\tleistung\r\n\t\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\ttemp\r\n\t\t\t\t\t\tWHERE athlet = {$row['6']}"; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_row($res2)) { if ($row2[0] == $resrow[0]) { $fett[] = 1; } else { $fett[] = 0; } $perf = AA_formatResultMeter($resrow[0]); if ($row[15] == 1) { // with wind $info = $resrow[1]; $perfs[] = "{$perf} ( {$info} )"; } else { $perfs[] = "{$perf}"; } } } // end loop every tech result acc. programm mode mysql_free_result($res); } //print_r($perfs); if ($keep_ss > 0) { if ($keep_ss == $row[6]) { $curr_class = "active"; } } else { if (empty($perfs) && !$current_athlete) { $current_athlete = true; $curr_class = "active"; } } $resTable->printAthleteLine($row[7], $row[9], "{$row['10']} {$row['11']}", AA_formatYearOfBirth($row[12]), $row[13], AA_formatResultMeter($row[16]), $perfs, $fett, $row[19], $row[18], $row[17], $curr_class); $curr_class = ""; } $resTable->endTable(); mysql_free_result($result); } // ET DB error } } } // ET heat seeding done $temp = mysql_query("\r\n\t\tDROP TABLE IF EXISTS `temp`\r\n\t"); } else { AA_printErrorMsg($strErrMergedRoundSpeaker); } ?> <script type="text/javascript"> <!-- window.setTimeout("updatePage()", <?php echo $cfgMonitorReload * 1000; ?> ); function updatePage() { window.open("speaker_results.php?round=<?php echo $round; ?> ", "main"); } </script> <?php }
function AA_speaker_High($event, $round, $layout) { require './lib/cl_gui_resulttable.lib.php'; require './config.inc.php'; require './lib/common.lib.php'; require './lib/results.lib.php'; $status = AA_getRoundStatus($round); // No action yet if ($status == $cfgRoundStatus['open'] || $status == $cfgRoundStatus['enrolement_done'] || $status == $cfgRoundStatus['heats_in_progress']) { AA_printWarningMsg($strHeatsNotDone); } else { if ($status == $cfgRoundStatus['enrolement_pending']) { AA_printWarningMsg($strEnrolementNotDone); } else { if ($status >= $cfgRoundStatus['heats_done']) { // show link to rankinglist if results done if ($status == $cfgRoundStatus['results_done']) { $menu = new GUI_Menulist(); $menu->addButton("print_rankinglist.php?round={$round}&type=single&formaction=speaker", $GLOBALS['strRankingList']); $menu->addButton("print_rankinglist.php?round={$round}&type=single&formaction=speaker&show_efforts=sb_pb", $GLOBALS['strRankingListEfforts']); $menu->printMenu(); echo "<p/>"; } $prog_mode = AA_results_getProgramMode(); // display all athletes $result = mysql_query("\r\n\t\t\tSELECT\r\n\t\t\t\trt.Name\r\n\t\t\t\t, rt.Typ\r\n\t\t\t\t, s.xSerie\r\n\t\t\t\t, s.Bezeichnung\r\n\t\t\t\t, s.Status\r\n\t\t\t\t, ss.xSerienstart\r\n\t\t\t\t, ss.Position\r\n\t\t\t\t, ss.Rang\r\n\t\t\t\t, a.Startnummer\r\n\t\t\t\t, at.Name\r\n\t\t\t\t, at.Vorname\r\n\t\t\t\t, at.Jahrgang\r\n\t\t\t\t, v.Name\r\n\t\t\t\t, LPAD(s.Bezeichnung,5,'0') as heatid\r\n\t\t\t\t, st.Bestleistung\r\n\t\t\t\t, at.xAthlet\r\n\t\t\t\t, at.Land\r\n\t\t\tFROM\r\n\t\t\t\trunde AS r\r\n\t\t\t\t, serie AS s\r\n\t\t\t\t, serienstart AS ss\r\n\t\t\t\t, start AS st\r\n\t\t\t\t, anmeldung AS a\r\n\t\t\t\t, athlet AS at\r\n\t\t\t\t, verein AS v\r\n\t\t\tLEFT JOIN rundentyp AS rt\r\n\t\t\t\tON rt.xRundentyp = r.xRundentyp\r\n\t\t\tWHERE r.xRunde = {$round}\r\n\t\t\tAND s.xRunde = r.xRunde\r\n\t\t\tAND ss.xSerie = s.xSerie\r\n\t\t\tAND st.xStart = ss.xStart\r\n\t\t\tAND a.xAnmeldung = st.xAnmeldung\r\n\t\t\tAND at.xAthlet = a.xAthlet\r\n\t\t\tAND v.xVerein = at.xVerein\r\n\t\t\tORDER BY\r\n\t\t\t\theatid\r\n\t\t\t\t, ss.Position\r\n\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { // initialize variables $h = 0; $i = 0; $resTable = new GUI_HighResultTable($round, $layout, $status); while ($row = mysql_fetch_row($result)) { /* * Heat headerline */ if ($h != $row[2]) { $h = $row[2]; // keep heat ID if (is_null($row[0])) { // only one round $title = "{$strFinalround} {$row['3']}"; } else { // more than one round $title = "{$row['0']}: {$row['1']}{$row['3']}"; } $c = 0; if ($status == $cfgRoundStatus['results_done']) { $c = 1; // increment colspan to include ranking } $resTable->printHeatTitle($row[2], $row[3], $title, $row[4]); $resTable->printAthleteHeader(); } // ET new heat /* * Athlete data lines */ $rank = ''; $perfs = array(); $res = mysql_query("\r\n\t\t\t\t\tSELECT\r\n\t\t\t\t\t\tr.Leistung\r\n\t\t\t\t\t\t, r.Info\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\tresultat as r\r\n\t\t\t\t\tWHERE r.xSerienstart = {$row['5']}\r\n\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\tr.xResultat DESC\r\n\t\t\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { if ($status == $cfgRoundStatus['results_done']) { $rank = $row[7]; } while ($resrow = mysql_fetch_row($res)) { $perf = AA_formatResultMeter($resrow[0]); $info = $resrow[1]; $perfs[] = "{$perf} ( {$info} )"; } // end loop every tech result acc. programm mode mysql_free_result($res); } $resTable->printAthleteLine($row[6], $row[8], "{$row['9']} {$row['10']}", AA_formatYearOfBirth($row[11]), $row[12], AA_formatResultMeter($row[14]), $perfs, $fett, $rank, $row[16], $row[15]); } $resTable->endTable(); mysql_free_result($result); } // ET DB error } } } // ET heat seeding done }
function AA_speaker_Tech($event, $round, $layout) { require './lib/cl_gui_resulttable.lib.php'; require './config.inc.php'; require './lib/common.lib.php'; require './lib/results.lib.php'; $status = AA_getRoundStatus($round); // No action yet if ($status == $cfgRoundStatus['open'] || $status == $cfgRoundStatus['enrolement_done'] || $status == $cfgRoundStatus['heats_in_progress']) { AA_printWarningMsg($strHeatsNotDone); } else { if ($status == $cfgRoundStatus['enrolement_pending']) { AA_printWarningMsg($strEnrolementNotDone); } else { if ($status >= $cfgRoundStatus['heats_done']) { $temp = mysql_query("\r\n\t\t\tCREATE TABLE `temp` (\r\n `id` int(10) NOT NULL auto_increment,\r\n `athlet` int(10) NOT NULL default '0',\r\n `leistung` int(11) NOT NULL default '0',\r\n `rang` int(10) NOT NULL default '0',\r\n PRIMARY KEY (`id`)\r\n) TYPE=MyISAM AUTO_INCREMENT=1\r\n\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } $temp = mysql_query("\r\n\t\t\tSELECT\r\n\t\t\t\trt.Name\r\n\t\t\t\t, rt.Typ\r\n\t\t\t\t, s.xSerie\r\n\t\t\t\t, s.Bezeichnung\r\n\t\t\t\t, s.Wind\r\n\t\t\t\t, s.Status\r\n\t\t\t\t, ss.xSerienstart\r\n\t\t\t\t, ss.Position\r\n\t\t\t\t, ss.Rang\r\n\t\t\t\t, a.Startnummer\r\n\t\t\t\t, at.Name\r\n\t\t\t\t, at.Vorname\r\n\t\t\t\t, at.Jahrgang\r\n\t\t\t\t, v.Name\r\n\t\t\t\t, LPAD(s.Bezeichnung,5,'0') as heatid\r\n\t\t\t\t, w.Windmessung\r\n\t\t\t\t, at.xAthlet\r\n\t\t\t\t, at.Land\r\n\t\t\tFROM\r\n\t\t\t\trunde AS r\r\n\t\t\t\t, serie AS s\r\n\t\t\t\t, serienstart AS ss\r\n\t\t\t\t, start AS st\r\n\t\t\t\t, anmeldung AS a\r\n\t\t\t\t, athlet AS at\r\n\t\t\t\t, verein AS v\r\n\t\t\t\t, wettkampf AS w\r\n\t\t\tLEFT JOIN rundentyp AS rt\r\n\t\t\t\tON rt.xRundentyp = r.xRundentyp\r\n\t\t\tWHERE r.xRunde = {$round}\r\n\t\t\tAND w.xWettkampf = r.xWettkampf\r\n\t\t\tAND s.xRunde = r.xRunde\r\n\t\t\tAND ss.xSerie = s.xSerie\r\n\t\t\tAND st.xStart = ss.xStart\r\n\t\t\tAND a.xAnmeldung = st.xAnmeldung\r\n\t\t\tAND at.xAthlet = a.xAthlet\r\n\t\t\tAND v.xVerein = at.xVerein\r\n\t\t\tORDER BY\r\n\t\t\t\theatid\r\n\t\t\t\t, ss.Position\r\n\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($row = mysql_fetch_row($temp)) { $tempsql = "SELECT\r\n\t\t\t\t\t\tMAX(r.Leistung) As maxLeistung\r\n\t\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\tresultat AS r\r\n\t\t\t\t\tWHERE r.xSerienstart = {$row['6']}"; $tempres = mysql_query($tempsql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($restemp = mysql_fetch_row($tempres)) { mysql_query("INSERT INTO `temp` ( `id` , `athlet` , `leistung` , `rang`) \r\n\t\t\t\tVALUES ('', '{$row['6']}', '{$restemp['0']}' , '1');"); } } mysql_free_result($tempres); } mysql_free_result($temp); } $xrang = 1; $templeistung = 0; $temprang = mysql_query("SELECT * FROM temp ORDER BY leistung DESC"); while ($rowrang = mysql_fetch_row($temprang)) { if ($rowrang[2] == $templeistung) { $rangieren = mysql_query("UPDATE temp SET rang = {$yrang} WHERE id={$rowrang['0']}"); } else { $rangieren = mysql_query("UPDATE temp SET rang = {$xrang} WHERE id={$rowrang['0']}"); $yrang = $xrang; } $templeistung = $rowrang[2]; $xrang = $xrang + 1; } // show link to rankinglist if results done if ($status == $cfgRoundStatus['results_done']) { $menu = new GUI_Menulist(); $menu->addButton("print_rankinglist.php?round={$round}&type=single&formaction=speaker", $GLOBALS['strRankingList']); $menu->addButton("print_rankinglist.php?round={$round}&type=single&formaction=speaker&show_efforts=sb_pb", $GLOBALS['strRankingListEfforts']); $menu->printMenu(); echo "<p/>"; } $prog_mode = AA_results_getProgramMode(); $arg = isset($_GET['arg']) ? $_GET['arg'] : (isset($_COOKIE['sort_speakres']) ? $_COOKIE['sort_speakres'] : 'pos'); setcookie('sort_speakres', $arg, time() + 2419200); // display all athletes if ($arg == "nbr" && !$relay) { $argument = "a.Startnummer"; $img_nbr = "img/sort_act.gif"; } else { if ($arg == "pos") { $argument = "ss.Position"; $img_pos = "img/sort_act.gif"; } else { if ($arg == "name") { $argument = "at.Name, at.Vorname"; $img_name = "img/sort_act.gif"; } else { if ($arg == "club") { $argument = "v.Name, a.Startnummer"; $img_club = "img/sort_act.gif"; } else { if ($arg == "perf") { $argument = "st.Bestleistung, ss.Position"; $img_perf = "img/sort_act.gif"; } else { if ($arg == "rang") { $argument = "t.rang, ss.Position"; $img_rang = "img/sort_act.gif"; } else { if ($relay == FALSE) { // single event $argument = "ss.Position"; $img_pos = "img/sort_act.gif"; } } } } } } } $result = mysql_query("\r\n\t\t\tSELECT\r\n\t\t\t\trt.Name\r\n\t\t\t\t, rt.Typ\r\n\t\t\t\t, s.xSerie\r\n\t\t\t\t, s.Bezeichnung\r\n\t\t\t\t, s.Wind\r\n\t\t\t\t, s.Status\r\n\t\t\t\t, ss.xSerienstart\r\n\t\t\t\t, ss.Position\r\n\t\t\t\t, ss.Rang\r\n\t\t\t\t, a.Startnummer\r\n\t\t\t\t, at.Name\r\n\t\t\t\t, at.Vorname\r\n\t\t\t\t, at.Jahrgang\r\n\t\t\t\t, v.Name\r\n\t\t\t\t, LPAD(s.Bezeichnung,5,'0') as heatid\r\n\t\t\t\t, w.Windmessung\r\n\t\t\t\t, st.Bestleistung\r\n\t\t\t\t, at.xAthlet\r\n\t\t\t\t, at.Land\r\n\t\t\t\t, t.rang\r\n\t\t\tFROM\r\n\t\t\t\trunde AS r\r\n\t\t\t\t, serie AS s\r\n\t\t\t\t, serienstart AS ss\r\n\t\t\t\t, start AS st\r\n\t\t\t\t, anmeldung AS a\r\n\t\t\t\t, athlet AS at\r\n\t\t\t\t, verein AS v\r\n\t\t\t\t, wettkampf AS w\r\n\t\t\t\t, temp AS t\r\n\t\t\tLEFT JOIN rundentyp AS rt\r\n\t\t\t\tON rt.xRundentyp = r.xRundentyp\r\n\t\t\tWHERE r.xRunde = {$round}\r\n\t\t\tAND w.xWettkampf = r.xWettkampf\r\n\t\t\tAND s.xRunde = r.xRunde\r\n\t\t\tAND ss.xSerie = s.xSerie\r\n\t\t\tAND st.xStart = ss.xStart\r\n\t\t\tAND a.xAnmeldung = st.xAnmeldung\r\n\t\t\tAND at.xAthlet = a.xAthlet\r\n\t\t\tAND v.xVerein = at.xVerein\r\n\t\t\tAND t.athlet = ss.xSerienstart\r\n\t\t\tORDER BY s.xSerie, \r\n\t\t\t\t" . $argument . "\r\n\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { // initialize variables $h = 0; $i = 0; $r = 0; $resTable = new GUI_TechResultTable($round, $layout, $status); while ($row = mysql_fetch_row($result)) { /* * Heat headerline */ if ($h != $row[2]) { $h = $row[2]; // keep heat ID if (is_null($row[0])) { // only one round $title = "{$strFinalround} {$row['3']}"; } else { // more than one round $title = "{$row['0']}: {$row['1']}{$row['3']}"; } $c = 0; $c++; // increment colspan to include ranking $resTable->printHeatTitle($row[2], $row[3], $title, $row[5]); $resTable->printAthleteHeader(); } // ET new heat /* * Athlete data lines */ $perfs = array(); $fett = array(); $sql = "SELECT\r\n\t\t\t\t\t\tr.Leistung\r\n\t\t\t\t\t\t, r.Info\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\tresultat AS r\r\n\t\t\t\t\tWHERE r.xSerienstart = {$row['6']}\r\n\t\t\t\t\tORDER BY\r\n\t\t\t\t\tr.xResultat"; $res = mysql_query($sql); //echo $sql; if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($resrow = mysql_fetch_row($res)) { $sql2 = "SELECT\r\n\t\t\t\t\t\tleistung\r\n\t\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\ttemp\r\n\t\t\t\t\t\tWHERE athlet = {$row['6']}"; $res2 = mysql_query($sql2); while ($row2 = mysql_fetch_row($res2)) { if ($row2[0] == $resrow[0]) { $fett[] = 1; } else { $fett[] = 0; } $perf = AA_formatResultMeter($resrow[0]); if ($row[15] == 1) { // with wind $info = $resrow[1]; $perfs[] = "{$perf} ( {$info} )"; } else { $perfs[] = "{$perf}"; } } } // end loop every tech result acc. programm mode mysql_free_result($res); } //print_r($perfs); $resTable->printAthleteLine($row[7], $row[9], "{$row['10']} {$row['11']}", AA_formatYearOfBirth($row[12]), $row[13], AA_formatResultMeter($row[16]), $perfs, $fett, $row[19], $row[18], $row[17]); } $resTable->endTable(); mysql_free_result($result); } // ET DB error } } } // ET heat seeding done $temp = mysql_query("\r\n\t\t\tDROP TABLE IF EXISTS `temp`\r\n\t\t"); }
if ($_POST['arg'] == "change") { AA_meeting_changeData(); } // Check if any error returned from DB if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } /*************************** * * General meeting data * ***************************/ $page = new GUI_Page('meeting_definition_header'); $page->startPage(); $page->printPageTitle("{$strMeeting} {$strMeetingDefinition}: " . $_COOKIE['meeting']); $menu = new GUI_Menulist(); $menu->addButton('print_meeting_definition.php', $strPrint, '_blank'); $menu->addButton('meeting_definition_event_add.php', $strNewEvent . " ...", 'detail'); $menu->addButton('print_meeting_statistics.php?arg=view', $strStatistics, 'detail'); $menu->addButton('print_meeting_statistics.php?arg=print', $strPrintStatistics, '_blank'); $menu->addButton('print_timetable.php', $strPrintTimetable, '_blank'); $menu->addButton('print_timetable.php?arg=comp', $strPrintTimetableComp, '_blank'); $menu->addButton($cfgURLDocumentation . 'help/meeting/definition.html', $strHelp, '_blank'); $menu->printMenu(); ?> <script type="text/javascript"> <!-- function check(item) // stadium has changed; check what to do { if(item=='stadium')
* * meeting_teams_header.php * ------------------------ * */ require './lib/cl_gui_button.lib.php'; require './lib/cl_gui_menulist.lib.php'; require './lib/cl_gui_page.lib.php'; require './lib/common.lib.php'; if (AA_connectToDB() == FALSE) { // invalid DB connection return; // abort } if (AA_checkMeetingID() == FALSE) { // no meeting selected return; // abort } // // Display data // ------------ $page = new GUI_Page('meeting_teams_header'); $page->startPage(); $page->printPageTitle($strTeams . ": " . $_COOKIE['meeting']); $menu = new GUI_Menulist(); $menu->addButton("meeting_teams_print.php", "{$strPrint} ...", "detail"); $menu->addButton("meeting_team_add.php?cat={$category}", $strNewEntry, "detail"); $menu->addButton($cfgURLDocumentation . 'help/meeting/teams.html', $strHelp, '_blank'); $menu->printMenu(); $page->endPage();
if (!empty($_GET['round'])) { $round = $_GET['round']; } else { if (!empty($_POST['round'])) { $round = $_POST['round']; } } $presets = AA_results_getPresets($round); // read GET/POST variables // // print HTML page header // $page = new GUI_Page('speaker_results'); $page->startPage(); $page->printPageTitle($strResults . ": " . $_COOKIE['meeting']); $menu = new GUI_Menulist(); $menu->addButton($cfgURLDocumentation . 'help/speaker/results.html', $strHelp, '_blank'); $menu->addSearchfield('speaker_entry.php', '_self', 'post', 'speaker_results.php?round=' . $round); $menu->printMenu(); // // print round selection menu // ?> <p/> <table><tr> <td class='forms'> <?php AA_printCategorySelection("speaker_results.php", $presets['category']); ?> </td>
function AA_results_Tech($round, $layout) { require './lib/cl_gui_button.lib.php'; require './config.inc.php'; require './lib/common.lib.php'; require './lib/heats.lib.php'; require './lib/results.lib.php'; require './lib/utils.lib.php'; require './lib/cl_wind.lib.php'; $presets = AA_results_getPresets($round); // read GET/POST variables $nextRound = AA_getNextRound($presets['event'], $round); $svm = AA_checkSVM(0, $round); // decide whether to show club or team name $teamsm = AA_checkTeamSM(0, $round); $prog_mode = AA_results_getProgramMode(); // // terminate result processing // if ($_GET['arg'] == 'results_done' || $prog_mode == 2 && $_GET['arg'] != 'change_results' && $_GET['arg'] != 'del_results') { $eval = AA_results_getEvaluationType($round); $combined = AA_checkCombined(0, $round); mysql_query("LOCK TABLES r READ, s READ, ss READ, runde READ"); // if this is a combined event, rank all rounds togheter $roundSQL = ""; $roundSQL2 = ""; if ($combined) { $roundSQL = " s.xRunde IN ("; $roundSQL2 = " s.xRunde IN ("; $res_c = mysql_query("SELECT xRunde FROM runde WHERE xWettkampf = " . $presets['event']); while ($row_c = mysql_fetch_array($res_c)) { $roundSQL .= $row_c[0] . ","; $roundSQL2 .= $row_c[0] . ","; } $roundSQL = substr($roundSQL, 0, -1) . ")"; $roundSQL2 = substr($roundSQL2, 0, -1) . ")"; } else { $roundSQL = " s.xRunde = {$round}"; $roundSQL2 = " s.xRunde = {$round}"; } // number of athletes $sql = "SELECT \r\n ss.xSerienstart \r\n FROM \r\n runde AS r\r\n LEFT JOIN serie AS s ON (s.xRunde = r.xRunde)\r\n LEFT JOIN serienstart AS ss ON (ss.xSerie = s.xSerie)\r\n LEFT JOIN start AS st ON (st.xStart = ss.xStart)\r\n LEFT JOIN anmeldung AS a ON (a.xAnmeldung = st.xAnmeldung)\r\n LEFT JOIN athlet AS at ON (at.xAthlet = a.xAthlet)\r\n WHERE r.xRunde = " . $round . "\r\n "; $res = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $count_athlete = mysql_num_rows($res); } // evaluate max. nbr of results entered $r = 0; if ($prog_mode == 2) { // create array for calculate field focus $sql_r = "SELECT \r\n ru.Versuche, \r\n LPAD(s.Bezeichnung,5,'0') as heatid, \r\n if (ss.Position2 > 0, if (ss.Position3 > 0, ss.Position3, ss.Position2) , ss.Position ) as posOrder \r\n , ss.Position\r\n , ss.Position2\r\n , ss.Position3 \r\n , ss.xSerienstart\r\n , ss.Rang\r\n , s.MaxAthlet\r\n , s.xSerie \r\n , r.Leistung \r\n FROM \r\n resultat AS r\r\n LEFT JOIN serienstart AS ss ON (r.xSerienstart = ss.xSerienstart)\r\n LEFT JOIN serie AS s ON (ss.xSerie = s.xSerie )\r\n LEFT JOIN runde AS ru ON (s.xRunde = ru.xRunde) \r\n WHERE " . $roundSQL2 . " \r\n ORDER BY posOrder, r.xResultat "; $result_r = mysql_query($sql_r); $heatStart = ''; $arr_perfAthlete = array(); $arr_perfAthleteValids = array(); $c = 0; $h = 0; $pos2 = 0; // calculate attempts of athletes while ($row_r = mysql_fetch_row($result_r)) { if ($heatStart != $row_r[6]) { // new heat start if (!empty($heatStart)) { $arr_perfAthlete[$h] = $c; if ($c > 0) { $arr_perfAthleteValids[$h] = $c; } $h++; if ($h >= $row_r[8] && $row_r[4] > 0) { // maxAthlete reached by second/third Position break; } } $c = 0; if ($row_r[10] > 0 || $row_r[10] < $cfgInvalidResult['DSQ']['code']) { $c++; } elseif ($row_r[10] == $cfgInvalidResult['DNS']['code']) { $c = $cfgInvalidResult['DNS']['code']; } elseif ($row_r[10] == $cfgInvalidResult['DNF']['code']) { $c = $cfgInvalidResult['DNF']['code']; } elseif ($row_r[10] == $cfgInvalidResult['DSQ']['code']) { $c = $cfgInvalidResult['DSQ']['code']; } } else { if ($row_r[10] > 0 || $row_r[10] < $cfgInvalidResult['DSQ']['code']) { $c++; } elseif ($row_r[10] == $cfgInvalidResult['DNS']['code']) { $c = $cfgInvalidResult['DNS']['code']; } elseif ($row_r[10] == $cfgInvalidResult['DNF']['code']) { $c = $cfgInvalidResult['DNF']['code']; } elseif ($row_r[10] == $cfgInvalidResult['DSQ']['code']) { $c = $cfgInvalidResult['DSQ']['code']; } } $heatStart = $row_r[6]; $maxAthlete = $row_r[8]; $pos2 = $row_r[4]; } // last athlete if ($h >= $maxAthlete && $pos2 > 0) { } else { $arr_perfAthlete[$h] = $c; if ($c > 0) { $arr_perfAthleteValids[$h] = $c; } } $p1 = 0; $p2 = 0; //calculate doing new position foreach ($arr_perfAthlete as $key => $val) { if ($val == 3 || $val < 0) { $p1++; } elseif ($val == 5 || $val < 0) { $p2++; } } if (count($arr_perfAthlete) == $p1) { AA_rankingForNewPosition($round, 2); AA_newPosition($round, 2); } elseif (count($arr_perfAthlete) == $p2) { AA_rankingForNewPosition($round, 3); AA_newPosition($round, 3); } $sql = "SELECT \r\n COUNT(*), \r\n ru.Versuche, \r\n LPAD(s.Bezeichnung,5,'0') as heatid, \r\n if (ss.Position2 > 0, if (ss.Position3 > 0, ss.Position3, ss.Position2) , ss.Position ) as posOrder \r\n , ss.Position\r\n , ss.Position2\r\n , ss.Position3 \r\n , ss.xSerienstart\r\n , ss.Rang\r\n , s.MaxAthlet\r\n , s.xSerie \r\n , r.Leistung\r\n \r\n FROM \r\n resultat AS r\r\n LEFT JOIN serienstart AS ss ON (r.xSerienstart = ss.xSerienstart)\r\n LEFT JOIN serie AS s ON (ss.xSerie = s.xSerie )\r\n LEFT JOIN runde AS ru ON (s.xRunde = ru.xRunde) \r\n WHERE " . $roundSQL2 . " \r\n GROUP BY r.xSerienstart\r\n ORDER BY posOrder "; $result = mysql_query($sql); } else { $result = mysql_query("SELECT COUNT(*), ru.Versuche" . " FROM resultat AS r" . " LEFT JOIN serienstart AS ss ON (r.xSerienstart = ss.xSerienstart)" . " LEFT JOIN serie AS s ON (ss.xSerie = s.xSerie)" . " LEFT JOIN runde AS ru ON (s.xRunde = ru.xRunde)" . " WHERE " . " {$roundSQL2} " . " GROUP BY r.xSerienstart" . " ORDER BY 1 DESC"); } if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { if ($prog_mode == 2) { // decentral with ranking $z = 0; $pass = 0; $arr_attAthlete = array(); $maxAthlete = 0; while ($row = mysql_fetch_row($result)) { if ($z == 0) { // first row $maxatt = $row[1]; $maxAthlete = $row[9]; $xSerie = $row[10]; } if ($row[11] != $cfgInvalidResult['DNS']['code']) { $arr_attAthlete[] = $row[0]; } $keep_rank = $row[8]; $z++; } if ($count_athlete < $maxAthlete) { $maxAthlete = $count_athlete; // update max athlete in serie AA_setMaxAthlete($xSerie, $maxAthlete); } $maxAthleteAtt = max($arr_attAthlete); $minAthleteAtt = min($arr_attAthlete); $onlyMaxAthlete = false; if ($count_athlete > $cfgMaxAthlete) { if ($maxAthleteAtt == $minAthleteAtt && $minAthleteAtt == $cfgAfterAttempts1) { $onlyMaxAthlete = true; } elseif ($maxAthleteAtt > $cfgAfterAttempts1) { $onlyMaxAthlete = true; } } if ($onlyMaxAthlete && $count_athlete > $cfgMaxAthlete) { $c = 0; $arr_attAthlete_new = array(); foreach ($arr_attAthlete as $key => $val) { $c++; $arr_attAthlete_new[] = $val; if ($c >= $maxAthlete) { break; } } $arr_attAthlete = $arr_attAthlete_new; $maxAthleteAtt = max($arr_attAthlete); $minAthleteAtt = min($arr_attAthlete); } $r = $maxAthleteAtt; $first_row = false; $maxAthleteAtt = max($arr_perfAthleteValids); $minAthleteAtt = min($arr_perfAthleteValids); if ($maxAthleteAtt == $cfgAfterAttempts1 && $maxAthleteAtt == $minAthleteAtt) { $pass = 2; } elseif ($maxAthleteAtt == $cfgAfterAttempts2 && $maxAthleteAtt == $minAthleteAtt) { $pass = 3; } elseif ($maxAthleteAtt > $cfgAfterAttempts1 && $maxAthleteAtt < $cfgAfterAttempts2 + 1) { $pass = 2; } elseif ($maxAthleteAtt == $cfgAfterAttempts2 + 1) { $pass = 3; } elseif ($maxAthleteAtt == $minAthleteAtt && $z == $count_athlete) { $first_row = true; $maxAthleteAtt++; } $fieldFocus = 1; } else { $row = mysql_fetch_row($result); $r = $row[0]; } mysql_free_result($result); } $minPerfAthl = min($arr_perfAthleteValids); $maxPerfAthl = max($arr_perfAthleteValids); $keep_val = ''; $keep_key = ''; foreach ($arr_perfAthlete as $key => $val) { if (empty($keep_val) && !empty($val)) { $fieldFocus = $maxatt + 1 + $maxPerfAthl; } $keep_key = $key; if ($keep_val > $val) { if ($val == $cfgInvalidResult['DNS']['code'] || $val == $cfgInvalidResult['DNF']['code'] || $val == $cfgInvalidResult['DSQ']['code']) { continue; } $fieldFocus = $key * ($maxatt + 1) + $maxPerfAthl; break; } $keep_val = $val; } if ($pos2 == 0) { if ($count_athlete > count($arr_perfAthlete)) { $fieldFocus = ($keep_key + 1) * ($maxatt + 1) + $maxPerfAthl; } elseif ($count_athlete == count($arr_perfAthlete) && $minPerfAthl == $maxPerfAthl) { $fieldFocus = $maxPerfAthl + 1; } } else { if ($minPerfAthl == $maxPerfAthl) { $fieldFocus = $maxPerfAthl + 1; } } if ($r > 0) { mysql_query("DROP TABLE IF EXISTS tempresult"); // temporary table if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { mysql_query("\r\n LOCK TABLES\r\n resultat READ\r\n , serie READ\r\n , wettkampf READ\r\n , serienstart WRITE\r\n , tempresult WRITE\r\n "); // Set up a temporary table to hold all results for ranking. // The number of result columns varies according to the maximum // number of results per athlete. $qry = "\r\n CREATE TABLE tempresult (\r\n xSerienstart int(11)\r\n , xSerie int(11)"; for ($i = 1; $i <= $r; $i++) { $qry = $qry . ", Res" . $i . " int(9) default '0'"; $qry = $qry . ", Wind" . $i . " char(5) default '0'"; } $qry = $qry . ") ENGINE=HEAP"; mysql_query($qry); // create temporary table if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { // reset rank to 0 first $sql = " SELECT\r\n r.Leistung\r\n , r.Info\r\n , ss.xSerienstart\r\n , ss.xSerie\r\n FROM\r\n resultat as r\r\n LEFT JOIN serienstart as ss ON (r.xSerienstart = ss.xSerienstart)\r\n LEFT JOIN serie AS s ON (ss.xSerie = s.xSerie)\r\n WHERE \r\n {$roundSQL}\r\n AND r.Leistung <= 0\r\n ORDER BY\r\n ss.xSerienstart\r\n ,r.Leistung DESC"; $result = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($row = mysql_fetch_row($result)) { mysql_query("\r\n UPDATE serienstart SET\r\n Rang = 0\r\n WHERE xSerienstart = {$row['2']}\r\n "); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } } } $result = mysql_query("\r\n SELECT\r\n r.Leistung\r\n , r.Info\r\n , ss.xSerienstart\r\n , ss.xSerie\r\n FROM\r\n resultat as r\r\n LEFT JOIN serienstart as ss ON (r.xSerienstart = ss.xSerienstart)\r\n LEFT JOIN serie AS s ON (ss.xSerie = s.xSerie)\r\n WHERE \r\n {$roundSQL}\r\n AND r.Leistung >= 0\r\n ORDER BY\r\n ss.xSerienstart\r\n ,r.Leistung DESC\r\n "); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { // initialize variables $ss = 0; $i = 0; // process every result while ($row = mysql_fetch_row($result)) { if ($ss != $row[2]) { // add one row per athlete to temp table if ($ss != 0) { for (; $i < $r; $i++) { // fill remaining result cols. $qry = $qry . ",0,''"; } mysql_query($qry . ")"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } } // (re)set SQL statement $qry = "INSERT INTO tempresult VALUES({$row['2']},{$row['3']}"; $i = 0; } $qry = $qry . ",{$row['0']},'{$row['1']}'"; // add current result to query $ss = $row[2]; // keep athlete's ID $i++; // count nbr of results } mysql_free_result($result); // insert last pending data in temp table if ($ss != 0) { for (; $i < $r; $i++) { // fill remaining result cols. $qry = $qry . ",0,''"; } mysql_query($qry . ")"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } } } if ($eval == $cfgEvalType[$strEvalTypeHeat]) { // eval per heat $qry = "\r\n SELECT\r\n *\r\n FROM\r\n tempresult\r\n ORDER BY\r\n xSerie"; for ($i = 1; $i <= $r; $i++) { $qry = $qry . ", Res" . $i . " DESC"; } } else { // default: rank results from all heats together $qry = "\r\n SELECT\r\n *\r\n FROM\r\n tempresult\r\n ORDER BY "; $comma = ""; // order by available result columns for ($i = 1; $i <= $r; $i++) { $qry = $qry . $comma . "Res" . $i . " DESC"; $comma = ", "; } } $result = mysql_query($qry); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { // initialize variables $heat = 0; $perf_old[] = ''; $j = 0; $rank = 0; // set rank for every athlete while ($row = mysql_fetch_row($result)) { for ($i = 0; $i <= $r; $i++) { $perf[$i] = $row[2 * $i + 2]; $wind[$i] = $row[2 * $i + 3]; } if ($eval == $cfgEvalType[$strEvalTypeHeat] && $heat != $row[1]) { $j = 0; // restart ranking $perf_old[] = ''; } $j++; // increment ranking if ($perf_old != $perf) { // compare performances $rank = $j; // next rank (only if not same performance) } mysql_query("\r\n UPDATE serienstart SET\r\n Rang = {$rank}\r\n WHERE xSerienstart = {$row['0']}\r\n "); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } $heat = $row[1]; // keep current heat ID $perf_old = $perf; } mysql_free_result($result); } mysql_query("DROP TABLE IF EXISTS tempresult"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } } // ET DB error (create temp table) mysql_query("UNLOCK TABLES"); } // ET DB error (drop temp table) } // ET any results found AA_results_setNotStarted($round); // update athletes with no result if ($_GET['arg'] == 'results_done') { AA_utils_changeRoundStatus($round, $cfgRoundStatus['results_done']); } if (!empty($GLOBALS['AA_ERROR'])) { AA_printErrorMsg($GLOBALS['AA_ERROR']); } AA_results_resetQualification($round); } // // calculate ranking points if needed // if ($_GET['arg'] == 'results_done' || $_POST['arg'] == 'save_rank' || $prog_mode == 2 && $_GET['arg'] != 'change_results' && $_GET['arg'] != 'del_results') { AA_utils_calcRankingPoints($round); } // // Qualify athletes after ranks are set // if ($_GET['arg'] == 'results_done' || $_POST['arg'] == 'save_rank' || $_POST['arg'] == 'set_qual' || $prog_mode == 2 && $_GET['arg'] != 'change_results' && $_GET['arg'] != 'del_results') { // read qualification criteria $qual_top = 0; $qual_perf = 0; $result = mysql_query("SELECT QualifikationSieger" . ", QualifikationLeistung" . " FROM runde" . " WHERE xRunde = " . $round); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { if (($row = mysql_fetch_row($result)) == TRUE) { } $qual_top = $row[0]; $qual_perf = $row[1]; mysql_free_result($result); } // ET DB error // qualify top athletes for next round if ($qual_top > 0) { mysql_query("LOCK TABLES serie READ, serie AS s READ, serienstart WRITE, serienstart AS ss WRITE"); // get athletes by qualifying rank (random order if same rank) // don't update athletes who got 'waived' flag $sql = "SELECT \r\n ss.xSerienstart\r\n , ss.xSerie\r\n , ss.Rang\r\n FROM \r\n serienstart AS ss\r\n LEFT JOIN serie AS s ON (ss.xSerie = s.xSerie )\r\n WHERE \r\n ss.Rang > 0 \r\n AND s.xRunde = " . $round . "\r\n AND ss.Qualifikation = 0 \r\n ORDER BY ss.xSerie\r\n , ss.Rang ASC\r\n , RAND()"; $result = mysql_query($sql); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $h = 0; unset($heats); // clear array containing heats while ($row = mysql_fetch_row($result)) { if ($h != $row[1]) { // new heat if (count($starts) > 0) { // count athletes $heats[] = $starts; // keep athletes per heat } unset($starts); $c = 0; } $starts[$row[0]] = $row[2]; // keep athlete's rank $h = $row[1]; // keep heat } $heats[] = $starts; // keep remaining athletes mysql_free_result($result); foreach ($heats as $starts) { $rankcount = array_count_values($starts); // count athletes/rank $q = 0; foreach ($starts as $id => $rank) { // check if more athletes per rank than qualifying spots if ($rankcount[$rank] > $qual_top - $rank + 1) { $qual = $cfgQualificationType['top_rand']['code']; } else { $qual = $cfgQualificationType['top']['code']; } if ($q < $qual_top) { mysql_query("UPDATE serienstart SET" . " Qualifikation = " . $qual . " WHERE xSerienstart = " . $id); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } $q++; // count nbr of qualified athletes } } } // END loop every heat } // ET DB error mysql_query("UNLOCK TABLES"); } // ET top athletes // qualify top performing athletes for next round if ($qual_perf > 0) { mysql_query("LOCK TABLES resultat READ,resultat AS r READ, serie READ, serie AS s READ, serienstart WRITE, serienstart AS ss WRITE "); // get remaining athletes by performance (random order if equal performance) /* other possible criteria to order equal performances: * - ranking within heat (not implemented) * - wind (not implemented) */ $sql = "SELECT \r\n ss.xSerienstart\r\n , r.Leistung\r\n , ss.Qualifikation\r\n FROM \r\n resultat AS r\r\n LEFT JOIN serienstart AS ss ON (r.xSerienstart = ss.xSerienstart)\r\n LEFT JOIN serie AS s ON (ss.xSerie = s.xSerie)\r\n WHERE \r\n r.Leistung > 0\r\n AND (ss.Qualifikation = 0 \r\n OR ss.Qualifikation = " . $cfgQualificationType['waived']['code'] . ") \r\n AND s.xRunde = " . $round . "\r\n ORDER BY r.Leistung DESC\r\n , RAND()"; $result = mysql_query($sql); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $i = 1; $perf = 0; $cWaived = 0; while ($row = mysql_fetch_row($result)) { // count waived qualifyings if ($row[2] == $cfgQualificationType['waived']['code']) { $cWaived++; continue; } if ($i > $qual_perf) { // terminate if enough top performers found if ($perf != $row[1]) { // last perf. worse than last qualified $perf = 0; } break; } // if athletes waived on qualifying, set random code for next best athletes $code = $cfgQualificationType['perf']['code']; if ($i + $cWaived > $qual_perf) { $code = $cfgQualificationType['perf_rand']['code']; } mysql_query("UPDATE serienstart SET" . " Qualifikation = " . $code . " WHERE xSerienstart = " . $row[0]); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } $i++; $perf = $row[1]; // keep performance } // reset performance if enough qualifing spots if (mysql_num_rows($result) <= $qual_perf) { $perf = 0; } mysql_free_result($result); // Change qualification type to "perf_rand" for athletes with same // performance as the 1st unqualified athlete if ($perf != 0) { $sql = "SELECT \r\n ss.xSerienstart\r\n FROM \r\n resultat AS r\r\n LEFT JOIN serienstart AS ss ON (r.xSerienstart = ss.xSerienstart)\r\n LEFT JOIN serie AS s ON (ss.xSerie = s.xSerie)\r\n WHERE \r\n r.Leistung = " . $perf . "\r\n AND ss.Qualifikation > 0 \r\n AND s.xRunde = " . $round; $result = mysql_query($sql); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($row = mysql_fetch_row($result)) { mysql_query("UPDATE serienstart SET" . " Qualifikation = " . $cfgQualificationType['perf_rand']['code'] . " WHERE xSerienstart = " . $row[0]); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } } mysql_free_result($result); } } // ET unqualified athlete } // ET DB error qualified by performance mysql_query("UNLOCK TABLES"); } // ET top performances } // // print HTML page header // AA_results_printHeader($presets['category'], $presets['event'], $round); $mergedMain = AA_checkMainRound($round); if ($mergedMain != 1) { // read round data if ($round > 0) { $status = AA_getRoundStatus($round); // No action yet if ($status == $cfgRoundStatus['open'] || $status == $cfgRoundStatus['enrolement_done'] || $status == $cfgRoundStatus['heats_in_progress']) { AA_printWarningMsg($strHeatsNotDone); } else { if ($status == $cfgRoundStatus['enrolement_pending']) { AA_printWarningMsg($strEnrolementNotDone); } else { if ($status >= $cfgRoundStatus['heats_done']) { // get program mode $prog_mode = AA_results_getProgramMode(); AA_heats_printNewStart($presets['event'], $round, "event_results.php"); if ($pass == 2) { $fieldPos = "ss.Position2"; $order = "posOrder"; } elseif ($pass == 3) { $fieldPos = "ss.Position3"; $order = "ss.Rang DESC"; } else { $fieldPos = "ss.Position"; $order = "posOrder"; } // display all athletes if ($teamsm) { $sql = "SELECT \r\n rt.Name\r\n , rt.Typ\r\n , s.xSerie\r\n , s.Bezeichnung\r\n , s.Wind\r\n , an.Bezeichnung\r\n , ss.xSerienstart\r\n , ss.Position\r\n , ss.Rang\r\n , a.Startnummer\r\n , at.Name\r\n , at.Vorname\r\n , at.Jahrgang\r\n , t.Name\r\n , LPAD(s.Bezeichnung,5,'0') as heatid\r\n , r.Versuche\r\n , ss.Qualifikation\r\n , at.Land\r\n , r.nurBestesResultat\r\n , ss.Bemerkung\r\n , at.xAthlet\r\n , if (ss.Position2 > 0, if (ss.Position3 > 0, ss.Position3, ss.Position2) , ss.Position ) as posOrder \r\n FROM \r\n runde AS r\r\n LEFT JOIN serie AS s ON (s.xRunde = r.xRunde)\r\n LEFT JOIN serienstart AS ss ON (ss.xSerie = s.xSerie)\r\n LEFT JOIN start AS st ON (st.xStart = ss.xStart)\r\n LEFT JOIN anmeldung AS a ON (a.xAnmeldung = st.xAnmeldung)\r\n LEFT JOIN athlet AS at ON (at.xAthlet = a.xAthlet)\r\n LEFT JOIN verein AS v ON (v.xVerein = at.xVerein) \r\n INNER JOIN teamsmathlet AS tat ON(st.xAnmeldung = tat.xAnmeldung)\r\n LEFT JOIN teamsm as t ON (tat.xTeamsm = t.xTeamsm) \r\n LEFT JOIN rundentyp_" . $_COOKIE['language'] . " AS rt ON rt.xRundentyp = r.xRundentyp\r\n LEFT JOIN anlage AS an ON an.xAnlage = s.xAnlage\r\n WHERE \r\n r.xRunde = " . $round . " \r\n ORDER BY heatid, posOrder"; } else { $sql = "SELECT \r\n rt.Name\r\n , rt.Typ\r\n , s.xSerie\r\n , s.Bezeichnung\r\n , s.Wind\r\n , an.Bezeichnung\r\n , ss.xSerienstart\r\n , ss.Position\r\n , ss.Rang\r\n , a.Startnummer\r\n , at.Name\r\n , at.Vorname\r\n , at.Jahrgang\r\n , if('" . $svm . "', t.Name, IF(a.Vereinsinfo = '', v.Name, a.Vereinsinfo)) \r\n , LPAD(s.Bezeichnung,5,'0') as heatid\r\n , r.Versuche\r\n , ss.Qualifikation\r\n , at.Land\r\n , r.nurBestesResultat\r\n , ss.Bemerkung\r\n , at.xAthlet\r\n , if (ss.Position2 > 0, if (ss.Position3 > 0, ss.Position3, ss.Position2) , ss.Position ) as posOrder \r\n FROM \r\n runde AS r\r\n LEFT JOIN serie AS s ON (s.xRunde = r.xRunde)\r\n LEFT JOIN serienstart AS ss ON (ss.xSerie = s.xSerie)\r\n LEFT JOIN start AS st ON (st.xStart = ss.xStart)\r\n LEFT JOIN anmeldung AS a ON (a.xAnmeldung = st.xAnmeldung)\r\n LEFT JOIN athlet AS at ON (at.xAthlet = a.xAthlet)\r\n LEFT JOIN verein AS v ON (v.xVerein = at.xVerein) \r\n LEFT JOIN team AS t ON(a.xTeam = t.xTeam) \r\n LEFT JOIN rundentyp_" . $_COOKIE['language'] . " AS rt ON rt.xRundentyp = r.xRundentyp\r\n LEFT JOIN anlage AS an ON an.xAnlage = s.xAnlage\r\n WHERE \r\n r.xRunde = " . $round . " \r\n ORDER BY heatid, posOrder"; } $result = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $sum_athlet = mysql_num_rows($result); AA_results_printMenu($round, $status, $prog_mode, 'tech'); // initialize variables $h = 0; $i = 0; $r = 0; $rowclass = 'odd'; $r_rem = 0; $nextRound = AA_getNextRound($presets['event'], $round); // show qualification form if another round follows if ($nextRound > 0) { // next round $sql = "SELECT QualifikationSieger, \r\n QualifikationLeistung \r\n FROM runde \r\n WHERE xRunde = " . $round . ";"; $result2 = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $row2 = mysql_fetch_row($result2); if ($row2 == true) { // round found ?> <p/> <form name="qualification" action="event_results.php" method="post"> <input type="hidden" name="arg" value="set_qual"/> <input type="hidden" name="round" value="<?php echo $round; ?> "/> <table class="dialog"> <tr> <td class="dialog"><?php echo $strQualification; ?> <?php echo $strQualifyTop; ?> </td> <td class="dialog"><input type="text" name="qual_top" class="nbr" maxlength="4" value="<?php echo $row2[0]; ?> "/></td> <td class='dialog'><?php echo $strQualification; ?> <?php echo $strQualifyPerformance; ?> </td> <td class='dialog'><input type="text" name="qual_perf" class="nbr" maxlength="4" value="<?php echo $row2[1]; ?> "/></td> <td><button type="submit"><?php echo $strChange; ?> </button></td> </tr> </table> </form> <form name="frmQual" action="event_results.php" method="post"> <input type="hidden" name="arg" value="change_qual"/> <input type="hidden" name="round" value="<?php echo $round; ?> "/> <input type="hidden" name="focus" value="qual_0"/> <input type="hidden" name="item" value="0"/> <input type="hidden" name="oldqual" value="0"/> <input type="hidden" name="heat" value="0"/> <input type="hidden" name="qual" value="0"/> </form> <script type="text/javascript"> function changequal(valFocus, valItem, valOldQual, valHeat, valQual){ var obj = document.frmQual; obj.focus.value = valFocus; obj.item.value = valItem; obj.oldqual.value = valOldQual; obj.heat.value = valHeat; obj.qual.value = valQual; obj.submit(); } </script> <p/> <?php } // ET round found } // ET DB error } // ET next round ?> <p/> <table class='dialog'> <?php $btn = new GUI_Button('', ''); // create button object while ($row = mysql_fetch_row($result)) { // // get entered number of attempts // $maxatt = $row[15]; if ($maxatt != 0) { $cfgProgramMode[$prog_mode]['tech_res'] = $maxatt; } /* * Heat headerline */ if ($h != $row[2]) { $h = $row[2]; // keep heat ID if (is_null($row[0])) { // only one round $title = "{$strFinalround}"; } else { // more than one round $title = "{$row['0']}"; } $c = 0; if ($status == $cfgRoundStatus['results_done'] || $prog_mode == 2) { $c++; // increment colspan to include ranking } ?> <tr> <form action='event_results.php#heat_<?php echo $row[3]; ?> ' method='post' name='heat_id_<?php echo $h; ?> '> <th class='dialog' colspan=' <?php echo 5 + $cfgProgramMode[$prog_mode]['tech_res'] + $c; ?> '> <?php echo $title; ?> <input type='hidden' name='arg' value='change_heat_name' /> <input type='hidden' name='round' value='<?php echo $round; ?> ' /> <input type='hidden' name='item' value='<?php echo $row[2]; ?> ' /> <input class='nbr' type='text' name='id' maxlength='2' value='<?php echo $row[3]; ?> ' onChange='document.heat_id_<?php echo $h; ?> .submit()' /> <a name='heat_<?php echo $row[3]; ?> ' /> </th> </form> </tr> <tr> <th class='dialog'><?php echo $strPositionShort; ?> </th> <th class='dialog' colspan='2'><?php echo $strAthlete; ?> </th> <th class='dialog'><?php echo $strYearShort; ?> </th> <th class='dialog'><?php echo $strCountry; ?> </th> <th class='dialog'><?php if ($svm) { echo $strTeam; } elseif ($teamsm) { echo $strTeamsm; } else { echo $strClub; } ?> </th> <?php if ($status == $cfgRoundStatus['results_done'] || $prog_mode == 2) { ?> <th class='dialog'><?php echo $strRank; ?> </th> <?php if ($nextRound > 0) { ?> <th class='dialog'><?php echo $strQualification; ?> </th> <?php } } if ($cfgProgramMode[$prog_mode]['tech_res'] <= 1) { ?> <th class='dialog'><?php echo $strPerformance; ?> </th> <?php } else { for ($c = 1; $c <= $cfgProgramMode[$prog_mode]['tech_res']; $c++) { ?> <th class='dialog'><?php echo $c . "."; ?> </th> <?php } ?> <th class='dialog'><?php echo $strResultRemark; ?> </th> <?php } ?> </tr> <?php } // ET new heat /* * Athlete data lines */ $i++; if ($row[7] % 2 == 0) { // even row numer $rowclass = 'odd'; } else { // odd row number $rowclass = 'even'; } ?> <tr class='<?php echo $rowclass; ?> '> <td class='forms_right'><?php echo $row[7]; /* position */ ?> </td> <td class='forms_right'><?php echo $row[9]; /* start nbr */ ?> </td> <td nowrap><?php echo $row[10] . " " . $row[11]; /* name */ ?> </td> <td class='forms_ctr'><?php echo AA_formatYearOfBirth($row[12]); ?> </td> <td><?php echo $row[17] != '' && $row[17] != '-' ? $row[17] : ' '; ?> </td> <td nowrap><?php echo $row[13]; /* club */ ?> </td> <?php $res = mysql_query("SELECT rs.xResultat" . ", rs.Leistung" . ", rs.Info" . " FROM resultat AS rs" . " WHERE rs.xSerienstart = " . $row[6] . "\r\n ORDER BY rs.xResultat"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { // Show rank if ($status == $cfgRoundStatus['results_done'] || $prog_mode == 2) { $disField = ($maxatt + 1) * $maxAthlete; // attempts * 8 (first 8 athletes) if ($pass >= 2 && $r + 1 > $disField) { $dis = 'disabled=" disabled"'; } else { $dis = ''; } ?> <form action='event_results.php' method='post' name='rank_<?php echo $r; ?> '> <td> <input type='hidden' name='arg' value='save_rank' /> <input type='hidden' name='round' value='<?php echo $round; ?> ' /> <input type='hidden' name='item' value='<?php echo $row[6]; ?> ' /> <input type='hidden' name='focus' value='rank_<?php echo $r; ?> ' /> <input class='nbr' type='text' name='rank' maxlength='3' <?php echo $dis; ?> value='<?php echo $row[8]; ?> ' onChange='document.rank_<?php echo $r; ?> .submit()' /> </td> <?php if ($status == $cfgRoundStatus['results_done'] || $prog_mode == 2) { if ($nextRound > 0) { ?> <form name="qual_<?php echo $i; ?> " action="event_results.php" method="post"> <td> <input type="hidden" name="arg" value="change_qual"/> <input type="hidden" name="round" value="<?php echo $round; ?> "/> <input type="hidden" name="focus" value="qual_<?php echo $i; ?> "/> <input type="hidden" name="item" value="<?php echo $row[6]; ?> "/> <input type="hidden" name="oldqual" value="<?php echo $row[16]; ?> "/> <input type="hidden" name="heat" value="<?php echo $row[2]; ?> "/> <?php $dropdown = new GUI_Select('qual', 1, 'changequal("qual_' . $i . '", ' . $row[6] . ', ' . $row[16] . ', ' . $row[2] . ', this.value)'); $dropdown->addOptionNone(); foreach ($cfgQualificationType as $type) { $dropdown->addOption($type['text'], $type['code']); if ($type['code'] == $row[16]) { $dropdown->selectOption($type['code']); } } $dropdown->printList(); ?> </td> </form> <?php $i++; // next element } // qualification info } else { // no rank ?> <td /> <?php if ($nextRound > 0) { ?> <td /> <?php } } // ET valid rank ?> </form> <?php } $disField = ($maxatt + 1) * $maxAthlete; // attempts * 8 (first 8 athletes) for ($c = 1; $c <= $cfgProgramMode[$prog_mode]['tech_res']; $c++) { // Result focus: // - Backoffice mode: same athlete, next result // - Field mode: next athlete, same result $r++; // increment result form counter if ($cfgProgramMode[$prog_mode]['name'] == $strProgramModeBackoffice) { if ($row[18] == 'y') { // only best result --> focus next line $focus = "perf_" . ($r + $cfgProgramMode[$prog_mode]['tech_res'] + 1); if (mysql_num_rows($result) == $i) { // no more athletes if ($c == $cfgProgramMode[$prog_mode]['tech_res']) { // last result $focus = "perf_" . ($r + 1); // keep focus on this athlete } else { $focus = "perf_" . ($c + 1); // focus to next result of first athlete } } } else { if ($c == $cfgProgramMode[$prog_mode]['tech_res']) { // last result of this line if (mysql_num_rows($result) == $i) { // no more athletes $focus = "perf_" . $r; // keep focus on last athlete } else { $focus = "perf_" . ($r + 2); // focus to next line result } } else { $focus = "perf_" . ($r + 1); // focus to next result } } } else { // field mode $focus = "perf_" . ($r + $cfgProgramMode[$prog_mode]['tech_res'] + 1); if (mysql_num_rows($result) == $i) { // no more athletes if ($c == $cfgProgramMode[$prog_mode]['tech_res']) { // last result $focus = "perf_" . $r; // keep focus on this athlete } else { $focus = "perf_" . ($c + 1); // focus to next result of first athlete } } } // ET program mode $item = ''; $perf = ''; $info = ''; if ($resrow = mysql_fetch_row($res)) { $item = $resrow[0]; $perf = AA_formatResultMeter($resrow[1]); $info = $resrow[2]; } if ($status != $cfgRoundStatus['results_done'] || $prog_mode == 2) { ?> <form action='controller.php' method='post' name='perf_<?php echo $r; ?> ' target='controller'> <td nowrap> <input type='hidden' name='act' value='saveResult' /> <input type='hidden' name='obj' value='perf_<?php echo $r; ?> ' /> <input type='hidden' name='type' value='<?php echo $layout; ?> ' /> <input type='hidden' name='round' value='<?php echo $round; ?> ' /> <input type='hidden' name='start' value='<?php echo $row[6]; ?> ' /> <input type='hidden' name='item' value='<?php echo $item; ?> ' /> <input type='hidden' name='row_col' value='<?php echo $r . "_" . $c; ?> ' /> <input type='hidden' name='maxatt' value='<?php echo $maxatt; ?> ' /> <input type='hidden' name='heat' value='<?php echo $row[2]; ?> ' /> <?php // technical disciplines with wind if ($layout == $cfgDisciplineType[$strDiscTypeJump]) { ?> <input class='perfmeter' type='text' id='perf_<?php echo $r; ?> ' name='perf' maxlength='6' <?php echo $dis; ?> value='<?php echo $perf; ?> ' onChange='checkSubmit(document.perf_<?php echo $r; ?> , <?php echo $focus; ?> )' /> <input class='nbr' type='text' name='wind' maxlength='5' value='<?php echo $info; ?> ' onChange='submitResult(document.perf_<?php echo $r; ?> , <?php echo $focus; ?> )' /> <?php } else { ?> <input class='perfmeter' type='text' id='perf_<?php echo $r; ?> ' name='perf' maxlength='6' <?php echo $dis; ?> value='<?php echo $perf; ?> ' onChange='submitResult(document.perf_<?php echo $r; ?> , <?php echo $focus; ?> )' /> <?php } ?> </td> </form> <?php if ($c == $cfgProgramMode[$prog_mode]['tech_res']) { $r++; if (mysql_num_rows($result) != $i) { // more athletes $focus = "perf_" . ($c + $r + 1); } else { $focus = "perf_" . $r; } ?> <form action='controller.php' method='post' name='perf_<?php echo $r; ?> ' target='controller'> <td> <input type='hidden' name='act' value='saveResult' /> <input type='hidden' name='obj' value='perf_<?php echo $r; ?> ' /> <input type='hidden' name='type' value='<?php echo $layout; ?> ' /> <input type='hidden' name='round' value='<?php echo $round; ?> ' /> <input type='hidden' name='start' value='<?php echo $row[6]; ?> ' /> <input type='hidden' name='item' value='<?php echo $item; ?> ' /> <input type='hidden' name='xAthlete' value='<?php echo $row[20]; ?> ' /> <input class='textshort' type='text' name='remark' maxlength='5' <?php echo $dis; ?> value='<?php echo $row[19]; ?> ' onChange='submitResult(document.perf_<?php echo $r; ?> , <?php echo $focus; ?> )' /> </td> </form> <?php } ?> <?php } else { // results done ?> <td nowrap> <?php // technical disciplines with wind if ($layout == $cfgDisciplineType[$strDiscTypeJump]) { echo "{$perf} ( {$info} )"; } else { echo "{$perf}"; } ?> </td> <?php if ($c == $cfgProgramMode[$prog_mode]['tech_res']) { ?> <td nowrap><?php echo $row[19]; ?> </td> <?php } } // ET results done } // end loop every tech result acc. programm mode ?> <td> <?php $btn->set("event_results.php?arg=del_start&item={$row['6']}&round={$round}", $strDelete); $btn->printButton(); ?> </td> <?php } // ET DB error } ?> </table> <?php mysql_free_result($result); ?> <br/> <?php if (!empty($dis)) { $menu = new GUI_Menulist(); $menu->addButton("event_results.php?arg=change_results&round={$round}", $GLOBALS['strChangeResults']); $menu->printMenu(); } } // ET DB error } } } } // ET round selected if (!empty($presets['focus'])) { ?> <script type="text/javascript"> <!-- if(document.<?php echo $presets['focus']; ?> ) { document.<?php echo $presets['focus']; ?> .rank.focus(); document.<?php echo $presets['focus']; ?> .rank.select(); window.scrollBy(0,200); } //--> </script> <?php } else { ?> <script type="text/javascript"> <!-- document.perf_<?php echo $fieldFocus; ?> .elements['perf_<?php echo $fieldFocus; ?> '].focus(); //--> </script> <?php } ?> </body> </html> <?php } else { AA_printErrorMsg($strErrMergedRound); } }
function AA_speaker_High($event, $round, $layout) { require './lib/cl_gui_resulttable.lib.php'; require './config.inc.php'; require './lib/common.lib.php'; require './lib/results.lib.php'; $status = AA_getRoundStatus($round); $svm = AA_checkSVM(0, $round); // decide whether to show club or team name $mergedMain = AA_checkMainRound($round); if ($mergedMain != 1) { // No action yet if ($status == $cfgRoundStatus['open'] || $status == $cfgRoundStatus['enrolement_done'] || $status == $cfgRoundStatus['heats_in_progress']) { AA_printWarningMsg($strHeatsNotDone); } else { if ($status == $cfgRoundStatus['enrolement_pending']) { AA_printWarningMsg($strEnrolementNotDone); } else { if ($status >= $cfgRoundStatus['heats_done']) { // show link to rankinglist if results done if ($status == $cfgRoundStatus['results_done']) { $menu = new GUI_Menulist(); $menu->addButton("print_rankinglist.php?event={$event}&round={$round}&type=single&formaction=speaker", $GLOBALS['strRankingList']); $menu->addButton("print_rankinglist.php?event={$event}&round={$round}&type=single&formaction=speaker&show_efforts=sb_pb", $GLOBALS['strRankingListEfforts']); $menu->printMenu(); echo "<p/>"; } $prog_mode = AA_results_getProgramMode(); // display all athletes $sql = "\r\n SELECT\r\n rt.Name\r\n , rt.Typ\r\n , s.xSerie\r\n , s.Bezeichnung\r\n , s.Status\r\n , ss.xSerienstart\r\n , ss.Position\r\n , ss.Rang\r\n , a.Startnummer\r\n , at.Name\r\n , at.Vorname\r\n , at.Jahrgang\r\n , if('" . $svm . "', te.Name, IF(a.Vereinsinfo = '', v.Name, a.Vereinsinfo)) \r\n , LPAD(s.Bezeichnung,5,'0') as heatid\r\n , st.Bestleistung\r\n , at.xAthlet\r\n , at.Land\r\n , r.Status\r\n , ss.Starthoehe\r\n FROM\r\n runde AS r\r\n LEFT JOIN serie AS s ON (s.xRunde = r.xRunde)\r\n LEFT JOIN serienstart AS ss ON (ss.xSerie = s.xSerie)\r\n LEFT JOIN start AS st ON (st.xStart = ss.xStart)\r\n LEFT JOIN anmeldung AS a ON (a.xAnmeldung = st.xAnmeldung)\r\n LEFT JOIN athlet AS at ON (at.xAthlet = a.xAthlet)\r\n LEFT JOIN team AS te ON(a.xTeam = te.xTeam) \r\n LEFT JOIN verein AS v ON (v.xVerein = at.xVerein)\r\n LEFT JOIN rundentyp_" . $_COOKIE['language'] . " AS rt ON rt.xRundentyp = r.xRundentyp\r\n WHERE \r\n r.xRunde = {$round} \r\n ORDER BY\r\n heatid\r\n , ss.Position"; $result = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { // initialize variables $h = 0; $i = 0; $current_athlete = false; $curr_class = ''; $resTable = new GUI_HighResultTable($round, $layout, $status); while ($row = mysql_fetch_row($result)) { /* * Heat headerline */ if ($h != $row[2]) { $h = $row[2]; // keep heat ID if (is_null($row[0])) { // only one round $title = "{$strFinalround} {$row['3']}"; } else { // more than one round $title = "{$row['0']}: {$row['1']}{$row['3']}"; } $c = 0; if ($status == $cfgRoundStatus['results_done']) { $c = 1; // increment colspan to include ranking } $resTable->printHeatTitle($row[2], $row[3], $title, $row[4]); $resTable->printAthleteHeader('', $round, $row[17]); } // ET new heat /* * Athlete data lines */ $rank = ''; $perfs = array(); $res = mysql_query("\r\n\t\t\t\t\tSELECT\r\n\t\t\t\t\t\tr.Leistung\r\n\t\t\t\t\t\t, r.Info\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\tresultat as r\r\n\t\t\t\t\tWHERE r.xSerienstart = {$row['5']}\r\n\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\tr.xResultat DESC\r\n\t\t\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { if ($status == $cfgRoundStatus['results_done']) { $rank = $row[7]; } while ($resrow = mysql_fetch_row($res)) { $perf = AA_formatResultMeter($resrow[0]); $info = $resrow[1]; $perfs[] = "{$perf} ( {$info} )"; } // end loop every tech result acc. programm mode mysql_free_result($res); } $heatStart = AA_getCurrAthlete($row[2]); if ($heatStart > 0) { if ($row[5] == $heatStart) { $curr_class = "active"; } } else { if (empty($perfs) && !$current_athlete) { $current_athlete = true; $curr_class = "active"; } } $resTable->printAthleteLine($row[6], $row[8], "{$row['9']} {$row['10']}", AA_formatYearOfBirth($row[11]), $row[12], AA_formatResultMeter($row[14]), $perfs, $fett, $rank, $row[16], $row[15], $curr_class, '', $row[17], $row[18]); $curr_class = ""; } $resTable->endTable(); mysql_free_result($result); } // ET DB error } } } // ET heat seeding done } else { AA_printErrorMsg($strErrMergedRoundSpeaker); } ?> <script type="text/javascript"> <!-- window.setTimeout("updatePage()", <?php echo $cfgMonitorReload * 1000; ?> ); function updatePage() { window.open("speaker_results.php?round=<?php echo $round; ?> ", "main"); } </script> <?php }
* meeting_relays_header.php * ------------------------- * */ require './lib/cl_gui_button.lib.php'; require './lib/cl_gui_menulist.lib.php'; require './lib/cl_gui_page.lib.php'; require './lib/common.lib.php'; if (AA_connectToDB() == FALSE) { // invalid DB connection return; // abort } if (AA_checkMeetingID() == FALSE) { // no meeting selected return; // abort } // // Display data // ------------ $page = new GUI_Page('meeting_relays_header'); $page->startPage(); $page->printPageTitle($strRelays . ": " . $_COOKIE['meeting']); $menu = new GUI_Menulist(); $menu->addButton("meeting_relays_print.php", "{$strPrint} ...", "detail"); $menu->addButton("meeting_relay_add.php?cat={$category}", $strNewEntry, "detail"); $menu->addButton("meeting_relays_startnumbers.php", "{$strStartnumbers}", "detail"); $menu->addButton($cfgURLDocumentation . 'help/meeting/relays.html', $strHelp, '_blank'); $menu->printMenu(); $page->endPage();
require './lib/common.lib.php'; require './lib/results.lib.php'; if (AA_connectToDB() == FALSE) { // invalid DB connection return; // abort } if (AA_checkMeetingID() == FALSE) { // no meeting selected return; // abort } $page = new GUI_Page('speaker_rankinglists'); $page->startPage(); $page->printPageTitle($strRankingLists . ": " . $_COOKIE['meeting']); $menu = new GUI_Menulist(); $menu->addButton($cfgURLDocumentation . 'help/speaker/rankinglists.html', $strHelp, '_blank'); $menu->printMenu(); ?> <script type="text/javascript"> <!-- function checkDisc() { e = document.getElementById("combined"); e.checked=true; } //--> </script>
function AA_results_printMenu($round, $status, $prog_mode, $arg) { require './lib/cl_gui_menulist.lib.php'; require './lib/common.lib.php'; global $strUserInfo; $menu = new GUI_Menulist(); if ($status == $GLOBALS['cfgRoundStatus']['results_done']) { $menu->addButton("event_results.php?arg=change_results&round={$round}", $GLOBALS['strChangeResults']); $menu->addButton("event_rankinglists.php?round={$round}", $GLOBALS['strPrint'] . " ..."); $menu->printMenu(); // Info: signature for invalid results ?> <p/> <table><tr> <?php foreach ($GLOBALS['cfgInvalidResult'] as $value) { echo "<td>" . $value['code'] . " = " . $value['long'] . " </td>"; } ?> </tr> </table> <?php } else { // if ($prog_mode != 2) { $menu->addButton("event_results.php?arg=results_done&round={$round}", $GLOBALS['strEvaluateResults']); // } $res = mysql_query("SELECT Zeitmessung FROM runde LEFT JOIN wettkampf USING(xWettkampf) WHERE xRunde = {$round}"); $row = mysql_fetch_array($res); if ($row[0] == 1) { $menu->addButton("event_results.php?arg=time_measurement&round={$round}", $GLOBALS['strGetResultsFromTM']); } if ($status == $GLOBALS['cfgRoundStatus']['heats_done']) { $menu->addButton("event_heats.php?arg=del_heats&round={$round}", $GLOBALS['strDeleteHeats']); } else { $menu->addButton("event_results.php?arg=del_results&round={$round}", $GLOBALS['strDeleteResults']); } if ($status == $GLOBALS['cfgRoundStatus']['results_live']) { $menu->addButton("event_results.php?arg=live_results&round={$round}", $GLOBALS['strResetLiveStatus']); } $menu->printMenu(); // Info: signature for invalid results ?> <p/> <table><tr> <?php foreach ($GLOBALS['cfgInvalidResult'] as $value) { echo "<td>" . $value['long'] . " = " . $value['code'] . "</td>"; } ?> </tr> <?php if ($prog_mode == 2 && $arg == 'high') { ?> <tr><td> </td></tr> <tr> <td colspan="6"><?php echo $strUserInfo; ?> </td> </tr> <?php } ?> </table> <?php } }
@copy('tmp/' . $entry, 'layout/' . $entry); } @unlink('tmp/' . $entry); } } } } } $dir->close(); // // display the 6 positions for page layout // $page = new GUI_Page('meeting_page_layout'); $page->startPage(); $page->printPageTitle($strPageLayout); $menu = new GUI_Menulist(); $menu->addButton($cfgURLDocumentation . 'help/meeting/print_layout.html', $strHelp, '_blank'); $menu->printMenu(); ?> <p/> <table class='dialog'> <form name="layout" method="POST" action="meeting_page_layout.php" enctype="multipart/form-data"> <input type="hidden" name="arg" value="save"> <input type="hidden" name="item" value="<?php echo $row['xLayout']; ?> "> <tr> <th class='dialog'><?php echo $strPosition;
<?php /********** * * dlg_startnumbers.php * -------------------- * */ require './lib/cl_gui_menulist.lib.php'; require './lib/cl_gui_page.lib.php'; require './lib/common.lib.php'; $page = new GUI_Page('dlg_startnumbers'); $page->startPage(); $page->printPageTitle($strAssignStartnumbers); $menu = new GUI_Menulist(); $menu->addButton($cfgURLDocumentation . 'help/meeting/startnumbers.html', $strHelp, '_blank'); $menu->printMenu(); ?> <form action='meeting_entries.php' method='get'> <input type='hidden' name='arg' value='assign_startnbrs'> <table class='dialog'> <tr> <th class='dialog'><?php echo $strSortBy; ?> </th> <th class='dialog'><?php echo $strRules; ?> </th>
"list"); </script> <?php } ?> <table > <tr> <td class='forms'> <?php echo $strSearchForLicense; ?> </td> <td class='forms' colspan="2"> <?php $menu = new GUI_Menulist(); $menu->addSearchfield('meeting_entry_add.php', '_self', 'post', '', false); $menu->printMenu(); ?> </td> </tr> <tr> <td> </td> </tr> <tr> <?php if (!(isset($_POST['searchfield']) && !is_numeric($_POST['searchfield']))) { ?> <th class='dialog'>
} else { if ($arg == "deactivateAll") { $faq->deactivateAll(); } elseif ($arg == "activate") { $faq->activateFaq($_POST['id']); } elseif ($arg == "deactivate") { $faq->deactivateFaq($_POST['id']); } } // // Display enrolement list // $page = new GUI_Page('admin_faq'); $page->startPage(); $page->printPageTitle($strFaq); $menu = new GUI_Menulist(); $menu->addButton('admin_faq.php?arg=activateAll', $strFaqActivateAll, '_self'); $menu->addButton('admin_faq.php?arg=deactivateAll', $strFaqDeactivateAll, '_self'); $menu->addButton($cfgURLDocumentation . 'help/administration/index.html', $strHelp, '_blank'); $menu->printMenu(); ?> <p/> <table class='dialog'> <tr> <th class='dialog' width="300"><?php echo $strFaqQuestion; ?> </th> <th class='dialog'><?php echo $strFaqActivatedShort;