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


PHP RSFormProHelper::generateString方法代码示例

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


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

示例1: RSgenerateString

function RSgenerateString($length, $characters, $type = 'Random')
{
    return RSFormProHelper::generateString($length, $characters, $type);
}
开发者ID:jtresca,项目名称:nysurveyor,代码行数:4,代码来源:legacy.php

示例2: getFrontComponentBody


//.........这里部分代码省略.........
                     $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '"  id="' . $data['NAME'] . 'Prev" ' . $data['ADDITIONALATTRIBUTES3'] . ' />';
                 }
             }
             if ($button_type == 'button') {
                 $out .= '<button type="submit" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES'] . '>' . RSFormProHelper::htmlEscape($data['LABEL']) . '</button>';
             } else {
                 $out .= '<input type="submit" value="' . RSFormProHelper::htmlEscape($data['LABEL']) . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             }
             if ($data['RESET'] == 'YES') {
                 $className = 'btn rsform-reset-button';
                 RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES2'], $className);
                 if ($button_type == 'button') {
                     $out .= '&nbsp;&nbsp;<button type="reset" name="form[' . $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'] . ']" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
                 }
             }
             break;
         case 14:
         case 'password':
             $defaultValue = '';
             if (isset($data['VALIDATIONRULE']) && $data['VALIDATIONRULE'] != 'password') {
                 $defaultValue = $data['DEFAULTVALUE'];
             }
             $className = 'rsform-password-box';
             if ($invalid) {
                 $className .= ' rsform-error';
             }
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $out .= '<input type="password" value="' . RSFormProHelper::htmlEscape($defaultValue) . '" size="' . (int) $data['SIZE'] . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . ((int) $data['MAXSIZE'] > 0 ? 'maxlength="' . (int) $data['MAXSIZE'] . '"' : '') . ' ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 15:
         case 'ticket':
             $out .= '<input type="hidden" name="form[' . $data['NAME'] . ']" value="' . RSFormProHelper::generateString($data['LENGTH'], $data['CHARACTERS']) . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 41:
         case 'pageBreak':
             $validate = 'false';
             if (isset($data['VALIDATENEXTPAGE']) && $data['VALIDATENEXTPAGE'] == 'YES') {
                 $validate = 'true';
             }
             $className = 'btn rsform-button';
             if ($invalid) {
                 $className .= ' rsform-error';
             }
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $data['ADDITIONALATTRIBUTES2'] = $data['ADDITIONALATTRIBUTES'];
             $num = count($data['PAGES']);
             $pos = array_search($componentId, $data['PAGES']);
             if ($pos) {
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pos - 1) . ', ' . $num . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES'], $onclick);
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '" ' . $data['ADDITIONALATTRIBUTES'] . ' id="' . $data['NAME'] . 'Prev" />';
             }
             if ($pos < count($data['PAGES'])) {
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pos + 1) . ', ' . $num . ', ' . $validate . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES2'], $onclick);
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['NEXTBUTTON']) . '" ' . $data['ADDITIONALATTRIBUTES2'] . ' id="' . $data['NAME'] . 'Next" />';
             }
             break;
         case 32:
         case 'rseprotickets':
             $html = '';
             if (JRequest::getCmd('option') == 'com_rseventspro') {
                 $cid = JRequest::getInt('cid');
                 $db->setQuery("SELECT COUNT(id) FROM #__rseventspro_tickets WHERE ide = " . $cid . "");
开发者ID:renekreijveld,项目名称:rsformpro-bootstrapped,代码行数:67,代码来源:rsform.php

示例3: getFrontComponentBody


//.........这里部分代码省略.........
             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;
         case 12:
         case 'imageButton':
             $data['ADDITIONALATTRIBUTES2'] = $data['ADDITIONALATTRIBUTES'];
             $className = 'rsform-image-button';
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $data['ADDITIONALATTRIBUTES3'] = $data['ADDITIONALATTRIBUTES'];
             $pages = RSFormProHelper::componentExists($formId, 41);
             $pages = count($pages);
             if (!empty($pages)) {
                 if (empty($data['PREVBUTTON'])) {
                     $data['PREVBUTTON'] = JText::_('PREV');
                 }
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pages - 1) . ', ' . $pages . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES3'], $onclick);
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '"  id="' . $data['NAME'] . 'Prev" ' . $data['ADDITIONALATTRIBUTES3'] . ' />';
             }
             $out .= '<input type="image" src="' . RSFormProHelper::htmlEscape($data['IMAGEBUTTON']) . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
             if ($data['RESET'] == 'YES') {
                 $className = 'rsform-reset-button';
                 RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES2'], $className);
                 $out .= '<input type="reset" name="" id="reset_' . $data['NAME'] . '" style="display: none !important" />&nbsp;&nbsp;<input onclick="document.getElementById(\'reset_' . $data['NAME'] . '\').click();return false;" type="image" src="' . RSFormProHelper::htmlEscape($data['IMAGERESET']) . '" name="form[' . $data['NAME'] . ']" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
             }
             break;
         case 13:
         case 'submitButton':
             $data['ADDITIONALATTRIBUTES2'] = $data['ADDITIONALATTRIBUTES'];
             $className = 'rsform-submit-button';
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $data['ADDITIONALATTRIBUTES3'] = $data['ADDITIONALATTRIBUTES'];
             $last_submit = $componentId == end($data['SUBMITS']);
             $pages = RSFormProHelper::componentExists($formId, 41);
             $pages = count($pages);
             if (!empty($pages) && $last_submit) {
                 if (empty($data['PREVBUTTON'])) {
                     $data['PREVBUTTON'] = JText::_('PREV');
                 }
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pages - 1) . ', ' . $pages . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES3'], $onclick);
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '"  id="' . $data['NAME'] . 'Prev" ' . $data['ADDITIONALATTRIBUTES3'] . ' />';
             }
             $out .= '<input type="submit" 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'] . ']" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
             }
             break;
         case 14:
         case 'password':
             $defaultValue = '';
             if ($data['VALIDATIONRULE'] != 'password') {
                 $defaultValue = $data['DEFAULTVALUE'];
             }
             $className = 'rsform-password-box';
             if ($invalid) {
                 $className .= ' rsform-error';
             }
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $out .= '<input type="password" value="' . RSFormProHelper::htmlEscape($defaultValue) . '" size="' . (int) $data['SIZE'] . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . ((int) $data['MAXSIZE'] > 0 ? 'maxlength="' . (int) $data['MAXSIZE'] . '"' : '') . ' ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 15:
         case 'ticket':
             $out .= '<input type="hidden" name="form[' . $data['NAME'] . ']" value="' . RSFormProHelper::generateString($data['LENGTH'], $data['CHARACTERS']) . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 41:
         case 'pageBreak':
             $validate = 'false';
             if (isset($data['VALIDATENEXTPAGE']) && $data['VALIDATENEXTPAGE'] == 'YES') {
                 $validate = 'true';
             }
             $className = 'rsform-button';
             if ($invalid) {
                 $className .= ' rsform-error';
             }
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $data['ADDITIONALATTRIBUTES2'] = $data['ADDITIONALATTRIBUTES'];
             $num = count($data['PAGES']);
             $pos = array_search($componentId, $data['PAGES']);
             if ($pos) {
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pos - 1) . ', ' . $num . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES'], $onclick);
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '" ' . $data['ADDITIONALATTRIBUTES'] . ' id="' . $data['NAME'] . 'Prev" />';
             }
             if ($pos < count($data['PAGES'])) {
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pos + 1) . ', ' . $num . ', ' . $validate . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES2'], $onclick);
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['NEXTBUTTON']) . '" ' . $data['ADDITIONALATTRIBUTES2'] . ' id="' . $data['NAME'] . 'Next" />';
             }
             break;
     }
     //Trigger Event - rsfp_bk_onAfterCreateFrontComponentBody
     $mainframe->triggerEvent('rsfp_bk_onAfterCreateFrontComponentBody', array(array('out' => &$out, 'formId' => $formId, 'componentId' => $componentId, 'data' => $data, 'value' => $value, 'r' => $r, 'invalid' => $invalid)));
     return $out;
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:101,代码来源:rsform.php


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