Пример #1
0
 function __construct()
 {
     $this->xcaptcha_handler = Xcaptcha::getInstance();
     $this->config = $this->xcaptcha_handler->loadConfig('text');
     $this->plugin = 'text';
 }
Пример #2
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         xcaptcha
 * @since           2.6.0
 * @author          Laurent JEN (Aka DuGris)
 * @version         $Id$
 */
$cpt = 1;
$adminmenu[$cpt]['title'] = _MI_XCAPTCHA_INDEX;
$adminmenu[$cpt]['link'] = 'admin/index.php';
$adminmenu[$cpt]['icon'] = 'home.png';
static $xcaptcha_handler;
if (!isset($xcaptcha_handler)) {
    include_once dirname(__DIR__) . '/class/xcaptcha.php';
    $xcaptcha_handler = new Xcaptcha();
}
$xoops = Xoops::getInstance();
foreach (array_keys($xcaptcha_handler->getPluginList()) as $key) {
    ++$cpt;
    $xoops->loadLanguage($key, 'xcaptcha');
    $adminmenu[$cpt]['title'] = constant('_MI_XCAPTCHA_ADMENU_' . strtoupper($key));
    $adminmenu[$cpt]['link'] = 'admin/index.php?type=' . $key;
    $adminmenu[$cpt]['icon'] = 'administration.png';
}
++$cpt;
$adminmenu[$cpt]['title'] = _MI_XCAPTCHA_ABOUT;
$adminmenu[$cpt]['link'] = 'admin/about.php';
$adminmenu[$cpt]['icon'] = 'about.png';