From: <du...@us...> - 2012-10-15 23:26:17
|
Revision: 10223 http://sourceforge.net/p/xoops/svn/10223 Author: dugris Date: 2012-10-15 23:26:13 +0000 (Mon, 15 Oct 2012) Log Message: ----------- xcaptcha 1.00 alpha (Xoops CAPTCHA configuration) System extensions for xoops 2.6.x Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/footer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/moduladmin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/logo_large.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/logo_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/blackglass.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/clean.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/red.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/white.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/xcaptcha_logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/recaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/about.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/about.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,30 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +include dirname(__FILE__) . '/header.php'; + +$xoops->header(); +$xoops->theme->addStylesheet('modules/xcontact/css/moduladmin.css'); + +$admin_page = new XoopsModuleAdmin(); + +$admin_page->renderNavigation('about.php'); +$admin_page->renderAbout(); +$xoops->footer(); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/about.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/footer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/footer.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/footer.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,21 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +$xoops->footer(); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/footer.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/header.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/header.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,41 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; + +$op = ''; +if ( isset( $_POST ) ){ + foreach ( $_POST as $k => $v ) { + ${$k} = $v; + } +} +if ( isset( $_GET ) ){ + foreach ( $_GET as $k => $v ) { + ${$k} = $v; + } +} + +XoopsLoad::load('system', 'system'); + +$xoops = Xoops::getInstance(); +$system = System::getInstance(); + +include_once dirname(dirname(__FILE__)) . '/class/xcaptcha.php'; +$xcaptcha_handler = new Xcaptcha(); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/header.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,66 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +include dirname(__FILE__) . '/header.php'; + +switch ( $op ) { + case 'save': + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('index.php', 5, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ( $type == 'config' ) { + $config = $xcaptcha_handler->VerifyData(); + $xcaptcha_handler->writeConfig('captcha.config', $config ); + redirect_header('index.php?type=config', 5, _AM_XCAPTCHA_SAVED); + } else { + if ($xcaptcha_handler->loadPluginHandler( $type )) { + $config = $xcaptcha_handler->Pluginhandler->VerifyData(); + $xcaptcha_handler->writeConfig('captcha.config.' . $type, $config ); + redirect_header('index.php?type=' . $type, 5, _AM_XCAPTCHA_SAVED); + } + } + break; + + case 'default': + default: + $type = isset($type) ? $type : 'config'; + + $xoops->header(); + $xoops->theme->addStylesheet('modules/xcaptcha/css/moduladmin.css'); + + $admin_page = new XoopsModuleAdmin(); + if ( $type == 'config' ) { + $admin_page->renderNavigation('index.php?type=config'); + $admin_page->addInfoBox(_AM_XCAPTCHA_FORM); + $admin_page->addInfoBoxLine($xcaptcha_handler->getForm()); + } else { + if ($xcaptcha_handler->loadPluginHandler( $type )) { + $title = constant('_XCAPTCHA_FORM_' . strtoupper($type) ); + $admin_page->addInfoBox( $title ); + $admin_page->addInfoBoxLine($xcaptcha_handler->Pluginhandler->getForm()); + } else { + redirect_header('index.php', 5, _AM_XCAPTCHA_ERROR); + } + } + $admin_page->renderIndex(); + + break; +} +include dirname(__FILE__) . '/footer.php'; +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/menu.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/menu.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,46 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-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(dirname(__FILE__)) . '/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'; +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/menu.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,161 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class Xcaptcha extends XoopsCaptcha +{ + public $captchaHandler; + public $config = array(); + public $plugin_List = array(); + public $plugin_config = array(); + public $xcaptcha_path_plugin; + + public function __construct() + { + $this->captchaHandler = XoopsCaptcha::getInstance(); + $this->config = $this->loadConfig(); + $this->plugin_List = $this->getPluginList(); + $this->plugin_config = $this->loadConfigPlugin(); + $this->xcaptcha_path_plugin = XOOPS_ROOT_PATH . '/modules/xcaptcha/plugins'; + } + + public function Xcaptcha() + { + $this->__construct(); + } + + static function getInstance() + { + static $instance; + if (!isset($instance)) { + $class = __CLASS__; + $instance = new $class(); + } + return $instance; + } + + + public function loadConfig( $name = 'config') + { + return $this->captchaHandler->loadConfig( $name ); + } + + public function loadBasicConfig($filename = null) + { + return $this->captchaHandler->loadBasicConfig( $filename ); + } + + public function readConfig( $file = 'config') + { + return $this->captchaHandler->readConfig( $file ); + } + + public function writeConfig($file = 'config', $data) + { + return $this->captchaHandler->writeConfig( $file, $data ); + } + + public function getPluginList() + { + $ret = array(); + + foreach (glob($this->captchaHandler->path_basic . '/config.*.php') as $filename) { + $plugin_List = preg_replace('/(config\.)(.*)(\.php)/', '$2', basename($filename) ); + $ret[$plugin_List] = $plugin_List; + } + return $ret; + } + + public function loadConfigPlugin() + { + $config = array(); + foreach ($this->plugin_List as $key ) { + $config = $this->loadConfig( $key ); + } + return $config; + } + + public function getForm() + { + $captcha_form = new XoopsThemeForm('', 'xcaptchaform', 'index.php', 'post', true); + + $activate = new XoopsFormRadio(_AM_XCAPTCHA_ACTIVATE, 'disabled', $this->config['disabled'] ); + $activate->addOption(1, _AM_XCAPTCHA_ENABLE); + $activate->addOption(0, _AM_XCAPTCHA_DISABLE); + $captcha_form->addElement($activate, false); + + $plugin_List = new XoopsFormSelect(_AM_XCAPTCHA_PLUGINS, 'mode', $this->config['mode'] ); + $plugin_List->addOptionArray( $this->plugin_List ); + $captcha_form->addElement($plugin_List, false); + + $captcha_form->addElement(new XoopsFormText(_AM_XCAPTCHA_NAME, 'name', 50, 50, $this->config['name'] ), true); + + $skipmember = new XoopsFormRadio(_AM_XCAPTCHA_SKIPMEMBER, 'skipmember', $this->config['skipmember'] ); + $skipmember->addOption(1, _AM_XCAPTCHA_ENABLE); + $skipmember->addOption(0, _AM_XCAPTCHA_DISABLE); + $captcha_form->addElement($skipmember, false); + + $captcha_form->addElement(new XoopsFormText(_AM_XCAPTCHA_MAXATTEMPTS, 'maxattempts', 2, 2, $this->config['maxattempts'] ), true); + + + $captcha_form->addElement(new XoopsFormHidden('type', 'config' )); + + $button_tray = new XoopsFormElementTray('', ''); + $button_tray->addElement(new XoopsFormHidden('op', 'save')); + $button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); + $captcha_form->addElement($button_tray); + + ob_start(); + $captcha_form->render(); + $ret = ob_get_contents(); + ob_end_clean(); + + return $ret; + } + + public function VerifyData() + { + global $system; + $config = array(); + $_POST['disabled'] = $system->CleanVars($_POST, 'disabled', false, 'boolean'); + $_POST['mode'] = $system->CleanVars($_POST, 'mode', 'image', 'string'); + $_POST['name'] = $system->CleanVars($_POST, 'name', 'xoopscaptcha', 'string'); + $_POST['skipmember'] = $system->CleanVars($_POST, 'skipmember', false, 'boolean'); + $_POST['maxattempts'] = $system->CleanVars($_POST, 'maxattempts', 10, 'int'); + foreach ( array_keys($this->config) as $key) { + $config[$key] = $_POST[$key]; + } + return $config; + } + + public function loadPluginHandler($name = null) + { + $name = empty($name) ? 'text' : $name; + $class = 'Xcaptcha' . ucfirst($name); + $this->Pluginhandler = null; + if (file_exists($file = $this->xcaptcha_path_plugin . '/' . $name . '.php')) { + require_once $file; + $this->Pluginhandler = new $class($this); + } + return $this->Pluginhandler; + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/moduladmin.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/moduladmin.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/moduladmin.css 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,7 @@ +.xo-moduleadmin-icon { + width: 100%!important; + max-width:39%; +} +.xo-moduleadmin-box { + width: 60% !important; +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/css/moduladmin.css ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/changelog.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/changelog.txt 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ +xcaptcha 1.0 \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/changelog.txt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/docs/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/logo_large.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/logo_large.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/logo_small.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/icons/logo_small.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/blackglass.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/blackglass.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/clean.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/clean.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/red.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/red.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/white.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/recaptcha/white.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/xcaptcha_logo.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/images/xcaptcha_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/admin.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/admin.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,35 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +define('_AM_XCAPTCHA_INDEX', 'Configuration'); +define('_AM_XCAPTCHA_FORM', 'Configuration CAPTCHA'); +define('_AM_XCAPTCHA_SAVED', 'The configuration has been saved'); + +define('_AM_XCAPTCHA_ACTIVATE', 'Disable protection'); +define('_AM_XCAPTCHA_ENABLE', 'Yes'); +define('_AM_XCAPTCHA_DISABLE', 'No'); + +define('_AM_XCAPTCHA_PLUGINS', 'Method'); + +define('_AM_XCAPTCHA_NAME', 'CAPTCHA Variable name '); + +define('_AM_XCAPTCHA_SKIPMEMBER', 'Deactivate for members'); + +define('_AM_XCAPTCHA_MAXATTEMPTS', 'Maximum attempts'); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/admin.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/help.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/help/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/image.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/image.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,45 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +define('_MI_XCAPTCHA_ADMENU_IMAGE', 'Image'); + +if ( !defined('_XCAPTCHA_IMAGE') ) { + define('_XCAPTCHA_FORM_IMAGE', 'Configuration CAPTCHA : Image'); + + define('_XCAPTCHA_NUM_CHARS', 'Number of characters'); + define('_XCAPTCHA_CASESENSITIVE', 'Case insensitive'); + define('_XCAPTCHA_FONTSIZE_MIN', 'Minimum size of the font'); + define('_XCAPTCHA_FONTSIZE_MAX', 'Maximum size of the font'); + define('_XCAPTCHA_BACKGROUND_TYPE', 'Background type'); + + define('_XCAPTCHA_BACKGROUND_BAR', 'Bars'); + define('_XCAPTCHA_BACKGROUND_CIRCLE', 'Circles'); + define('_XCAPTCHA_BACKGROUND_LINE', 'Lines'); + define('_XCAPTCHA_BACKGROUND_RECTANGLE', 'Rectangles'); + define('_XCAPTCHA_BACKGROUND_ELLIPSE', 'Ellipses'); + define('_XCAPTCHA_BACKGROUND_POLYGONE', 'Polygons'); + define('_XCAPTCHA_BACKGROUND_IMAGE', 'Image'); + + define('_XCAPTCHA_BACKGROUND_NUM', 'Number of \"drawing\"'); + define('_XCAPTCHA_POLYGON_POINT', 'Number of points for the polygon'); + define('_XCAPTCHA_SKIP_CHARACTERS', 'Ignore characters'); + + define('_XCAPTCHA_IMAGE', true); +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/image.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/modinfo.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/modinfo.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,26 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +define('_MI_XCAPTCHA_NAME', 'Xcaptcha'); +define('_MI_XCAPTCHA_DESC', 'Xoops CAPTCHA configuration'); + +define('_MI_XCAPTCHA_INDEX', 'Index'); +define('_MI_XCAPTCHA_CONFIG', 'CAPTCHA configuration'); +define('_MI_XCAPTCHA_ABOUT', 'About this module'); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/modinfo.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/recaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/recaptcha.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/recaptcha.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,32 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +define('_MI_XCAPTCHA_ADMENU_RECAPTCHA', 'Recaptcha'); + +if ( !defined('_XCAPTCHA_RECAPTCHA') ) { + define('_XCAPTCHA_FORM_RECAPTCHA', 'Configuration CAPTCHA : Recaptcha'); + + define('_XCAPTCHA_PRIVATE_KEY', 'Private key'); + define('_XCAPTCHA_PUBLIC_KEY', 'Public key'); + define('_XCAPTCHA_THEME', 'Theme'); + define('_XCAPTCHA_LANG', 'Language'); + + define('_XCAPTCHA_RECAPTCHA', true); +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/recaptcha.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,27 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ +define('_MI_XCAPTCHA_ADMENU_TEXT', 'Text'); + +if ( !defined('_XCAPTCHA_TEXT') ) { + define('_XCAPTCHA_FORM_TEXT', 'Configuration CAPTCHA : Texte'); + define('_XCAPTCHA_NUM_CHARS', 'Number of characters'); + + define('_XCAPTCHA_TEXT', true); +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/english/text.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/language/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,119 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class XcaptchaImage extends Xcaptcha +{ + public $config = array(); + public $plugin; + + public function __construct() + { + $this->xcaptcha_handler = Xcaptcha::getInstance(); + $this->config = $this->xcaptcha_handler->loadConfig('image'); + $this->plugin = 'image'; + } + + public function XcaptchaImage() + { + $this->__construct(); + } + + public function getForm() + { + $captcha_form = new XoopsThemeForm('', 'xcaptchaform', 'index.php', 'post', true); + + $captcha_form->addElement(new XoopsFormText(_XCAPTCHA_NUM_CHARS, 'num_chars', 2, 2, $this->config['num_chars'] ), true); + + $captcha_form->addElement(new XoopsFormRadioYN(_XCAPTCHA_CASESENSITIVE, 'casesensitive', $this->config['casesensitive'], _YES, _NO)); + + $fontmin_form = new XoopsFormSelect(_XCAPTCHA_FONTSIZE_MIN, 'fontsize_min', $this->config['fontsize_min']); + for ($i = 10; $i <= 30; $i++) { + $fontmin_form->addOption($i, $i); + } + $captcha_form->addElement($fontmin_form, false); + + $fontmax_form = new XoopsFormSelect(_XCAPTCHA_FONTSIZE_MAX, 'fontsize_max', $this->config['fontsize_max']); + for ($i = 10; $i <= 30; $i++) { + $fontmax_form->addOption($i, $i); + } + $captcha_form->addElement($fontmax_form, false); + + $backtype_form = new XoopsFormSelect(_XCAPTCHA_BACKGROUND_TYPE, 'background_type', $this->config['background_type'], $size = 7); + $backtype_form->addOption(0, _XCAPTCHA_BACKGROUND_BAR); + $backtype_form->addOption(1, _XCAPTCHA_BACKGROUND_CIRCLE); + $backtype_form->addOption(2, _XCAPTCHA_BACKGROUND_LINE); + $backtype_form->addOption(3, _XCAPTCHA_BACKGROUND_RECTANGLE); + $backtype_form->addOption(4, _XCAPTCHA_BACKGROUND_ELLIPSE); + $backtype_form->addOption(5, _XCAPTCHA_BACKGROUND_POLYGONE); + $backtype_form->addOption(100, _XCAPTCHA_BACKGROUND_IMAGE); + $captcha_form->addElement($backtype_form, false); + + $backnum_form = new XoopsFormSelect(_XCAPTCHA_BACKGROUND_NUM, 'background_num', $this->config['background_num']); + for ($i = 10; $i <= 100; $i = $i+10) { + $backnum_form->addOption($i, $i); + } + $captcha_form->addElement($backnum_form, false); + + $polygon_point = new XoopsFormSelect(_XCAPTCHA_POLYGON_POINT, 'polygon_point', $this->config['polygon_point']); + for ($i = 3; $i <= 20; $i++) { + $polygon_point->addOption($i, $i); + } + $captcha_form->addElement($polygon_point, false); + + $value = implode('|', $this->config['skip_characters']); + $captcha_form->addElement(new XoopsFormTextarea(_XCAPTCHA_SKIP_CHARACTERS, 'skip_characters', $value, 5, 50 ), true); + + $captcha_form->addElement(new XoopsFormHidden('type', 'image' )); + + $button_tray = new XoopsFormElementTray('', ''); + $button_tray->addElement(new XoopsFormHidden('op', 'save')); + $button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); + $captcha_form->addElement($button_tray); + + ob_start(); + $captcha_form->render(); + $ret = ob_get_contents(); + ob_end_clean(); + + return $ret; + } + + public function VerifyData() + { + global $system; + $config = array(); + $_POST['num_chars'] = $system->CleanVars($_POST, 'num_chars', 6, 'int'); + $_POST['casesensitive'] = $system->CleanVars($_POST, 'casesensitive', false, 'boolean'); + $_POST['fontsize_min'] = $system->CleanVars($_POST, 'fontsize_min', 10, 'int'); + $_POST['fontsize_max'] = $system->CleanVars($_POST, 'fontsize_max', 24, 'int'); + $_POST['background_type'] = $system->CleanVars($_POST, 'background_type', 0, 'int'); + $_POST['background_num'] = $system->CleanVars($_POST, 'background_num', 50, 'int'); + $_POST['polygon_point'] = $system->CleanVars($_POST, 'polygon_point', 3, 'int'); + $_POST['skip_characters'] = $system->CleanVars($_POST, 'skip_characters', 'o|0|i|l|1', 'string'); + $_POST['skip_characters'] = explode('|', $_POST['skip_characters']); + foreach ( array_keys($this->config) as $key) { + $config[$key] = $_POST[$key]; + } + return $config; + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/index.html 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/index.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,112 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class XcaptchaRecaptcha extends Xcaptcha +{ + public $config = array(); + public $plugin; + + function __construct() + { + $this->xcaptcha_handler = Xcaptcha::getInstance(); + $this->config = $this->xcaptcha_handler->loadConfig('recaptcha'); + $this->plugin = 'recaptcha'; + } + + function XcaptchaRecaptcha() + { + $this->__construct(); + } + + function getForm() + { + $captcha_form = new XoopsThemeForm('', 'xcaptchaform', 'index.php', 'post', true); + + $captcha_form->addElement(new XoopsFormTextarea(_XCAPTCHA_PRIVATE_KEY, 'private_key', $this->config['private_key'], 5, 50 ), true); + $captcha_form->addElement(new XoopsFormTextarea(_XCAPTCHA_PUBLIC_KEY, 'public_key', $this->config['public_key'], 5, 50 ), true); + + $theme_form = new XoopsFormSelect(_XCAPTCHA_THEME, 'theme', $this->config['theme'], $size = 4); + $theme_form->addOptionArray($this->getThemes() ); + $captcha_form->addElement($theme_form, false); + + $lang_form = new XoopsFormSelect(_XCAPTCHA_LANG, 'lang', $this->config['lang'], $size = 4); + $lang_form->addOptionArray($this->getLanguages() ); + $captcha_form->addElement($lang_form, false); + + $captcha_form->addElement(new XoopsFormHidden('type', 'recaptcha' )); + + $button_tray = new XoopsFormElementTray('', ''); + $button_tray->addElement(new XoopsFormHidden('op', 'save')); + $button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); + $captcha_form->addElement($button_tray); + + ob_start(); + $captcha_form->render(); + $ret = ob_get_contents(); + ob_end_clean(); + + return $ret; + } + + function VerifyData() + { + global $xoopsConfig; + $default_lang = array_search(ucfirst($xoopsConfig['language']), $this->getLanguages() ); + $default_lang = (!$default_lang) ? 'en' : $default_lang; + + global $system; + $config = array(); + $_POST['private_key'] = $system->CleanVars($_POST, 'private_key', 'Your private key', 'string'); + $_POST['public_key'] = $system->CleanVars($_POST, 'public_key', 'Your public key', 'string'); + $_POST['theme'] = $system->CleanVars($_POST, 'theme', 'red', 'string'); + $_POST['lang'] = $system->CleanVars($_POST, 'lang', $default_lang, 'string'); + foreach ( array_keys($this->config) as $key) { + $config[$key] = $_POST[$key]; + } + return $config; + } + + function getThemes() + { + return array( + 'red' => 'RED (default theme)', + 'white' => 'WHITE', + 'blackglass' => 'BLACKGLASS', + 'clean' => 'CLEAN', + ); + } + + function getLanguages() + { + return array( + 'en' => 'English', + 'nl' => 'Dutch', + 'fr' => 'French', + 'de' => 'German', + 'pt' => 'Portuguese', + 'ru' => 'Russian', + 'es' => 'Spanish', + 'tr' => 'Turkish', + ); + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,72 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package xcaptcha + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class XcaptchaText extends Xcaptcha +{ + public $config = array(); + public $plugin; + + function __construct() + { + $this->xcaptcha_handler = Xcaptcha::getInstance(); + $this->config = $this->xcaptcha_handler->loadConfig('text'); + $this->plugin = 'text'; + } + + function XcaptchaText() + { + $this->__construct(); + } + + function getForm() + { + $captcha_form = new XoopsThemeForm('', 'xcaptchaform', 'index.php', 'post', true); + + $captcha_form->addElement(new XoopsFormText(_XCAPTCHA_NUM_CHARS, 'num_chars', 2, 2, $this->config['num_chars'] ), true); + + $captcha_form->addElement(new XoopsFormHidden('type', 'text' )); + + $button_tray = new XoopsFormElementTray('', ''); + $button_tray->addElement(new XoopsFormHidden('op', 'save')); + $button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); + $captcha_form->addElement($button_tray); + + ob_start(); + $captcha_form->render(); + $ret = ob_get_contents(); + ob_end_clean(); + + return $ret; + } + + function VerifyData() + { + global $system; + $config = array(); + $_POST['num_chars'] = $system->cleanVars($_POST, 'num_chars', 6, 'int'); + foreach ( array_keys($this->config) as $key) { + $config[$key] = $_POST[$key]; + } + return $config; + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Revision Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php 2012-10-15 23:26:13 UTC (rev 10223) @@ -0,0 +1,67 @@ +<?php +/** + * Xcaptcha extension module + * + * You may not change or alter any porti... [truncated message content] |