Пример #1
0
echo $units->distanceString();
?>
</td>
   <td class="tbLogHeader">Time</td>
   <td class="tbLogHeader">Avg<br><?php 
echo $units->velocityString();
?>
</td>
   <td class="tbLogHeader">Best Avg<br><?php 
echo $units->velocityString();
?>
</td>
  </tr>
<?php 
$riders = new RDrider(DBConnect(), $units);
$results = $riders->queryAllStats($currentQuery->getWhereStatement());
$riderCount = 0;
$orides = 0;
$otime = 0;
$odist = 0;
$omAvgSpeed = 0;
$omDist = 0;
$oaDist = 0;
while ($riders->parseNextRow($results)) {
    $riderCount++;
    echo "<tr>\n";
    echo " <td class=\"tbLogHeader\">" . fixFieldForHTML($riders->f_firstName . " " . $riders->f_lastName, 0) . "</td>\n";
    echo " <td class=\"tbLogBody\">" . $riders->c_numRides . "</td>\n";
    echo " <td class=\"tbLogBody\">" . number_format($riders->c_totalDist, 2) . "</td>\n";
    echo " <td class=\"tbLogBody\">" . number_format($riders->c_aDist, 2) . "</td>\n";
    echo " <td class=\"tbLogBody\">" . number_format($riders->c_mDist, 2) . "</td>\n";
$pageTitle = S_PERSON . " Stats";
include "header.inc.html";
?>

<H2><?php 
echo S_PERSON;
?>
 Stats for the Last 12 Months</H2>
<p>
</p>


<TABLE class="tbLog" width="820" cellspacing="2px" cellpadding="2px">
<?php 
$riders = new RDrider(DBConnect(), $units);
$results = $riders->queryAllStats("");
$alternator = "";
while ($riders->parseNextRow($results)) {
    echo "<TR>\n";
    echo "<td width=400 height=300 class=\"tbLogBody" . $alternator . "\">";
    echo "<img src=\"graphs/" . $riders->f_riderID . "dist.png\" width=400 height=300></td>\n";
    echo "<td width=20 height=300 >&nbsp;</td>\n";
    echo "<td width=400 heigth=300 class=\"tbLogBody" . $alternator . "\">";
    echo "<img src=\"graphs/" . $riders->f_riderID . "time.png\" width=400 height=300></td>\n";
    echo "</TR>\n";
    if ($alternator == "") {
        $alternator = "2";
    } else {
        $alternator = "";
    }
}