From: <du...@us...> - 2012-11-18 22:32:52
|
Revision: 10256 http://sourceforge.net/p/xoops/svn/10256 Author: dugris Date: 2012-11-18 22:32:49 +0000 (Sun, 18 Nov 2012) Log Message: ----------- Fiw form Modified Paths: -------------- 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/class/xcaptcha.php 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/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 Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/captcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/recaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/text.php Modified: 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 2012-11-18 22:30:39 UTC (rev 10255) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/admin/index.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -48,12 +48,14 @@ if ( $type == 'config' ) { $admin_page->renderNavigation('index.php?type=config'); $admin_page->addInfoBox(_AM_XCAPTCHA_FORM); - $admin_page->addInfoBoxLine($xcaptcha_handler->getForm()); + $form = $xoops->getModuleForm($xcaptcha_handler, 'captcha', 'xcaptcha'); + $admin_page->addInfoBoxLine( $form->render() ); } else { - if ($xcaptcha_handler->loadPluginHandler( $type )) { + if ( $plugin = $xcaptcha_handler->loadPluginHandler( $type )) { $title = constant('_XCAPTCHA_FORM_' . strtoupper($type) ); + $form = $xoops->getModuleForm($plugin, $type, 'xcaptcha'); $admin_page->addInfoBox( $title ); - $admin_page->addInfoBoxLine($xcaptcha_handler->Pluginhandler->getForm()); + $admin_page->addInfoBoxLine( $form->render() ); } else { $xoops->redirect('index.php', 5, _AM_XCAPTCHA_ERROR); } Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form ___________________________________________________________________ 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/form/captcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/captcha.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/captcha.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -0,0 +1,84 @@ +<?php +/** + * Xcaptcha 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 XcaptchaCaptchaForm extends XoopsThemeForm +{ + /** + * @param null $obj + */ + public function __construct($object = null) + { + $this->object = $object; + $this->config = $object->config; + } + + /** + * Maintenance Form + * @return void + */ + public function CaptchaForm() + { + $xoops = Xoops::getInstance(); + + parent::__construct('', 'xcaptchaform', $xoops->getEnv('PHP_SELF'), 'post', true, 'horizontal'); + + $activate = new XoopsFormRadio(_AM_XCAPTCHA_ACTIVATE, 'disabled', $this->config['disabled'] ); + $activate->addOption(1, _AM_XCAPTCHA_ENABLE); + $activate->addOption(0, _AM_XCAPTCHA_DISABLE); + $this->addElement($activate, false); + + $plugin_List = new XoopsFormSelect(_AM_XCAPTCHA_PLUGINS, 'mode', $this->config['mode'] ); + $plugin_List->addOptionArray( $this->object->plugin_List ); + $this->addElement($plugin_List, false); + + $this->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); + $this->addElement($skipmember, false); + + $this->addElement(new XoopsFormText(_AM_XCAPTCHA_MAXATTEMPTS, 'maxattempts', 2, 2, $this->config['maxattempts'] ), true); + + $this->addElement(new XoopsFormHidden('type', 'config' )); + + $button_tray = new XoopsFormElementTray('', ''); + $button_tray->addElement(new XoopsFormHidden('op', 'save')); + $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); + $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); + $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); + $button_tray->addElement($cancel_send); + + $this->addElement($button_tray); + } + + public function render() + { + $this->CaptchaForm(); + ob_start(); + parent::render(); + $ret = ob_get_contents(); + ob_end_clean(); + return $ret; + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/captcha.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/image.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/image.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -0,0 +1,107 @@ +<?php +/** + * Xcaptcha 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 XcaptchaImageForm extends XoopsThemeForm +{ + /** + * @param null $obj + */ + public function __construct($object = null) + { + $this->object = $object; + $this->config = $object->config; + } + + /** + * Maintenance Form + * @return void + */ + public function ImageForm() + { + $xoops = Xoops::getInstance(); + + parent::__construct('', 'xcaptchaform', $xoops->getEnv('PHP_SELF'), 'post', true, 'horizontal'); + + $this->addElement(new XoopsFormText(_XCAPTCHA_NUM_CHARS, 'num_chars', 2, 2, $this->config['num_chars'] ), true); + + $this->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); + } + $this->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); + } + $this->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); + $this->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); + } + $this->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); + } + $this->addElement($polygon_point, false); + + $value = implode('|', $this->config['skip_characters']); + $this->addElement(new XoopsFormTextarea(_XCAPTCHA_SKIP_CHARACTERS, 'skip_characters', $value, 5, 50 ), true); + + $this->addElement(new XoopsFormHidden('type', 'image' )); + + $button_tray = new XoopsFormElementTray('', ''); + $button_tray->addElement(new XoopsFormHidden('op', 'save')); + $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); + $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); + $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); + $button_tray->addElement($cancel_send); + + $this->addElement($button_tray); + } + + public function render() + { + $this->ImageForm(); + ob_start(); + parent::render(); + $ret = ob_get_contents(); + ob_end_clean(); + return $ret; + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/image.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/index.html 2012-11-18 22:32:49 UTC (rev 10256) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/recaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/recaptcha.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/recaptcha.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -0,0 +1,77 @@ +<?php +/** + * Xcaptcha 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 XcaptchaRecaptchaForm extends XoopsThemeForm +{ + /** + * @param null $obj + */ + public function __construct($object = null) + { + $this->object = $object; + $this->config = $object->config; + } + + /** + * Maintenance Form + * @return void + */ + public function RecaptchaForm() + { + $xoops = Xoops::getInstance(); + + parent::__construct('', 'xcaptchaform', $xoops->getEnv('PHP_SELF'), 'post', true, 'horizontal'); + + $this->addElement(new XoopsFormTextarea(_XCAPTCHA_PRIVATE_KEY, 'private_key', $this->config['private_key'], 5, 50 ), true); + $this->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->object->getThemes() ); + $this->addElement($theme_form, false); + + $lang_form = new XoopsFormSelect(_XCAPTCHA_LANG, 'lang', $this->config['lang'], $size = 4); + $lang_form->addOptionArray($this->object->getLanguages() ); + $this->addElement($lang_form, false); + + $this->addElement(new XoopsFormHidden('type', 'recaptcha' )); + + $button_tray = new XoopsFormElementTray('', ''); + $button_tray->addElement(new XoopsFormHidden('op', 'save')); + $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); + $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); + $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); + $button_tray->addElement($cancel_send); + + $this->addElement($button_tray); + } + + public function render() + { + $this->RecaptchaForm(); + ob_start(); + parent::render(); + $ret = ob_get_contents(); + ob_end_clean(); + return $ret; + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/recaptcha.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/text.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/text.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/text.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -0,0 +1,68 @@ +<?php +/** + * Xcaptcha 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 XcaptchaTextForm extends XoopsThemeForm +{ + /** + * @param null $obj + */ + public function __construct($object = null) + { + $this->object = $object; + $this->config = $object->config; + } + + /** + * Maintenance Form + * @return void + */ + public function TextForm() + { + $xoops = Xoops::getInstance(); + + parent::__construct('', 'xcaptchaform', $xoops->getEnv('PHP_SELF'), 'post', true, 'horizontal'); + + $this->addElement(new XoopsFormText(_XCAPTCHA_NUM_CHARS, 'num_chars', 2, 2, $this->config['num_chars'] ), true); + + $this->addElement(new XoopsFormHidden('type', 'text' )); + + $button_tray = new XoopsFormElementTray('', ''); + $button_tray->addElement(new XoopsFormHidden('op', 'save')); + $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); + $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); + $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); + $button_tray->addElement($cancel_send); + + $this->addElement($button_tray); + } + + public function render() + { + $this->TextForm(); + ob_start(); + parent::render(); + $ret = ob_get_contents(); + ob_end_clean(); + return $ret; + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/form/text.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Modified: 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 2012-11-18 22:30:39 UTC (rev 10255) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/class/xcaptcha.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -92,45 +92,6 @@ 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, 'submit')); - $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); - $captcha_form->addElement($button_tray); - - ob_start(); - $captcha_form->render(); - $ret = ob_get_contents(); - ob_end_clean(); - - return $ret; - } - public function VerifyData() { global $system; Modified: 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 2012-11-18 22:30:39 UTC (rev 10255) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/image.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -36,70 +36,6 @@ $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, 'submit')); - $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); - $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); - $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); - $button_tray->addElement($cancel_send); - $captcha_form->addElement($button_tray); - - ob_start(); - $captcha_form->render(); - $ret = ob_get_contents(); - ob_end_clean(); - - return $ret; - } - public function VerifyData() { global $system; Modified: 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 2012-11-18 22:30:39 UTC (rev 10255) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/recaptcha.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -36,40 +36,6 @@ $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, 'submit')); - $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); - $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); - $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); - $button_tray->addElement($cancel_send); - $captcha_form->addElement($button_tray); - - ob_start(); - $captcha_form->render(); - $ret = ob_get_contents(); - ob_end_clean(); - - return $ret; - } - function VerifyData() { global $xoopsConfig; Modified: 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 2012-11-18 22:30:39 UTC (rev 10255) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/plugins/text.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -36,31 +36,6 @@ $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, 'submit')); - $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); - $cancel_send = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); - $cancel_send->setExtra("onclick='javascript:history.go(-1);'"); - $button_tray->addElement($cancel_send); - $captcha_form->addElement($button_tray); - - ob_start(); - $captcha_form->render(); - $ret = ob_get_contents(); - ob_end_clean(); - - return $ret; - } - function VerifyData() { global $system; Modified: 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 2012-11-18 22:30:39 UTC (rev 10255) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xcaptcha/xoops_version.php 2012-11-18 22:32:49 UTC (rev 10256) @@ -30,6 +30,7 @@ $modversion['image'] = 'images/xcaptcha_logo.png'; $modversion['dirname'] = 'xcaptcha'; + //about $modversion['release_date'] = '2012/10/01'; $modversion['module_website_url'] = 'dugris.xoofoo.org'; |