Пример #1
0
// | modify it under the terms of the GNU General Public License               |
// | as published by the Free Software Foundation; either version 2            |
// | of the License, or (at your option) any later version.                    |
// |                                                                           |
// | This program is distributed in the hope that it will be useful,           |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of            |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
// | GNU General Public License for more details.                              |
// |                                                                           |
// | You should have received a copy of the GNU General Public License         |
// | along with this program; if not, write to the Free Software Foundation,   |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
// |                                                                           |
// +---------------------------------------------------------------------------+
require_once './include/security.inc';
if (!GUS_HasAccess(TRUE)) {
    exit;
}
require_once './include/sql.inc';
require_once './include/util.inc';
/* 
* Main Function
*/
$rec = DB_query("SELECT DISTINCT YEAR( date ) AS year,\n\t\tMONTH( date ) AS month,\n\t\tDATE_FORMAT( date, '%b %Y' ) AS display_month\n\t\tFROM {$_TABLES['gus_userstats']} ORDER BY date");
$rnum = DB_numRows($rec);
$GUS_MONTHS = array();
$num_pages = ceil($rnum / $_GUS_months);
if (!isset($_GET['page']) or empty($_GET['page'])) {
    $curpage = 1;
} else {
    if ($_GET['page'] === 'latest') {
Пример #2
0
// | modify it under the terms of the GNU General Public License               |
// | as published by the Free Software Foundation; either version 2            |
// | of the License, or (at your option) any later version.                    |
// |                                                                           |
// | This program is distributed in the hope that it will be useful,           |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of            |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
// | GNU General Public License for more details.                              |
// |                                                                           |
// | You should have received a copy of the GNU General Public License         |
// | along with this program; if not, write to the Free Software Foundation,   |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
// |                                                                           |
// +---------------------------------------------------------------------------+
require_once './include/security.inc';
if (!GUS_HasAccess()) {
    exit;
}
require_once './include/sql.inc';
require_once './include/util.inc';
/* 
* Main Function
*/
// Check for cached file
if (file_exists(GUS_cachefile()) and date('Yn') !== $year . $month) {
    $display = GUS_getcache();
} else {
    // no cached version found - generate page
    if (SEC_inGroup('Root') or SEC_hasRights('gus.view')) {
        $T = GUS_template_start('daily.thtml');
    } else {
Пример #3
0
// | modify it under the terms of the GNU General Public License               |
// | as published by the Free Software Foundation; either version 2            |
// | of the License, or (at your option) any later version.                    |
// |                                                                           |
// | This program is distributed in the hope that it will be useful,           |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of            |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
// | GNU General Public License for more details.                              |
// |                                                                           |
// | You should have received a copy of the GNU General Public License         |
// | along with this program; if not, write to the Free Software Foundation,   |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
// |                                                                           |
// +---------------------------------------------------------------------------+
require_once './include/security.inc';
if (!GUS_HasAccess(FALSE)) {
    exit;
}
require_once './include/sql.inc';
require_once './include/util.inc';
// limit rows to display in reports
// this should be set in config.php
if (empty($_GUS_limit)) {
    $_GUS_limit = 25;
}
/*
* Main Function
*/
// IF nothing is set THEN use today
if ($day == 0 and $month == 0 and $year == 0) {
    $year = date('Y');