1<?php 2 3if (!defined("DOKU_INC")) die(); 4if (!defined("DOKU_PLUGIN")) define("DOKU_PLUGIN", DOKU_INC . "lib/plugins/"); 5 6class admin_plugin_authorstats extends DokuWiki_Admin_Plugin 7{ 8 public function html() 9 { 10 if (isset($_REQUEST["init_db"])) { 11 $action = plugin_load("action", "authorstats"); 12 $action->_initializeData(); 13 } 14 echo "<h1>Authorstats</h1>"; 15 $action = script(); 16 echo "<form action='" . $action . "' method='post' id='plugin__upgrade_form'>"; 17 echo "<input type='hidden' name='do' value='admin' />"; 18 echo "<input type='hidden' name='page' value='authorstats' />"; 19 echo "<input type='hidden' name='sectok' value='" . getSecurityToken() . "' />"; 20 echo "<div>" . $this->getLang("admin-description") . "</div>"; 21 echo "<button type='submit' name='init_db' value='1'>" . $this->getLang("admin-button") . "</button>"; 22 echo "</form>"; 23 } 24} 25