*  arising in any way out of the use of this software, even if advised of the  *
 *  possibility of such damage.                                                 *
 *                                                                              *
 ********************************************************************************/
include_once "../../config.php";
include_once $HUB_FLM->getCodeDirPath("ui/headerstats.php");
global $CFG;
if ($USER->getIsAdmin() != "Y") {
    echo "<div class='errors'>" . $LNG->FORM_ERROR_NOT_ADMIN . "</div>";
    include_once $HUB_FLM->getCodeDirPath("ui/dialogfooter.php");
    die;
}
$sort = optional_param("sort", "date", PARAM_ALPHANUM);
$oldsort = optional_param("lastsort", "", PARAM_ALPHANUM);
$direction = optional_param("lastdir", "DESC", PARAM_ALPHANUM);
$registeredUsers = getRegisteredUsers($direction, $sort, $oldsort);
$countUsers = count($registeredUsers);
echo '<h1>' . $LNG->ADMIN_NEWS_USERS . '</h1>';
echo '<h3 style="float: left">' . $LNG->STATS_GLOBAL_REGISTER_TOTAL_LABEL . ' = ' . $countUsers . '</h3>';
?>
	<div style="clear: both; float: left; margin-top: 10px;" align="center"><img src="usersgraph.php?time=months" /></div>
	<div style="clear: both; float: left; margin-top: 20px;" class="adminTableDiv" align="center">
	<table width="1000" cellpadding="2" border="1" style="border-collapse: collapse">
	<?php 
if ($sort) {
    if ($direction) {
        if ($oldsort === $sort) {
            if ($direction === 'ASC') {
                $direction = "DESC";
            } else {
                $direction = "ASC";
Example #2
0
<?php

include_once 'database/users.php';
$users = [];
if (isset($_GET['event'])) {
    if (isset($_GET['attending'])) {
        $users = getRegisteredUsers($_GET['event']);
    } else {
        $users = getNonRegisteredUsers($_GET['event']);
    }
} else {
    $users = getUsers();
}
echo json_encode($users);