| Code:
|
function displayBuddies($amount) {
include("bf2_stats_config.php");
$queryWhere = generateQuery($conf_buddy_search_string, $conf_buddy_pids_array);
if($amount>0) $limit = "LIMIT 0,$amount";
$query = "SELECT * FROM $db_table_name WHERE $queryWhere ORDER BY score DESC $limit";
$result = mysql_query($query);
$num = @mysql_numrows($result);
// table header "# nick score"
$out .= "<table width='100%' cellspacing='0' cellpadding='0' class='borderAround'>";
$out .= "<tr><td width='100%' hight='31' colspan='6' class='row1' align='center' nowrap><strong>xWzCx Stats</strong><br></td></tr>";
$out .= "<tr class='secondTableColor'>";
$out .= "<td width='5%' class='verySmallFont' nowrap>";
$out .= "<strong>Rank</strong>";
$out .= "</td>";
$out .= "<td width='19%' class='verySmallFont' nowrap>";
$out .= "<strong>Player Name</strong>";
$out .= "</td>";
$out .= "<td width='19%' class='verySmallFont' nowrap>";
$out .= "<strong>Total Score</strong>";
$out .= "</td>";
$out .= "<td width='19%' class='verySmallFont' nowrap>";
$out .= "<strong>Teamwork Score</strong>";
$out .= "</td>";
$out .= "<td width='19%' class='verySmallFont' nowrap>";
$out .= "<strong>Combat score</strong>";
$out .= "</td>";
$out .= "<td width='19%' class='verySmallFont' nowrap>";
$out .= "<strong>Commander score</strong>";
$out .= "</td>";
$out .= "</tr>";
// tabel content, repeated for each player
for($i=0; $i<$num; $i++) {
$out .= "<tr class='secondTableColor'>";
$out .= "<td class='verySmallFont' nowrap>";
$out .= $i+1;
$out .= "</td>";
$out .= "<td class='verySmallFont' nowrap>";
$out .= "<a href='modules.php?name=BF2_Stats&input1=".mysql_result($result,$i,"pid")."'>".htmlspecialchars(mysql_result($result,$i,"nick"))."</a>";
$out .= "</td>";
$out .= "<td class='verySmallFont' nowrap>";
$out .= mysql_result($result,$i,"score");
$out .= "</td>";
//COPY I DID OF THE SCORE NEEDS TO SHOW Teamwork Score
$out .= "<td class='verySmallFont' nowrap>";
$out .= mysql_result($result,$i,"score");
$out .= "</td>";
//COPY I DID OF THE SCORE NEEDS TO SHOW Combat score
$out .= "<td class='verySmallFont' nowrap>";
$out .= mysql_result($result,$i,"score");
$out .= "</td>";
//COPY I DID OF THE SCORE NEEDS TO SHOW Commander score
$out .= "<td class='verySmallFont' nowrap>";
$out .= mysql_result($result,$i,"score");
$out .= "</td>";
$out .= "</tr>";
}
$out .= "</table>";
|
| Code:
|
function scoringTable($val, $cleanVal, $weAre) {
global $set_align, $set_align2;
echo "<table width='100%' class='borderAround'>";
echo "<tr class='secondTableColor'><td class='highlight' colspan='2' align='center'><strong>scoring stats</strong></td></tr>";
echo "<tr class='secondTableColor'><td class='verySmallFont' $set_align><strong>Total score</strong></td>";
echo "<td class='verySmallFont' $set_align2>".calcHighlite("scor", $weAre).$cleanVal["scor"]."</td></tr>";
echo "<tr class='secondTableColor'><td class='verySmallFont' $set_align><strong>Teamwork score</strong></td>";
echo "<td class='verySmallFont' $set_align2>".calcHighlite("twsc", $weAre).$cleanVal["twsc"]."</td></tr>";
echo "<tr class='secondTableColor'><td class='verySmallFont' $set_align><strong>Combat score</strong></td>";
echo "<td class='verySmallFont' $set_align2>".calcHighlite("cmsc", $weAre).$cleanVal["cmsc"]."</td></tr>";
echo "<tr class='secondTableColor'><td class='verySmallFont' $set_align><strong>Commander score</strong></td>";
echo "<td class='verySmallFont' $set_align2>".calcHighlite("cdsc", $weAre).$cleanVal["cdsc"]."</td></tr>";
|