*/
/**
* All DokuWiki plugins to extend the admin function
* need to inherit from this class
**/
class admin_plugin_botmon extends AdminPlugin {
/**
* Return the path to the icon being displayed in the main admin menu.
*
* @return string full path to the icon file
**/
public function getMenuIcon() {
$plugin = $this->getPluginName();
return DOKU_PLUGIN . $plugin . '/img/admin.svg';
}
/**
* output appropriate html
*/
public function html() {
global $conf;
// display GeoIP data?
$geoIPconf = $this->getConf('geoiplib');
$hasOldLogFiles = $this->hasOldLogFiles();
// spinner animation as SVG image:
$svg = '';
$pluginPath = $conf['basedir'] . 'lib/plugins/' . $this->getPluginName();
/* Plugin Headline */
echo NL . '
Bot Monitoring Plugin
Latest data
Loading …
Overview
Humans overview
Web traffic (humans only)
Visitor logs
Process log
' . NL;
/* proces old logs */
if ($hasOldLogFiles) {
$helper = $this->loadHelper('botmon', true);
$helper->cleanup();
} else {
echo DOKU_TAB . DOKU_TAB . DOKU_TAB . '