本文整理汇总了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 .= ' <button type="reset" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES2'] . '>' . RSFormProHelper::htmlEscape($data['RESETLABEL']) . '</button>';
} else {
$out .= ' <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&task=captcha&componentId=' . $componentId . '&tmpl=component&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 .= ' <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;
示例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 .= ' <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&task=captcha&componentId=' . $componentId . '&tmpl=component&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 .= ' <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;