1<?php
2/**
3 * Statistics plugin - image creator
4 *
5 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author     Andreas Gohr <gohr@cosmocode.de>
7 */
8
9if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__) . '/../../../') . '/');
10define('DOKU_DISABLE_GZIP_OUTPUT', 1);
11require_once(DOKU_INC . 'inc/init.php');
12session_write_close();
13
14/** @var helper_plugin_statistics $plugin */
15$plugin = plugin_load('helper', 'statistics');
16try {
17    if(!auth_ismanager()) throw new Exception('Access denied');
18    $plugin->Graph()->render($_REQUEST['img'], $_REQUEST['f'], $_REQUEST['t'], $_REQUEST['s']);
19} catch(Exception $e) {
20    $plugin->sendGIF(false);
21}
22
23//Setup VIM: ex: et ts=4 :
24