<div class="jumbotron">
        <h1>Most Active Users</h1>
        <?php 
//Get our current month and year.
$endMonth = intval(date('m'));
$endYear = intval(date('Y'));
$startMonth = $endMonth;
$startYear = $endYear - 1;
//Draw our graph.
$data = getTopUsersForInterval($startMonth, $startYear, $endMonth, $endYear);
$donut = new GraphWrapper("topusersoveryear", $data, 'date');
echo $donut->getDonut(325);
?>
        <?php 
$data = getTopUserTweetsForIntervalAsArray($startMonth, $startYear, $endMonth, $endYear);
$multiGraph = new GraphWrapper("topUserActivity", $data, 'date', getTopUsers($startMonth, $startYear, $endMonth, $endYear), 'date', getTopUsers($startMonth, $startYear, $endMonth, $endYear));
echo $multiGraph->getChart();
?>
    </div>
</div>







<?php 
class GraphWrapper
{
    private $data;
Beispiel #2
0
    echo makeBlock("Maintenance", nl2br(getSetting("Site_Maintenance_Message") . "<br /><br /><a href=\"index.php?page=login\">Login</a>"));
    if (isset($_GET['page']) && $_GET['page'] == "login") {
        include "pages/login.php";
    }
} else {
    if (getSetting("Site_Maintenance") && (isMod() && getSetting("Site_Maintenance_Staff") || isAdmin())) {
        echo makeBlock("Maintenance", nl2br(getSetting("Site_Maintenance_Message")) . "<br /><br /><b>As you are a staff member, you can still see the website.</b>");
    }
    ?>
					<div class="sidebar_left">
						<div class="block">
							<div class="blocktitle">Top 10 players</div>
							<div class="blockcontent">
								<ol>
									<?php 
    $topUsers = getTopUsers(10);
    foreach ($topUsers as $user) {
        echo "<li>" . $user->linkName() . " (" . formatInt($user->xp) . ")</li>";
    }
    ?>
								</ol>
							</div>
						</div>
						<div class="block">
							<div class="blocktitle">Top 10 songs</div>
							<div class="blockcontent">
								<ol>
									<?php 
    $topSongs = getTopSongs(10);
    foreach ($topSongs as $song) {
        echo "<li>" . $song->linkName() . " (" . formatInt($song->played) . ")</li>";