1<?php 2/** 3 * Statistics plugin - data logger 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// all features are brokered by the helper plugin 15/** @var helper_plugin_statistics $plugin */ 16$plugin = plugin_load('helper', 'statistics'); 17 18dbglog('Log ' . $_SERVER['REQUEST_URI']); 19 20switch($_REQUEST['do']) { 21 case 'v': 22 $plugin->Logger()->log_access(); 23 $plugin->Logger()->log_session(1); 24 break; 25 26 /** @noinspection PhpMissingBreakStatementInspection */ 27 case 'o': 28 $plugin->Logger()->log_outgoing(); 29 30 //falltrough 31 default: 32 $plugin->Logger()->log_session(); 33} 34 35// fixme move to top 36$plugin->sendGIF(); 37 38//Setup VIM: ex: et ts=4 : 39