• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP AA_formatResultTime函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中AA_formatResultTime函数的典型用法代码示例。如果您正苦于以下问题:PHP AA_formatResultTime函数的具体用法?PHP AA_formatResultTime怎么用?PHP AA_formatResultTime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了AA_formatResultTime函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: AA_regie_Track


//.........这里部分代码省略.........
                     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], 'regie', $relay);
                     if ($relay == FALSE) {
                         // athlete display
                         $resTable->printAthleteHeader('regie');
                     } else {
                         // relay display
                         $resTable->printRelayHeader('regie');
                     }
                 }
                 // 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_formatResultTime($row[19], true), $perfRounded, $row[10], $row[11], '', $row[20], 'regie', $row[21]);
                 } else {
                     // relay
                     // get Athletes
                     $arrAthletes = array();
                     $sql = "SELECT at.Vorname, at.Name 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]);
                         }
                     }
                     $arrAthletes = count($arrAthletes) > 0 ? $arrAthletes : 0;
                     $resTable->printRelayLine($row[9], $row[12], $row[13], $perfRounded, $row[10], $row[11], $arrAthletes, 'regie', $row[17]);
                 }
             }
             // 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
     }
     mysql_query("UNLOCK TABLES");
 }
开发者ID:laiello,项目名称:athletica,代码行数:101,代码来源:regie_results_track.lib.php


示例2: AA_rankinglist_Combined


//.........这里部分代码省略.........
             $query = "SELECT\r\n                d.Kurzname\r\n                , d.Typ\r\n                , MAX(IF ((r.Info='-') && (d.Typ = 6) ,0,r.Leistung)) \r\n                , r.Info\r\n                , MAX(IF ((r.Info='-') && (d.Typ = 6),0,r.Punkte)) AS pts    \r\n                , s.Wind\r\n                , w.Windmessung\r\n                , st.xStart\r\n                , CONCAT(DATE_FORMAT(ru.Datum,'{$cfgDBdateFormat}'), ' ', TIME_FORMAT(ru.Startzeit, '{$cfgDBtimeFormat}'))\r\n                , w.Mehrkampfreihenfolge \r\n                , ss.Bemerkung\r\n                , w.info\r\n                , ss.xSerienstart \r\n                , d.Code\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 st.xAnmeldung = {$row['0']}  \r\n                {$selectionDisc} \r\n                AND ( (r.Info = '" . $cfgResultsHighOut . "' && d.Typ = 6 && r.Leistung < 0)  OR  (d.Typ = 6 && (r.Info !=  '" . $cfgResultsHighOut . "' && r.Info !=  '" . $cfgResultsHighOut1 . "' \r\n                                                 && r.Info !=  '" . $cfgResultsHighOut2 . "'  && r.Info !=  '" . $cfgResultsHighOut3 . "'  && r.Info !=  '" . $cfgResultsHighOut4 . "'\r\n                                                 && r.Info !=  '" . $cfgResultsHighOut5 . "' && r.Info !=  '" . $cfgResultsHighOut6 . "' && r.Info !=  '" . $cfgResultsHighOut7 . "' && r.Info !=  '" . $cfgResultsHighOut7 . "'))\r\n                      OR (d.Typ != 6 ) )   \r\n                \r\n               AND w.xKategorie = {$row['9']}\r\n                {$selectionMk}   \r\n                AND ru.Status = " . $cfgRoundStatus['results_done'] . "   \r\n            GROUP BY\r\n                st.xStart\r\n            ORDER BY\r\n                {$order}";
             $res = mysql_query($query);
             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 ($pt_row[4] > 0 || $ukc) {
                             // any points for this event
                             if ($ukc) {
                                 $pointsUKC = AA_utils_calcPointsUKC(0, $pt_row[2], 0, $row[16], $pt_row[12], $row[14], $row[0], $pt_row[13]);
                                 $points = $points + $pointsUKC;
                                 // calculate points
                                 mysql_query("UPDATE resultat SET\r\n                                                    Punkte = {$pointsUKC}\r\n                                              WHERE\r\n                                                    xSerienstart = {$pt_row['12']}");
                                 if (mysql_errno() > 0) {
                                     AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
                                 }
                                 AA_StatusChanged(0, 0, $pt_row[12]);
                             } else {
                                 $points = $points + $pt_row[4];
                                 // calculate points
                             }
                             if ($dCode == 408) {
                                 // UBS Kids Cup
                                 switch ($pt_row[1]) {
                                     case 1:
                                     case 2:
                                         $c = 1;
                                         // track
                                         break;
                                     case 4:
                                     case 5:
                                     case 6:
                                         $c = 2;
                                         // jump and high
开发者ID:laiello,项目名称:athletica,代码行数:67,代码来源:rankinglist_combined.lib.php


示例3: AA_formatResultTime

 //check if performance from base or manually entered
 $start_row['BaseEffort'] == 'y' || $start_row['Bestleistung'] == '0' ? $manual = '' : ($manual = " manual");
 // check if this is a valid selection (age on category)
 if ($event_row[5] < $agelimit || $event_row[11] != $sex) {
     $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
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:meeting_entry.php


示例4: USING

				</form>
			</tr>
			<?php 
        $sql = "SELECT xWertungstabelle_Punkte\r\n\t\t\t\t\t\t   , xWertungstabelle\r\n\t\t\t\t\t\t   , d.xDisziplin\r\n\t\t\t\t\t\t   , Geschlecht\r\n\t\t\t\t\t\t   , Leistung\r\n\t\t\t\t\t\t   , Punkte \r\n\t\t\t\t\t\t   , Typ\r\n\t\t\t\t\t  FROM wertungstabelle_punkte \r\n\t\t\t\t LEFT JOIN disziplin_" . $_COOKIE['language'] . " AS d USING(xDisziplin) \r\n\t\t\t\t\t WHERE xWertungstabelle = " . $val_scoretable . " \r\n\t\t\t\t\t   AND d.xDisziplin = " . $val_discipline . " \r\n\t\t\t\t  ORDER BY Geschlecht ASC, \r\n\t\t\t\t\t\t   Punkte DESC;";
        $result = mysql_query($sql);
        $counter = 0;
        $btn = new GUI_Button('', '');
        while ($row = mysql_fetch_assoc($result)) {
            $counter++;
            $rowclass = $counter % 2 == 0 ? 'odd' : 'even';
            if ($row['Typ'] == $cfgDisciplineType[$strDiscTypeTrack] || $row['Typ'] == $cfgDisciplineType[$strDiscTypeTrackNoWind] || $row['Typ'] == $cfgDisciplineType[$strDiscTypeRelay] || $row['Typ'] == $cfgDisciplineType[$strDiscTypeDistance]) {
                $secflag = false;
                if (substr($row['Leistung'], 0, 2) >= 60) {
                    $secflag = true;
                }
                $perf = AA_formatResultTime($row['Leistung'], false, $secflag);
            } else {
                $perf = AA_formatResultMeter($row['Leistung']);
            }
            ?>
				<tr class='<?php 
            echo $rowclass;
            ?>
'>
					<form name='pt<?php 
            echo $counter;
            ?>
' action='admin_scoretables.php#item_<?php 
            echo $row[0];
            ?>
' method='post'>
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:admin_scoretables.php


示例5: AA_printErrorMsg

                // 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");
        mysql_free_result($result);
    }
}
// ET DB error
$doc->endPage();
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:print_meeting_teamsms.php


示例6: AA_formatResultTime

                } else {
                    $sb_perf = '';
                }
                if ($best_effort != 0) {
                    $pb_perf = AA_formatResultTime($best_effort, true, true);
                } else {
                    $pb_perf = '';
                }
            } else {
                if ($season_effort != 0) {
                    $sb_perf = AA_formatResultTime($season_effort, true);
                } else {
                    $sb_perf = '';
                }
                if ($best_effort != 0) {
                    $pb_perf = AA_formatResultTime($best_effort, true);
                } else {
                    $pb_perf = '';
                }
            }
        }
        ?>
			<tr>
				<th class='dialog'><?php 
        echo $row_perf['DiszName'];
        ?>
</th>
				<td class='forms_right'><?php 
        echo $pb_perf;
        ?>
</td>
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:speaker_entry.php


示例7: AA_formatYearOfBirth

     // assemble name field
     $year = AA_formatYearOfBirth($row[4]);
     $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;
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:print_meeting_entries.php


示例8: update

        function update()
        {
            require './lib/utils.lib.php';
            require './lib/cl_result.lib.php';
            // update result ID
            // ----------------
            if ($this->reply->getAction() == RES_ACT_INSERT || $this->reply->getAction() == RES_ACT_DELETE) {
                $item = '';
                if ($this->reply->getAction() == RES_ACT_INSERT) {
                    $item = $this->reply->getKey();
                }
                ?>
<script type="text/javascript">
<!--
	parent.frames[1].document.<?php 
                echo $_POST['obj'];
                ?>
.item.value="<?php 
                echo $item;
                ?>
";
//-->
</script>
<?php 
            }
            // update page with formatted result, info
            // ---------------------------------------
            // after insert, update action
            if ($this->reply->getAction() == RES_ACT_UPDATE || $this->reply->getAction() == RES_ACT_INSERT) {
                // track disciplines, with or without wind
                if ($this->type == $GLOBALS['cfgDisciplineType'][$GLOBALS['strDiscTypeNone']] || $this->type == $GLOBALS['cfgDisciplineType'][$GLOBALS['strDiscTypeTrack']] || $this->type == $GLOBALS['cfgDisciplineType'][$GLOBALS['strDiscTypeTrackNoWind']] || $this->type == $GLOBALS['cfgDisciplineType'][$GLOBALS['strDiscTypeDistance']] || $this->type == $GLOBALS['cfgDisciplineType'][$GLOBALS['strDiscTypeRelay']]) {
                    $perf = AA_formatResultTime($this->reply->getPerformance());
                } else {
                    $perf = AA_formatResultMeter($this->reply->getPerformance());
                }
                ?>
<script type="text/javascript">
<!--
	parent.frames[1].document.<?php 
                echo $_POST['obj'];
                ?>
.perf.value="<?php 
                echo $perf;
                ?>
";
//-->
</script>
<?php 
                // technical disciplines: update wind
                if ($this->type == $GLOBALS['cfgDisciplineType'][$GLOBALS['strDiscTypeJump']]) {
                    ?>
<script type="text/javascript">
<!--
	parent.frames[1].document.<?php 
                    echo $_POST['obj'];
                    ?>
.wind.value="<?php 
                    echo $this->reply->getInfo();
                    ?>
";
//-->
</script>
<?php 
                } else {
                    if ($this->type == $GLOBALS['cfgDisciplineType'][$GLOBALS['strDiscTypeHigh']]) {
                        ?>
<script type="text/javascript">
<!--
	parent.frames[1].document.<?php 
                        echo $_POST['obj'];
                        ?>
.attempts.value="<?php 
                        echo $this->reply->getInfo();
                        ?>
";
//-->
</script>
<?php 
                    }
                }
            } else {
                if ($this->reply->getAction() == RES_ACT_DELETE) {
                    // technical disciplines: clear wind
                    if ($this->type == $GLOBALS['cfgDisciplineType'][$GLOBALS['strDiscTypeJump']]) {
                        ?>
<script type="text/javascript">
<!--
	parent.frames[1].document.<?php 
                        echo $_POST['obj'];
                        ?>
.wind.value="";
//-->
</script>
<?php 
                    } else {
                        if ($this->type == $GLOBALS['cfgDisciplineType'][$GLOBALS['strDiscTypeHigh']]) {
                            ?>
<script type="text/javascript">
<!--
	parent.frames[1].document.<?php 
//.........这里部分代码省略.........
开发者ID:laiello,项目名称:athletica,代码行数:101,代码来源:cl_action_saveResult.lib.php


示例9: processDiscipline


//.........这里部分代码省略.........
                             if ($notValidPerf) {
                                 $teams[$team]['perfNotValid'] = $teams[$team]['perf'];
                                 $teams[$team]['perf'] = 99999999;
                             }
                         } else {
                             if ($notValidPerf) {
                                 $teams[$team]['perfNotValid'] = $teams[$team]['perf'];
                             }
                         }
                     }
                 }
                 $team = $row[0];
                 $teams[$team]['club'] = $row[2];
                 $teams[$team]['name'] = $row[1];
                 $c = 0;
             }
             $perf = 0;
             $perf_print = 0;
             $rank = 0;
             $asc = true;
             if ($disctype == $cfgDisciplineType[$strDiscTypeJump] || $disctype == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $disctype == $cfgDisciplineType[$strDiscTypeThrow] || $disctype == $cfgDisciplineType[$strDiscTypeHigh]) {
                 $perf = $row[6];
                 $asc = false;
                 if ($row[8] >= 0) {
                     $perf_print = AA_formatResultMeter($row[6]);
                 } else {
                     $perf_print = $perf * -1;
                 }
             } else {
                 $perf = ceil($row[6] / 10) * 10;
                 // round up 1000
                 $asc = true;
                 if ($disctype == $cfgDisciplineType[$strDiscTypeTrack] || $disctype == $cfgDisciplineType[$strDiscTypeTrackNoWind]) {
                     $perf_print = AA_formatResultTime($row[6], true, true);
                 } else {
                     $perf_print = AA_formatResultTime($row[6], true);
                 }
             }
             $rank = $row[9];
             if ($c < $countRes) {
                 $teams[$team]['perf'] += $perf;
                 $teams[$team]['perfTot'] += $perf;
                 $teams[$team]['rankTot'] += $rank;
                 if ($asc) {
                     if ($perf < $teams[$team]['perfBest'] || $teams[$team]['perfBest'] == 0) {
                         $teams[$team]['perfBest'] = $perf;
                         $teams[$team]['rankBest'] = $rank;
                     }
                 } else {
                     if ($perf > $teams[$team]['perfBest']) {
                         $teams[$team]['perfBest'] = $perf;
                         $teams[$team]['rankBest'] = $rank;
                     }
                 }
                 $teams[$team]['athletes'][] = "{$row['3']} {$row['4']}, {$perf_print}";
             } else {
                 $teams[$team]['athletes'][] = "[{$row['3']} {$row['4']}, {$perf_print}]";
             }
             $c++;
         }
         if ($team > 0) {
             // calc last team
             $countAthl = count($teams[$team]['athletes']);
             if ($countAthl < $countRes) {
                 $teams[$team]['perf'] = 0;
                 $teams[$team]['perfNotValid'] = 0;
开发者ID:laiello,项目名称:athletica,代码行数:67,代码来源:rankinglist_teamsm.lib.php


示例10: AA_speaker_Track


//.........这里部分代码省略.........
                                 $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);
     }
 }
开发者ID:laiello,项目名称:athletica,代码行数:101,代码来源:speaker_results_track.lib.php


示例11: 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] . "&nbsp;(" . $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
//.........这里部分代码省略.........
开发者ID:laiello,项目名称:athletica,代码行数:101,代码来源:rankinglist_sheets.lib.php


示例12: gen_result_xml_UKC_CM


//.........这里部分代码省略.........
                     //
                     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
                         }
                         if ($row[3] == 331) {
                             $perfRounded = "j" . $perfRounded;
                             // j = jump
开发者ID:laiello,项目名称:athletica,代码行数:67,代码来源:cl_xml_data.lib.php


示例13: gen_result_xml


//.........这里部分代码省略.........
                                 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_r 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AA_formatYearOfBirth函数代码示例发布时间:2022-05-14
下一篇:
PHP AA_formatResultMeter函数代码示例发布时间:2022-05-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap