forked from splitbrain/dokuwiki-plugin-statistics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimg.php
23 lines (20 loc) · 703 Bytes
/
img.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
* Statistics plugin - image creator
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Andreas Gohr <[email protected]>
*/
if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__) . '/../../../') . '/');
define('DOKU_DISABLE_GZIP_OUTPUT', 1);
require_once(DOKU_INC . 'inc/init.php');
session_write_close();
/** @var helper_plugin_statistics $plugin */
$plugin = plugin_load('helper', 'statistics');
try {
if(!auth_ismanager()) throw new Exception('Access denied');
$plugin->Graph()->render($_REQUEST['img'], $_REQUEST['f'], $_REQUEST['t'], $_REQUEST['s']);
} catch(Exception $e) {
$plugin->sendGIF(false);
}
//Setup VIM: ex: et ts=4 :