slhlp = plugin_load('helper', $this->getPluginName()); if(!$this->slhlp) msg('Loading the '.$this->getPluginName().' helper failed. Make sure that the '.$this->getPluginName().' plugin is installed.', -1); } /** * return sort order for position in admin menu */ function getMenuSort() { return 999; } function getMenuText($lang) { return $this->getLang('securelogin_conf'); } /** * handle user request */ function handle() { if(!$this->slhlp->canWork()) msg("You need openssl php module for this plugin work!", -1); elseif($this->slhlp->haveKey() && !$this->slhlp->workCorrect()) msg("Your version of dokuwiki not generate AUTH_LOGIN_CHECK event, plugin not work!"); $fn = $_REQUEST['fn']; if (is_array($fn)) { $cmd = key($fn); $param = $fn[$cmd]; } else { $cmd = $fn; $param = null; } switch($cmd) { case "newkey": $this->slhlp->generateKey($param); break; case "test": msg(urldecode($this->slhlp->decrypt($param['message']))); break; } } /** * output appropriate html */ function html() { if(!$this->slhlp->canWork()) { print $this->locale_xhtml('needopenssl'); return; } elseif($this->slhlp->haveKey() && !$this->slhlp->workCorrect()) print $this->locale_xhtml('needpatch'); ptln('
\n".
// $this->slhlp->getPublicKey().
// "
",
// $format='xhtml');
}
ptln('