当前位置: 首页>>代码示例>>PHP>>正文


PHP RSFormProHelper::getInvisibleCaptchaWords方法代码示例

本文整理汇总了PHP中RSFormProHelper::getInvisibleCaptchaWords方法的典型用法代码示例。如果您正苦于以下问题:PHP RSFormProHelper::getInvisibleCaptchaWords方法的具体用法?PHP RSFormProHelper::getInvisibleCaptchaWords怎么用?PHP RSFormProHelper::getInvisibleCaptchaWords使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RSFormProHelper的用法示例。


在下文中一共展示了RSFormProHelper::getInvisibleCaptchaWords方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFrontComponentBody


//.........这里部分代码省略.........
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['LABEL']) . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             }
             if ($data['RESET'] == 'YES') {
                 $className = 'rsform-reset-button';
                 RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES2'], $className);
                 if ($button_type == 'button') {
                     $out .= '&nbsp;&nbsp;<button type="reset" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES2'] . '>' . RSFormProHelper::htmlEscape($data['RESETLABEL']) . '</button>';
                 } else {
                     $out .= '&nbsp;&nbsp;<input type="reset" value="' . RSFormProHelper::htmlEscape($data['RESETLABEL']) . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
                 }
             }
             break;
         case 8:
         case 'captcha':
             switch (@$data['IMAGETYPE']) {
                 default:
                 case 'FREETYPE':
                 case 'NOFREETYPE':
                     $className = 'rsform-captcha-box';
                     if ($invalid) {
                         $className .= ' rsform-error';
                     }
                     RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
                     $out .= '<img src="' . JRoute::_('index.php?option=com_rsform&amp;task=captcha&amp;componentId=' . $componentId . '&amp;tmpl=component&amp;sid=' . mt_rand()) . '" id="captcha' . $componentId . '" alt="' . RSFormProHelper::htmlEscape($data['CAPTION']) . ' "/>';
                     //if ($data['FLOW'] == 'VERTICAL')
                     //$out .= '<br />';
                     $out .= '<input type="text" name="form[' . $data['NAME'] . ']" value="" id="captchaTxt' . $componentId . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
                     if ($data['SHOWREFRESH'] == 'YES') {
                         $out .= '&nbsp;&nbsp;<a href="javascript:void(0)" onclick="refreshCaptcha(' . $componentId . ',\'' . JRoute::_('index.php?option=com_rsform&task=captcha&componentId=' . $componentId . '&tmpl=component') . '\'); return false;">' . $data['REFRESHTEXT'] . '</a>';
                     }
                     break;
                 case 'INVISIBLE':
                     // a list of words that spam bots might auto-complete
                     $words = RSFormProHelper::getInvisibleCaptchaWords();
                     $word = $words[array_rand($words, 1)];
                     // a list of styles so that the field is hidden
                     $styles = array('display: none !important', 'position: absolute !important; left: -4000px !important; top: -4000px !important;', 'position: absolute !important; left: -4000px !important; top: -4000px !important; display: none !important', 'position: absolute !important; display: none !important', 'display: none !important; position: absolute !important; left: -4000px !important; top: -4000px !important;');
                     $style = $styles[array_rand($styles, 1)];
                     // now we're going to shuffle the properties of the html tag
                     $properties = array('type="text"', 'name="' . $word . '"', 'value=""', 'style="' . $style . '"');
                     shuffle($properties);
                     $session = JFactory::getSession();
                     $session->set('com_rsform.captcha.' . $componentId, $word);
                     $out .= '<input ' . implode(' ', $properties) . ' />';
                     break;
             }
             break;
         case 9:
         case 'fileUpload':
             $className = 'rsform-upload-box';
             if ($invalid) {
                 $className .= ' rsform-error';
             }
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . (int) $data['FILESIZE'] . '000" />';
             $out .= '<input type="file" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 10:
         case 'freeText':
             $out .= $data['TEXT'];
             break;
         case 11:
         case 'hidden':
             $defaultValue = RSFormProHelper::isCode($data['DEFAULTVALUE']);
             $out .= '<input type="hidden" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" value="' . RSFormProHelper::htmlEscape($defaultValue) . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
开发者ID:renekreijveld,项目名称:rsformpro-bootstrapped,代码行数:67,代码来源:rsform.php

示例2: getFrontComponentBody


//.........这里部分代码省略.........
             if ($invalid) {
                 $className .= ' rsform-error';
             }
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['LABEL']) . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             if ($data['RESET'] == 'YES') {
                 $className = 'rsform-reset-button';
                 RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES2'], $className);
                 $out .= '&nbsp;&nbsp;<input type="reset" value="' . RSFormProHelper::htmlEscape($data['RESETLABEL']) . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
             }
             break;
         case 8:
         case 'captcha':
             switch (@$data['IMAGETYPE']) {
                 default:
                 case 'FREETYPE':
                 case 'NOFREETYPE':
                     $className = 'rsform-captcha-box';
                     if ($invalid) {
                         $className .= ' rsform-error';
                     }
                     RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
                     $out .= '<img src="' . JRoute::_('index.php?option=com_rsform&amp;task=captcha&amp;componentId=' . $componentId . '&amp;tmpl=component&amp;sid=' . mt_rand()) . '" id="captcha' . $componentId . '" alt="' . RSFormProHelper::htmlEscape($data['CAPTION']) . ' "/>';
                     if ($data['FLOW'] == 'VERTICAL') {
                         $out .= '<br />';
                     }
                     $out .= '<input type="text" name="form[' . $data['NAME'] . ']" value="" id="captchaTxt' . $componentId . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
                     if ($data['SHOWREFRESH'] == 'YES') {
                         $out .= '&nbsp;&nbsp;<a href="javascript:void(0)" onclick="refreshCaptcha(' . $componentId . ',\'' . JRoute::_('index.php?option=com_rsform&task=captcha&componentId=' . $componentId . '&tmpl=component') . '\'); return false;">' . $data['REFRESHTEXT'] . '</a>';
                     }
                     break;
                 case 'INVISIBLE':
                     // a list of words that spam bots might auto-complete
                     $words = RSFormProHelper::getInvisibleCaptchaWords();
                     $word = $words[array_rand($words, 1)];
                     // a list of styles so that the field is hidden
                     $styles = array('display: none !important', 'position: absolute !important; left: -4000px !important; top: -4000px !important;', 'position: absolute !important; left: -4000px !important; top: -4000px !important; display: none !important', 'position: absolute !important; display: none !important', 'display: none !important; position: absolute !important; left: -4000px !important; top: -4000px !important;');
                     $style = $styles[array_rand($styles, 1)];
                     // now we're going to shuffle the properties of the html tag
                     $properties = array('type="text"', 'name="' . $word . '"', 'value=""', 'style="' . $style . '"');
                     shuffle($properties);
                     $session =& JFactory::getSession();
                     $session->set('com_rsform.captcha.' . $componentId, $word);
                     $out .= '<input ' . implode(' ', $properties) . ' />';
                     break;
             }
             break;
         case 9:
         case 'fileUpload':
             $className = 'rsform-upload-box';
             if ($invalid) {
                 $className .= ' rsform-error';
             }
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . (int) $data['FILESIZE'] . '000" />';
             $out .= '<input type="file" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 10:
         case 'freeText':
             $out .= $data['TEXT'];
             break;
         case 11:
         case 'hidden':
             $defaultValue = RSFormProHelper::isCode($data['DEFAULTVALUE']);
             $out .= '<input type="hidden" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" value="' . RSFormProHelper::htmlEscape($defaultValue) . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:67,代码来源:rsform.php


注:本文中的RSFormProHelper::getInvisibleCaptchaWords方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。