$main_content .= '<TD bgcolor="yellow"><b><center><a href="?subtopic=powergamers&type=' . $i . '">' . $i . ' Days Ago</a></center></B></TD>';
    }
}
if ($type == 1) {
    $main_content .= '<TD bgcolor="red"><b><center><a href="?subtopic=powergamers&type=1">1 Day Ago</a></center></B></TD>';
} else {
    $main_content .= '<TD bgcolor="yellow"><b><center><a href="?subtopic=powergamers&type=1">1 Day Ago</a></center></B></TD>';
}
if (empty($type)) {
    $main_content .= '<TD bgcolor="red"><b><center><a href="?subtopic=powergamers">Today</a></center></B></TD>';
} else {
    $main_content .= '<TD bgcolor="yellow"><b><center><a href="?subtopic=powergamers">Today</a></center></B></TD>';
}
$main_content .= '</TR>';
foreach ($players as $player) {
    if (!is_int($number_of_rows / 2)) {
        $bgcolor = $config['site']['darkborder'];
    } else {
        $bgcolor = $config['site']['lightborder'];
    }
    $number_of_rows++;
    $main_content .= '<tr bgcolor="' . $bgcolor . '"><td align="center">' . $number_of_rows . '. </td>';
    if ($player['online'] == 1) {
        $main_content .= '<td><a href="?subtopic=characters&name=' . urlencode($player['name']) . '"><b><font color="green">' . htmlspecialchars($player['name']) . '</font></b></a>';
    } else {
        $main_content .= '<td><a href="?subtopic=characters&name=' . urlencode($player['name']) . '"><b><font color="red">' . htmlspecialchars($player['name']) . '</font></b></a>';
    }
    $main_content .= '<br />' . $player['level'] . ' ' . htmlspecialchars(Website::getVocationName($player['vocation'])) . '</td><td align="right">' . coloured_value($player['exphist1'] + $player['exphist2'] + $player['exphist3'] + $player['exphist4'] + $player['exphist5'] + $player['exphist6'] + $player['exphist7'] + $player['experience'] - $player['exphist_lastexp']) . '</td>';
    $main_content .= '<td align="right">' . coloured_value($player['exphist7']) . '</td><td align="right">' . coloured_value($player['exphist6']) . '</td><td align="right">' . coloured_value($player['exphist5']) . '</td><td align="right">' . coloured_value($player['exphist4']) . '</td><td align="right">' . coloured_value($player['exphist3']) . '</td><td align="right">' . coloured_value($player['exphist2']) . '</td><td align="right">' . coloured_value($player['exphist1']) . '</td><td align="right">' . coloured_value($player['experience'] - $player['exphist_lastexp']) . '</td></tr>';
}
$main_content .= '</TABLE>';
示例#2
0
}
if (empty($type)) {
    $znotePlayers = mysql_select_multi('SELECT `a`.`id`, `b`.`player_id`, `a`.`name`, `a`.`vocation`, `a`.`level`, `a`.`group_id`, `a`.`experience`, `b`.`exphist_lastexp`, `b`.`exphist1`, `b`.`exphist2`, `b`.`exphist3`, `b`.`exphist4`, `b`.`exphist5`, `b`.`exphist6`, `b`.`exphist7`,   (`a`.`experience` - `b`.`exphist_lastexp`)  AS `expdiff` FROM `players` `a` JOIN `znote_players` `b` ON `a`.`id` = `b`.`player_id`  WHERE `a`.`group_id` < 2 ORDER BY `expdiff` DESC LIMIT ' . $limit);
} elseif ($type >= 1 && $type <= 3) {
    $znotePlayers = mysql_select_multi('SELECT `a`.`id`, `b`.`player_id`, `a`.`name`, `a`.`vocation`, `a`.`level`, `a`.`group_id`, `a`.`experience`, `b`.`exphist_lastexp`, `b`.`exphist1`, `b`.`exphist2`, `b`.`exphist3`, `b`.`exphist4`, `b`.`exphist5`, `b`.`exphist6`, `b`.`exphist7`, (`a`.`experience` - `b`.`exphist_lastexp`) AS `expdiff` FROM `players` `a` JOIN `znote_players` `b` ON `a`.`id` = `b`.`player_id`  WHERE `a`.`group_id` < 2 ORDER BY `exphist' . (int) $type . '` DESC LIMIT ' . $limit);
}
echo '<CENTER><H2>Ranking of powergamers</H2></CENTER>
<BR>
<table class="table table-striped">
		<td><center><b>#</b></center></td>
		<td><b>Name</b></td>';
echo '<td><center>Total</center></td>';
for ($i = 3; $i >= 2; $i--) {
    echo $type == $i ? '<TD id="selectedP" width="16%"><a href="powergamers.php?type=' . $i . '">' . $i . '<b> Days Ago</b></a></B></TD>' : '<TD width="16%"><center><a href="powergamers.php?type=' . $i . '">' . $i . ' Days Ago</a></TD>';
}
echo $type == 1 ? '<TD id="selectedP" width="16%"><b><a href="powergamers.php?type=1">1 Day Ago</a></B></TD>' : '<TD width="16%"><a href="powergamers.php?type=1">1 Day Ago</a></TD>';
echo empty($type) ? '<TD id="selectedP"><b><a href="powergamers.php">Today</a></b></TD>' : '<TD><a href="powergamers.php">Today</a></TD>';
echo '</TR>';
$number_of_rows = 1;
if ($znotePlayers) {
    foreach ($znotePlayers as $player) {
        echo '<td><center>' . $number_of_rows . '.</center></td>';
        echo '<td><a href="characterprofile.php?name=' . $player['name'] . '">' . $player['name'] . '</a>';
        echo '<br> ' . $player['level'] . ' ' . htmlspecialchars(vocation_id_to_name($player['vocation'])) . ' ';
        echo '<td><center>' . coloured_value($player['exphist1'] + $player['exphist2'] + $player['exphist3'] + $player['experience'] - $player['exphist_lastexp']) . '</center></td>';
        echo '<td><center>' . coloured_value($player['exphist3']) . '</center></td><td><center>' . coloured_value($player['exphist2']) . '</center></td><td><center>' . coloured_value($player['exphist1']) . '</center></td><td><center>' . coloured_value($player['experience'] - $player['exphist_lastexp']) . '</center></td></tr>';
        $number_of_rows++;
    }
}
echo '</table><br></div>';
include 'layout/overall/footer.php';