コード例 #1
0
    _e("Yearly");
    ?>
</b><span><?php 
    echo $visits['yearly'];
    ?>
</span></li>
				</ul>
				
				<object class="stats" type="image/svg+xml" data="./php/stats-svg.php?l=<?php 
    echo $locale;
    ?>
&amp;g=access"></object>
				
				<?php 
    // Get the share stats
    $share_stats = shareStats();
    // Any share stats to display?
    if (count($share_stats)) {
        ?>
					<h4><?php 
        _e("Share statistics");
        ?>
</h4>
					
					<ol class="stats">
						<?php 
        // Display the users who have the largest share folder
        $share_users = largestShare($share_stats, 8);
        foreach ($share_users as $current_user => $current_value) {
            echo '<li><b><a href="xmpp:' . $current_user . '">' . $current_user . '</a></b><span>' . formatBytes($current_value) . '</span></li>';
        }
コード例 #2
0
// Include the translations
includeTranslation($locale, 'main');
$drawsvgchart = new DrawSVGChart();
// Generation vars
$link = FALSE;
$evolution = FALSE;
// Access graph?
if ($graph == 'access') {
    // Values
    $elements = getMonthlyVisits();
    $legend = array(array('#5276A9', T_("Visits")));
    $evolution = TRUE;
} else {
    if ($graph == 'share') {
        // Values
        $elements = largestShare(shareStats(), 8);
        $legend = array(array('#5276A9', T_("Size")));
    } else {
        if ($graph == 'others') {
            // Values
            $elements = otherStats();
            $legend = array(array('#5276A9', T_("Size")));
        }
    }
}
// Generate the chart
$svgchart = $drawsvgchart->createChart($elements, $legend, $link, $evolution, $graph);
// No error?
if (!$drawsvgchart->has_errors()) {
    header('Content-Type: image/svg+xml; charset=utf-8');
    echo $drawsvgchart->getXMLOutput();