示例#1
0
$totalData = array();
foreach (FriendChecker::$friends as $friend => $alias) {
    $friends[$friend] = array();
    $query = "SELECT * FROM player WHERE apm > 0 AND name IN ('" . implode("','", $alias) . "')";
    $result = mysql_query($query);
    if (!$result) {
        print "Something is wrong :(";
        return;
    }
    $totalApm = 0;
    $count = 0;
    while ($row = mysql_fetch_assoc($result)) {
        if ($row['isRandom']) {
            $race = 'Random';
        } else {
            $race = race2Str($row['race']);
        }
        $friends[$friend][$race]++;
        $totalApm += $row['apm'];
        $count++;
        $totalData[$race]++;
        $totalTotalApm += $row['apm'];
        $total++;
    }
    $friends[$friend]['apm'] = round($totalApm / $count);
    $friends[$friend]['count'] = $count;
}
$totalData['apm'] = round($totalTotalApm / $total);
$totalData['count'] = $total;
$friends['Total'] = $totalData;
$orderBy = "created";
示例#2
0
?>
<br>
<div>Losing Team:</div>
<?php 
foreach ($player as $p) {
    ?>
  <?php 
    if ($p['team'] > 4 && $p['apm'] == 0) {
        continue;
    }
    ?>
  <?php 
    if ($p['team'] != $row['winner']) {
        ?>
    <div><?php 
        echo $p['name'] . " (" . race2Str($p['race']) . ") apm=" . $p['apm'];
        ?>
</div>
  <?php 
    }
}
?>
<br><br>
<form method="post">
<input type="hidden" name="id" value="<?php 
echo $id;
?>
" />
Rating:
<select name="rating">
  <option value=0 <?php