本文整理汇总了PHP中AA_formatResultMeter函数的典型用法代码示例。如果您正苦于以下问题:PHP AA_formatResultMeter函数的具体用法?PHP AA_formatResultMeter怎么用?PHP AA_formatResultMeter使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AA_formatResultMeter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AA_rankinglist_Combined
//.........这里部分代码省略.........
, ru.Datum
, ru.Startzeit
");
*/
if (mysql_errno() > 0) {
// DB error
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
} else {
$count_disc = 0;
$remark = '';
$points_disc = array();
while ($pt_row = mysql_fetch_row($res)) {
$remark = $pt_row[10];
$lastTime = $pt_row[8];
if ($pt_row[1] == $cfgDisciplineType[$strDiscTypeJump]) {
$res2 = mysql_query("SELECT r.Info FROM \r\n\t\t\t\t\t\t\t\tresultat as r\r\n\t\t\t\t\t\t\t\tLEFT JOIN serienstart as ss USING(xSerienstart)\r\n\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\tss.xStart = {$pt_row['7']}\r\n\t\t\t\t\t\t\tAND\tr.Punkte = {$pt_row['4']}");
$row2 = mysql_fetch_array($res2);
$pt_row[3] = $row2[0];
}
// set wind, if required
if ($pt_row[6] == 1) {
if ($pt_row[1] == $cfgDisciplineType[$strDiscTypeTrack]) {
$wind = " / " . $pt_row[5];
} else {
if ($pt_row[1] == $cfgDisciplineType[$strDiscTypeJump]) {
$wind = " / " . $pt_row[3];
}
}
} else {
$wind = '';
}
// format output
if ($pt_row[1] == $cfgDisciplineType[$strDiscTypeJump] || $pt_row[1] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $pt_row[1] == $cfgDisciplineType[$strDiscTypeThrow] || $pt_row[1] == $cfgDisciplineType[$strDiscTypeHigh]) {
$perf = AA_formatResultMeter($pt_row[2]);
} else {
$perf = AA_formatResultTime($pt_row[2], true);
}
// show only points for number of choosed disciplines if the diszipline is done
$count_disc++;
if ($count_disc <= $disc_nr) {
if (!empty($pt_row[11])) {
$pt_row[11] = " ({$pt_row['11']})";
}
if ($pt_row[4] > 0) {
// any points for this event
$points = $points + $pt_row[4];
// calculate points
if ($dCode == 403) {
// Athletic Cup
switch ($pt_row[1]) {
case 1:
case 2:
$c = 0;
// track
break;
case 4:
case 6:
$c = 1;
// jump and high
break;
case 8:
$c = 2;
// throw
break;
default:
$c = 0;
示例2: AA_formatResultMeter
<th class='dialog' colspan="3"><?php
echo $strSB_long;
?>
</th>
</tr>
<?php
}
if ($row_perf['Typ'] == $cfgDisciplineType[$strDiscTypeJump] || $row_perf['Typ'] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $row_perf['Typ'] == $cfgDisciplineType[$strDiscTypeThrow] || $row_perf['Typ'] == $cfgDisciplineType[$strDiscTypeHigh]) {
if (strlen($row_perf['season_effort']) > 0) {
$sb_perf = AA_formatResultMeter(str_replace(".", "", $row_perf['season_effort']));
} else {
$sb_perf = '';
}
if (strlen($row_perf['best_effort']) > 0) {
$pb_perf = AA_formatResultMeter(str_replace(".", "", $row_perf['best_effort']));
} else {
$pb_perf = '';
}
} else {
//convert performance-time to milliseconds
$timepices = explode(":", $row_perf['season_effort']);
$season_effort = $timepices[0] * 360 * 1000 + $timepices[1] * 60 * 1000 + $timepices[2] * 1000 + $timepices[3];
$timepices = explode(":", $row_perf['best_effort']);
$best_effort = $timepices[0] * 360 * 1000 + $timepices[1] * 60 * 1000 + $timepices[2] * 1000 + $timepices[3];
if ($row_perf['Typ'] == $cfgDisciplineType[$strDiscTypeTrack] || $row_perf['Typ'] == $cfgDisciplineType[$strDiscTypeTrackNoWind]) {
if ($season_effort != 0) {
$sb_perf = AA_formatResultTime($season_effort, true, true);
} else {
$sb_perf = '';
}
示例3: AA_formatResultTime
$cat = $row[5];
if (empty($row[8])) {
// not assigned to a team
$club = $row[7];
// use club name
} else {
$club = $row[8];
// use team name
}
$ioc = $row[13];
$mkcode = $row[23];
}
if ($row[11] == $cfgDisciplineType[$strDiscTypeTrack] || $row[11] == $cfgDisciplineType[$strDiscTypeTrackNoWind] || $row[11] == $cfgDisciplineType[$strDiscTypeRelay] || $row[11] == $cfgDisciplineType[$strDiscTypeDistance]) {
$perf = AA_formatResultTime($row[12]);
} else {
$perf = AA_formatResultMeter($row[12]);
}
if (!is_a($doc, "PRINT_CatDiscEntryPage") && !is_a($doc, "GUI_CatDiscEntryPage") && !is_a($doc, "PRINT_ClubCatDiscEntryPage") && !is_a($doc, "GUI_ClubCatDiscEntryPage")) {
// 403 = UBS Kids Cup
// 799 = ...kampf
// show all disziplines (also if performance is 0) by UBS Kids Cup and ...kampf
if ($perf == 0 && $row[23] != 408 && $row[23] != 799 || $row[23] > 0 && $row[23] != 408 && $row[23] != 799 && isset($cfgCombinedDef[$row[23]]) && $perf > 0) {
//$Info = ($row[17]!="") ? ' ('.$row[17].')' : '';
$Info = $row[18] != "" ? ' (' . $row[18] . ')' : '';
$noFee = false;
if ($row[18] != "" && $m != $row[19]) {
if ($row[23] > 0 && isset($cfgCombinedDef[$row[23]])) {
// normal combined
$disc = $disc . $sep . $row[19] . $Info;
// add combined
} else {
示例4: AA_formatResultMeter
$pf = $row[10];
// best effort by choosed combined disziplin
} else {
$pf = $row[5];
// best MK
}
} else {
$pf = $row[5];
// best effort
}
if ($pf == 9999999) {
$pf = 0;
}
// show top performance of athletes
if ($row[6] == $cfgDisciplineType[$strDiscTypeJump] || $row[6] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $row[6] == $cfgDisciplineType[$strDiscTypeThrow] || $row[6] == $cfgDisciplineType[$strDiscTypeHigh]) {
$perf = AA_formatResultMeter($pf);
//$perf = AA_formatResultMeter($row[5]);
} else {
if ($row[6] == $cfgDisciplineType[$strDiscTypeTrack] || $row[6] == $cfgDisciplineType[$strDiscTypeTrackNoWind]) {
// $perf = AA_formatResultTime($row[5], true, true);
$perf = AA_formatResultTime($pf, true, true);
} else {
//$perf = AA_formatResultTime($row[5], true);
$perf = AA_formatResultTime($pf, true);
}
}
if ($combined) {
if ($_GET['event'] == 0) {
// the whole combined event
$perf = $pf;
// points
示例5: AA_speaker_High
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();
//.........这里部分代码省略.........
示例6: ON
// increment line count
$athletes = '';
$sql = "SELECT a.xAnmeldung\r\n , a.Startnummer\r\n , at.Name\r\n , at.Vorname\r\n , at.Jahrgang \r\n , s.Bestleistung\r\n , d.Typ \r\n , d.xDisziplin \r\n FROM anmeldung AS a \r\n LEFT JOIN teamsmathlet AS sma ON(a.xAnmeldung = sma.xAnmeldung) \r\n LEFT JOIN athlet AS at ON(a.xAthlet = at.xAthlet) \r\n LEFT JOIN start AS s ON(s.xAnmeldung = a.xAnmeldung) \r\n LEFT JOIN wettkampf AS w ON (w.xWettkampf = s.xWettkampf) \r\n LEFT JOIN disziplin_" . $_COOKIE['language'] . " AS d ON (d.xDisziplin = w.xDisziplin) \r\n WHERE sma.xTeamsm = " . $s . " \r\n ORDER BY at.Name\r\n , at.Vorname";
$res = mysql_query($sql);
if (mysql_errno() > 0) {
// DB error
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
} else {
$sep = "";
while ($ath_row = mysql_fetch_row($res)) {
if ($disc_keep != $ath_row[7]) {
continue;
}
$perf = 0;
if ($ath_row[6] == $cfgDisciplineType[$strDiscTypeJump] || $ath_row[6] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $ath_row[6] == $cfgDisciplineType[$strDiscTypeThrow] || $ath_row[6] == $cfgDisciplineType[$strDiscTypeHigh]) {
$perf = AA_formatResultMeter($ath_row[5]);
} else {
if ($ath_row[6] == $cfgDisciplineType[$strDiscTypeTrack] || $ath_row[6] == $cfgDisciplineType[$strDiscTypeTrackNoWind]) {
$perf = AA_formatResultTime($ath_row[5], true, true);
} else {
$perf = AA_formatResultTime($ath_row[5], true);
}
}
$athletes = $athletes . $sep . $ath_row[1] . ". " . $ath_row[2] . " " . $ath_row[3] . " (" . $perf . ") ";
$sep = ", ";
}
mysql_free_result($res);
}
$doc->printAthletes($athletes, true);
}
printf("</table>\n");
示例7: AA_formatResultTime
$span = "<span class='highlight_red'>";
$span_end = "</span>";
} else {
$span = "";
$span_end = "";
}
if ($event_row[2] == $cfgDisciplineType[$strDiscTypeTrack] || $event_row[2] == $cfgDisciplineType[$strDiscTypeTrackNoWind] || $event_row[2] == $cfgDisciplineType[$strDiscTypeRelay] || $event_row[2] == $cfgDisciplineType[$strDiscTypeDistance]) {
$class = 'time';
if ($event_row[2] == $cfgDisciplineType[$strDiscTypeDistance]) {
$perf = AA_formatResultTime($start_row[1]);
} else {
$perf = AA_formatResultTime($start_row[1], false, true);
}
} else {
$class = 'meter';
$perf = AA_formatResultMeter($start_row[1]);
}
//
// merge the disciplines for a combined event
//
if ($event_row[10] == $cfgEventType[$strEventTypeSingleCombined]) {
if (!$comb_start) {
echo "</tr>";
}
$comb_start = true;
$d = 1;
// check if one of the combined events is selected
$start_comb = false;
$resStartComb = mysql_query("SELECT xStart FROM\r\n start as s\r\n , wettkampf as w\r\n WHERE\r\n w.xKategorie = {$event_row['8']}\r\n AND w.Mehrkampfcode = {$event_row['9']}\r\n AND s.xWettkampf = w.xWettkampf\r\n AND s.xAnmeldung = {$row['0']}");
if (mysql_num_rows($resStartComb) > 0) {
$start_comb = true;
示例8: AA_regie_High
//.........这里部分代码省略.........
}
$arg = isset($_GET['arg1']) ? $_GET['arg1'] : (isset($_COOKIE['sort_speakres']) ? $_COOKIE['sort_speakres'] : 'pos');
setcookie('sort_speakres', $arg1, time() + 2419200);
// display all athletes
if ($arg == "pos") {
$argument = "ss.Position";
$img_pos = "img/sort_act.gif";
} else {
if ($arg == "rang") {
$argument = "orderRang, 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.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 , if (t.rang > 0, t.rang, 999999) as orderRang \r\n\t\t\tFROM\r\n\t\t\t\trunde AS r\r\n\t\t\t\tLEFT JOIN serie AS s ON (s.xRunde = r.xRunde )\r\n\t\t\t\tLEFT JOIN serienstart AS ss ON (ss.xSerie = s.xSerie)\r\n\t\t\t\tLEFT JOIN start AS st ON (st.xStart = ss.xStart)\r\n\t\t\t\tLEFT JOIN anmeldung AS a ON (a.xAnmeldung = st.xAnmeldung)\r\n\t\t\t\tLEFT JOIN athlet AS at ON (at.xAthlet = a.xAthlet)\r\n\t\t\t\tLEFT JOIN verein AS v ON (v.xVerein = at.xVerein)\r\n LEFT JOIN tempHigh AS t ON (t.xSerienstart = ss.xSerienstart) \r\n\t\t\t LEFT JOIN rundentyp AS rt ON (rt.xRundentyp = r.xRundentyp)\r\n\t\t\tWHERE r.xRunde = {$round} \t\t\t\r\n\t\t\tORDER BY \r\n\t\t\t\theatid ,\r\n\t\t\t\t" . $argument);
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);
$resTable->printHeatTitleRegie($cat, $disc);
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], 'regie');
$resTable->printAthleteHeader('regie');
}
// 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];
} else {
$rank = $row[17];
}
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";
}
}
if ($rank == 999999) {
$rank = '';
}
$resTable->printAthleteLine($row[6], $row[8], "{$row['9']} {$row['10']}", '', '', AA_formatResultMeter($row[14]), $perfs, $fett, $rank, '', $row[15], $curr_class, 'regie');
$curr_class = "";
}
$resTable->endTable();
mysql_free_result($result);
}
// ET DB error
mysql_query("UNLOCK TABLES");
}
示例9: AA_sheets_processCombined
function AA_sheets_processCombined($xCategory, $category, $wTyp)
{
require './config.inc.php';
// get athlete info per category and team
$sql = "\r\n SELECT\r\n DISTINCT(a.xAnmeldung)\r\n , at.Name\r\n , at.Vorname\r\n , at.Jahrgang\r\n , t.xTeam\r\n , t.Name\r\n , v.Name\r\n , IF(at.xRegion = 0, at.Land, re.Anzeige) AS Land \r\n FROM\r\n anmeldung AS a\r\n LEFT JOIN athlet AS at ON (at.xAthlet = a.xAthlet)\r\n INNER JOIN team AS t ON (t.xTeam = a.xTeam )\r\n LEFT JOIN verein AS v ON (v.xVerein = t.xVerein)\r\n LEFT JOIN start as st ON (st.xAnmeldung = a.xAnmeldung )\r\n LEFT JOIN wettkampf as w ON (w.xWettkampf = st.xWettkampf)\r\n LEFT JOIN region AS re ON (at.xRegion = re.xRegion) \r\n WHERE \r\n a.xMeeting = " . $_COOKIE['meeting_id'] . " \r\n AND w.xKategorie = {$xCategory}\r\n AND w.Typ = {$wTyp}\r\n ORDER BY\r\n t.xTeam\r\n ";
$results = mysql_query($sql);
if (mysql_errno() > 0) {
// DB error
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
} else {
$evaluation = 5;
// nbr of athletes included in total result
$a = 0;
$club = '';
$info = '';
$name = '';
$points = 0;
$team = '';
$sep = '';
$tm = '';
$year = '';
$country = '';
while ($row = mysql_fetch_row($results)) {
// store previous athlete before processing new athlete
if ($a != $row[0] && $a > 0) {
$athleteList[] = array("points" => $points, "name" => $name, "year" => $year, "info" => $info, "country" => $country);
$points = 0;
$info = '';
$sep = '';
}
// store previous team before processing new team
if ($tm != $row[4] && $tm > 0) {
usort($athleteList, "AA_sheets_cmp");
// sort athletes by points
// nbr of athletes to include in team result
$total = 0;
for ($i = 0; $i < $evaluation; $i++) {
$total = $total + $athleteList[$i]['points'];
}
$teamList[] = array("points" => $total, "name" => $team, "club" => $club, "athletes" => $athleteList);
$team = '';
$club = '';
unset($athleteList);
$sep = '';
}
$tm = $row[4];
// keep current team
// events
$sql = "\r\n SELECT\r\n d.Kurzname\r\n , d.Typ\r\n , MAX(r.Leistung)\r\n , r.Info\r\n , MAX(r.Punkte) AS pts\r\n , s.Wind\r\n , w.Windmessung\r\n FROM\r\n start AS st USE INDEX (Anmeldung)\r\n LEFT JOIN serienstart AS ss ON (ss.xStart = st.xStart)\r\n LEFT JOIN resultat AS r ON (r.xSerienstart = ss.xSerienstart)\r\n LEFT JOIN serie AS s ON (s.xSerie = ss.xSerie) \r\n LEFT JOIN runde AS ru ON (ru.xRunde = s.xRunde)\r\n LEFT JOIN wettkampf AS w ON (w.xWettkampf = st.xWettkampf)\r\n LEFT JOIN disziplin_" . $_COOKIE['language'] . " AS d ON (d.xDisziplin = w.xDisziplin)\r\n WHERE \r\n st.xAnmeldung = {$row['0']} \r\n AND w.Typ = " . $cfgEventType[$strEventTypeClubCombined] . " \r\n AND r.Info != '" . $cfgResultsHighOut . "'\r\n GROUP BY\r\n st.xStart\r\n ORDER BY\r\n ru.Datum\r\n , ru.Startzeit\r\n ";
$res = mysql_query($sql);
if (mysql_errno() > 0) {
// DB error
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
} else {
while ($pt_row = mysql_fetch_row($res)) {
// set wind, if required
if ($pt_row[6] == 1) {
if ($pt_row[1] == $cfgDisciplineType[$strDiscTypeTrack]) {
$wind = " / " . $pt_row[5];
} else {
if ($pt_row[1] == $cfgDisciplineType[$strDiscTypeJump]) {
$wind = " / " . $pt_row[3];
}
}
} else {
$wind = '';
}
// format output
if ($pt_row[1] == $cfgDisciplineType[$strDiscTypeJump] || $pt_row[1] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $pt_row[1] == $cfgDisciplineType[$strDiscTypeThrow] || $pt_row[1] == $cfgDisciplineType[$strDiscTypeHigh]) {
$perf = AA_formatResultMeter($pt_row[2], true);
} else {
$perf = AA_formatResultTime($pt_row[2], true);
}
// calculate points
$points = $points + $pt_row[4];
// accumulate points
if ($pt_row[4] > 0) {
// any points for this event
$info = $info . $sep . $pt_row[0] . " (" . $perf . $wind . ")";
$sep = ", ";
}
}
// END WHILE combined events
mysql_free_result($res);
}
$a = $row[0];
$name = $row[1] . " " . $row[2];
$year = AA_formatYearOfBirth($row[3]);
$team = $row[5];
$club = $row[6];
$country = $row[7];
}
// END WHILE athlete per category
mysql_free_result($results);
if (!empty($tm)) {
// last athlete
$athleteList[] = array("points" => $points, "name" => $name, "year" => $year, "info" => $info, "country" => $country);
// last team
usort($athleteList, "AA_sheets_cmp");
// sort athletes by points
//.........这里部分代码省略.........
示例10: AA_speaker_High
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
}
示例11: gen_result_xml_UKC_CM
//.........这里部分代码省略.........
// store round ids for later purpose
$GLOBALS['rounds'][] = $row_results['xRunde'];
//
// athlete results
//
if ($ru == $row_results['xRunde'] && $id == $row_results['xAthlet']) {
continue;
}
$ru = $row_results['xRunde'];
if ($id != $row_results['xAthlet']) {
// new athlete
$id = $row_results['xAthlet'];
if (empty($row_results['Lizenznummer']) && empty($row_results['kidID'])) {
$inMasterData = 1;
$licensePaid = 1;
} else {
$inMasterData = 0;
if ($row_results['Bezahlt'] == 'y') {
$licensePaid = 1;
} else {
$licensePaid = 0;
}
}
}
$perf = 0;
// result for alabus
$wind = "";
$perfRounded = 0;
// result for combined detail text
// add effort parameters
$wind = "";
if ($row[2] == $cfgDisciplineType[$strDiscTypeJump] || $row[2] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $row[2] == $cfgDisciplineType[$strDiscTypeThrow] || $row[2] == $cfgDisciplineType[$strDiscTypeHigh]) {
$perf = AA_alabusDistance($row_results['Leistung']);
$perfRounded = AA_formatResultMeter($row_results['Leistung']);
$wind = strtr($row_results['Info'], ",", ".");
} else {
$perf = AA_alabusTime($row_results['Leistung']);
$perfRounded = AA_formatResultTime($row_results['Leistung'], true);
$wind = strtr($row_results['Wind'], ",", ".");
}
if ($row[1] == 0 || $wind == "-" || $wind == "") {
$wind = " ";
}
if (is_numeric($row_results['Bezeichnung'])) {
$row_results['Bezeichnung'] = sprintf("%02s", $row_results['Bezeichnung']);
} else {
if (strlen($row_results['Bezeichnung']) == 1) {
$row_results['Bezeichnung'] .= "_";
}
}
$rank = " ";
$row_results['Bezeichnung'] = " ";
//
//add points for combined contests
if ($combined[$row_results['xAthlet']][$row[3]]['points'] < $row_results['Punkte']) {
$license = $row_results['Lizenznummer'];
if ($row_results['Lizenznummer'] == 0) {
$license = '';
}
$kidsID_upload = $row_results['kidID'];
if ($row_results['kidID'] == 0) {
$kidsID_upload = '';
}
if ($row[3] == 30) {
$perfRounded = "r" . $perfRounded;
// r = run
示例12: AA_speaker_Tech
//.........这里部分代码省略.........
// 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
}
示例13: AA_speaker_Tech
//.........这里部分代码省略.........
$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");
}
示例14: gen_result_xml
//.........这里部分代码省略.........
//$this->close_open_tags("athletes");
$this->write_xml_open("athlete", array('license' => $row_results['Lizenznummer'], 'licensePaid' => $licensePaid, 'licenseCat' => '', 'inMasterData' => $inMasterData));
// write athletes data if athletica generated
//
if (!$inMasterData) {
if ($row_results['Land'] == "-") {
$row_results['Land'] = " ";
}
$this->write_xml_finished("lastName", $row_results['Name']);
$this->write_xml_finished("firstName", $row_results['Vorname']);
$birthday = $row_results['Geburtstag'];
if ($birthday == "0000-00-00") {
$birthday = $row_results['Jahrgang'] . "-01-01";
}
$this->write_xml_finished("birthDate", $birthday);
$this->write_xml_finished("sex", $row_results['Geschlecht']);
$this->write_xml_finished("nationality", $row_results['Land']);
$this->write_xml_finished("accountCode", $row_results['Vereincode']);
$this->write_xml_finished("secondaccountCode", " ");
}
$this->write_xml_open("efforts");
}
$perf = 0;
// result for alabus
$wind = "";
$perfRounded = 0;
// result for combined detail text
$this->write_xml_open("effort");
// add effort parameters
$this->write_xml_finished("DateOfEffort", $row_results['Datum']);
$wind = "";
if ($row[2] == $cfgDisciplineType[$strDiscTypeJump] || $row[2] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $row[2] == $cfgDisciplineType[$strDiscTypeThrow] || $row[2] == $cfgDisciplineType[$strDiscTypeHigh]) {
$perf = AA_alabusDistance($row_results['Leistung']);
$perfRounded = AA_formatResultMeter($row_results['Leistung']);
$this->write_xml_finished("distanceResult", $perf);
$wind = strtr($row_results['Info'], ",", ".");
} else {
$perf = AA_alabusTime($row_results['Leistung']);
$perfRounded = AA_formatResultTime($row_results['Leistung'], true);
$this->write_xml_finished("timeResult", $perf);
$wind = strtr($row_results['Wind'], ",", ".");
}
if ($row[1] == 0 || $wind == "-" || $wind == "") {
$wind = " ";
}
if (is_numeric($row_results['Bezeichnung'])) {
$row_results['Bezeichnung'] = sprintf("%02s", $row_results['Bezeichnung']);
} else {
if (strlen($row_results['Bezeichnung']) == 1) {
$row_results['Bezeichnung'] .= "_";
}
}
if ($row[0] == $cfgEventType[$strEventTypeSingleCombined]) {
//$rankadd = "D)".$rankadd;
if ($wind > 4) {
// if any result has a wind of over 4 m/s, the combined result gets a flag 'w'
$rankadd .= "w";
}
$rank = " ";
$row_results['Bezeichnung'] = " ";
//
//add points for combined contests
if ($combined[$row_results['xAthlet']][$row[3]]['points'] < $row_results['Punkte']) {
$combined[$row_results['xAthlet']][$row[3]] = array('wind' => $wind, 'kindOfLap' => " " . $row_results['Typ'], 'lap' => $row_results['Bezeichnung'], 'placeAddon' => $rankadd, 'points' => $row_results['Punkte'], 'effort' => $perfRounded, 'discipline' => $row[6], 'license' => $row_results['Lizenznummer'], 'inMasterData' => $inMasterData, 'licensePaid' => $licensePaid, 'DateOfEffort' => $row_results['Datum'], 'lastName' => $row_results['Name'], 'firstName' => $row_results['Vorname'], 'birthDate' => $birthday, 'sex' => $row_results['Geschlecht'], 'nationality' => $row_results['Land'], 'accountCode' => $row_results['Vereincode'], 'priority' => $combinedPriority, 'licenseType' => $row_results['Lizenztyp']);
// category of athlete, used for calculating the rankings
$combined[$row_results['xAthlet']]['catathlete'] = $row_results['Katathlet'];
示例15: getNextHeight
function getNextHeight($heat, $curr_perf)
{
require './lib/common.lib.php';
$result = mysql_query("\r\n SELECT DISTINCT\r\n r.Leistung\r\n FROM\r\n resultat AS r\r\n , serienstart AS ss\r\n WHERE r.xSerienstart = ss.xSerienstart\r\n AND ss.xSerie = {$heat}\r\n AND r.Leistung > {$curr_perf}\r\n ORDER BY\r\n r.Leistung ASC\r\n ");
if (mysql_errno() > 0) {
// DB error
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
} else {
$row = mysql_fetch_row($result);
$new_perf = AA_formatResultMeter($row[0]);
mysql_free_result($result);
}
return $new_perf;
}