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


PHP RSFormProHelper类代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     JToolBarHelper::title('RSForm! Pro', 'rsform');
     if (RSFormProHelper::isJ16()) {
         $lang =& JFactory::getLanguage();
         $lang->load('com_rsform.sys', JPATH_ADMINISTRATOR);
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_MANAGE_FORMS'), 'index.php?option=com_rsform&task=forms.manage');
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_MANAGE_SUBMISSIONS'), 'index.php?option=com_rsform&task=submissions.manage');
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_CONFIGURATION'), 'index.php?option=com_rsform&task=configuration.edit', true);
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_BACKUP_RESTORE'), 'index.php?option=com_rsform&task=backup.restore');
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_UPDATES'), 'index.php?option=com_rsform&task=updates.manage');
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_PLUGINS'), 'index.php?option=com_rsform&task=goto.plugins');
     }
     JToolBarHelper::apply('configuration.apply');
     JToolBarHelper::save('configuration.save');
     JToolBarHelper::cancel('');
     $params = array('startOffset' => JRequest::getInt('tabposition', 0));
     $tabs =& JPane::getInstance('Tabs', $params, true);
     $this->assignRef('tabs', $tabs);
     $this->assign('code', RSFormProHelper::getConfig('global.register.code'));
     $lists['global.iis'] = JHTML::_('select.booleanlist', 'rsformConfig[global.iis]', 'class="inputbox"', RSFormProHelper::getConfig('global.iis'));
     $lists['global.editor'] = JHTML::_('select.booleanlist', 'rsformConfig[global.editor]', 'class="inputbox"', RSFormProHelper::getConfig('global.editor'));
     $lists['global.codemirror'] = JHTML::_('select.booleanlist', 'rsformConfig[global.codemirror]', 'class="inputbox"', RSFormProHelper::getConfig('global.codemirror'));
     $lists['auto_responsive'] = JHTML::_('select.booleanlist', 'rsformConfig[auto_responsive]', 'class="inputbox"', RSFormProHelper::getConfig('auto_responsive'));
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
开发者ID:jtresca,项目名称:nysurveyor,代码行数:27,代码来源:view.html.php

示例2: expression

 public static function expression($calculation, $formId)
 {
     $return = '';
     $pattern = '#{(.*?):value}#is';
     $expression = $calculation->expression;
     $filter = JFilterInput::getInstance();
     preg_match_all($pattern, $calculation->expression, $matches);
     if ($matches) {
         foreach ($matches[0] as $i => $match) {
             $field = $filter->clean($matches[1][$i] . "_" . $formId, 'cmd');
             $return .= "\t total" . $field . " = 0;\n";
             $return .= "\t values" . $field . " = rsfp_getValue(" . $formId . ", '" . $matches[1][$i] . "');\n";
             $return .= "\t if (typeof values" . $field . " == 'object') { \n";
             $return .= "\t\t for(i=0;i<values" . $field . ".length;i++) {\n";
             $return .= "\t\t\t thevalue = values" . $field . "[i]; \n";
             $return .= "\t\t\t if (isset(RSFormProPrices['" . $formId . "_" . $matches[1][$i] . "'])) { \n";
             $return .= "\t\t\t\t total" . $field . " += isset(RSFormProPrices['" . $formId . "_" . $matches[1][$i] . "'][thevalue]) ? parseFloat(RSFormProPrices['" . $formId . "_" . $matches[1][$i] . "'][thevalue]) : 0; \n";
             $return .= "\t\t\t }\n";
             $return .= "\t\t }\n";
             $return .= "\t } else { \n";
             $return .= "\t\t total" . $field . " += (values" . $field . ".indexOf(',') == -1 && values" . $field . ".indexOf('.') == -1) ? parseFloat(values" . $field . ") :  parseFloat(rsfp_toNumber(values" . $field . ",'" . self::escape(RSFormProHelper::getConfig('calculations.decimal')) . "','" . self::escape(RSFormProHelper::getConfig('calculations.thousands')) . "')); \n";
             $return .= "\t } \n";
             $return .= "\t total" . $field . " = !isNaN(total" . $field . ") ? total" . $field . " : 0; \n\n";
             $expression = str_replace($match, 'total' . $field, $expression);
         }
         $return .= "\n\t grandTotal" . $calculation->id . $formId . " = " . $expression . ";\n";
         $return .= "\t document.getElementById('" . $calculation->total . "').value = number_format(grandTotal" . $calculation->id . $formId . "," . (int) RSFormProHelper::getConfig('calculations.nodecimals') . ",'" . self::escape(RSFormProHelper::getConfig('calculations.decimal')) . "','" . self::escape(RSFormProHelper::getConfig('calculations.thousands')) . "'); \n\n";
     }
     return $return;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:30,代码来源:calculations.php

示例3: columns

 function columns()
 {
     $model = $this->getModel('mappings');
     $post = JRequest::get('post');
     $type = JRequest::getVar('type', 'set');
     $config = array('connection' => $post['connection'], 'host' => $post['host'], 'port' => $post['port'], 'username' => $post['username'], 'password' => $post['password'], 'database' => $post['database'], 'table' => $post['table']);
     echo RSFormProHelper::mappingsColumns($config, $type);
     exit;
 }
开发者ID:AlexanderKri,项目名称:joom-upd,代码行数:9,代码来源:mappings.php

示例4: addToolBar

 protected function addToolBar()
 {
     // set title
     JToolBarHelper::title('RSForm! Pro', 'rsform');
     $backupIcon = RSFormProHelper::isJ('3.0') ? 'download' : 'archive';
     $restoreIcon = RSFormProHelper::isJ('3.0') ? 'upload' : 'unarchive';
     JToolBarHelper::custom('backup.download', $backupIcon, $backupIcon, JText::_('RSFP_BACKUP_GENERATE'), false);
     JToolBarHelper::custom('restore.process', $restoreIcon, $restoreIcon, JText::_('RSFP_RESTORE'), false);
     require_once JPATH_COMPONENT . '/helpers/toolbar.php';
     RSFormProToolbarHelper::addToolbar('backuprestore');
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:11,代码来源:view.html.php

示例5: rsfp_getPayment

 function rsfp_getPayment(&$items, $formId)
 {
     if ($components = RSFormProHelper::componentExists($formId, $this->componentId)) {
         $data = RSFormProHelper::getComponentProperties($components[0]);
         $item = new stdClass();
         $item->value = $this->componentValue;
         $item->text = $data['LABEL'];
         // add to array
         $items[] = $item;
     }
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:11,代码来源:rsfpofflinepayment.php

示例6: display

 function display($tpl = null)
 {
     $this->addToolbar();
     $doc = JFactory::getDocument();
     $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_rsform/assets/css/dashboard.css');
     $this->isJ30 = RSFormProHelper::isJ('3.0');
     $this->buttons = $this->get('Buttons');
     $this->code = $this->get('code');
     $this->version = (string) new RSFormProVersion();
     $this->sidebar = $this->get('SideBar');
     parent::display($tpl);
 }
开发者ID:AlexanderKri,项目名称:joom-upd,代码行数:12,代码来源:view.html.php

示例7: save

 function save()
 {
     $model = $this->getModel('mappings');
     $row = $model->save();
     $html = '<script type="text/javascript">';
     if ($row === false) {
         $html .= RSFormProHelper::isJ16() ? 'window.parent.SqueezeBox.close();' : 'window.parent.document.getElementById(\'sbox-window\').close()';
     } else {
         $html .= 'window.parent.ShowMappings(' . $row->formId . ')' . "\n";
         $html .= RSFormProHelper::isJ16() ? 'window.parent.SqueezeBox.close();' : 'window.parent.document.getElementById(\'sbox-window\').close()';
     }
     $html .= '</script>';
     echo $html;
     die;
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:15,代码来源:mappings.php

示例8: preview

 function preview()
 {
     $formId = JRequest::getInt('formId');
     $opener = JRequest::getCmd('opener');
     $db = JFactory::getDBO();
     $db->setQuery("SELECT `" . $opener . "` FROM #__rsform_forms WHERE FormId='" . $formId . "'");
     $value = $db->loadResult();
     $model = $this->getModel('forms');
     $model->getForm();
     $lang = $model->getLang();
     $translations = RSFormProHelper::getTranslations('forms', $formId, $lang);
     if ($translations && isset($translations[$opener])) {
         $value = $translations[$opener];
     }
     echo $value;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:16,代码来源:richtext.php

示例9: display

 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     JToolBarHelper::title('RSForm! Pro', 'rsform');
     if (RSFormProHelper::isJ16()) {
         $lang = JFactory::getLanguage();
         $lang->load('com_rsform.sys', JPATH_ADMINISTRATOR);
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_MANAGE_FORMS'), 'index.php?option=com_rsform&task=forms.manage', true);
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_MANAGE_SUBMISSIONS'), 'index.php?option=com_rsform&task=submissions.manage');
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_CONFIGURATION'), 'index.php?option=com_rsform&task=configuration.edit');
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_BACKUP_RESTORE'), 'index.php?option=com_rsform&task=backup.restore');
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_UPDATES'), 'index.php?option=com_rsform&task=updates.manage');
         JSubMenuHelper::addEntry(JText::_('COM_RSFORM_PLUGINS'), 'index.php?option=com_rsform&task=goto.plugins');
     }
     $this->formId = JRequest::getInt('formId');
     $this->formTitle = $this->get('formtitle');
     $this->menus = $this->get('menus');
     $this->pagination = $this->get('pagination');
     parent::display($tpl);
 }
开发者ID:ForAEdesWeb,项目名称:AEW3,代码行数:20,代码来源:view.html.php

示例10: checkOrderData

 public static function checkOrderData($formData, $invalid = array(), $ccDataPrefix = 'cc_')
 {
     if ($formData == null) {
         $formData = $_POST['form'];
     }
     if (self::canAcquireCCData($formData)) {
         $prefix = $ccDataPrefix;
         foreach ($formData as $key => $value) {
             // for each field
             if (substr($key, 0, strlen($prefix)) === $prefix) {
                 // if it is a field we are searching for (prefixed)
                 if ($value == '') {
                     // if the value for the field is empty
                     $invalid[] = RSFormProHelper::getComponentId($key);
                     // add it to the invalid array
                 }
             }
         }
     }
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:20,代码来源:RSFormHelper.php

示例11: display

 function display($tpl = null)
 {
     $this->params = $this->get('Params');
     $this->formId = $this->get('FormId');
     $this->isJ16 = RSFormProHelper::isJ16();
     if ($this->isJ16) {
         $app =& JFactory::getApplication();
         $doc =& JFactory::getDocument();
         $title = $this->params->get('page_title', '');
         if (empty($title)) {
             $title = $app->getCfg('sitename');
         } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
             $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
         } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
             $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
         }
         $doc->setTitle($title);
     }
     parent::display($tpl);
 }
开发者ID:jtresca,项目名称:nysurveyor,代码行数:20,代码来源:view.html.php

示例12: save

 function save()
 {
     $config = JRequest::getVar('rsformConfig', array(0), 'post');
     $db = JFactory::getDBO();
     foreach ($config as $name => $value) {
         $db->setQuery("UPDATE #__rsform_config SET SettingValue = '" . $db->escape($value) . "' WHERE SettingName = '" . $db->escape($name) . "'");
         $db->execute();
     }
     RSFormProHelper::readConfig(true);
     $task = $this->getTask();
     switch ($task) {
         case 'apply':
             $tabposition = JRequest::getInt('tabposition', 0);
             $link = 'index.php?option=com_rsform&task=configuration.edit&tabposition=' . $tabposition;
             break;
         case 'save':
             $link = 'index.php?option=com_rsform';
             break;
     }
     $this->setRedirect($link, JText::_('RSFP_CONFIGURATION_SAVED'));
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:21,代码来源:configuration.php

示例13: display

 public function display($tpl = null)
 {
     // set title
     JToolBarHelper::title('RSForm! Pro', 'rsform');
     // adding the toolbar on 2.5
     if (!RSFormProHelper::isJ('3.0')) {
         $this->addToolbar();
     }
     $layout = strtolower($this->getLayout());
     if ($layout == 'edit') {
         JToolBarHelper::apply('directory.apply');
         JToolBarHelper::save('directory.save');
         JToolBarHelper::cancel('directory.cancel');
         $backIcon = RSFormProHelper::isJ('3.0') ? 'previous' : 'back';
         JToolBarHelper::custom('directory.cancelform', $backIcon, $backIcon, JText::_('RSFP_BACK_TO_FORM'), false);
         RSFormProHelper::loadCodeMirror();
         $this->directory = $this->get('Directory');
         $this->formId = JRequest::getInt('formId', 0);
         $this->tab = JRequest::getInt('tab', 0);
         $this->emails = $this->get('emails');
         $this->fields = RSFormProHelper::getDirectoryFields($this->formId);
         $this->quickfields = $this->get('QuickFields');
         $lists['ViewLayoutAutogenerate'] = RSFormProHelper::renderHTML('select.booleanlist', 'jform[ViewLayoutAutogenerate]', 'onclick="changeDirectoryAutoGenerateLayout(' . $this->formId . ', this.value);"', $this->directory->ViewLayoutAutogenerate);
         $lists['enablepdf'] = RSFormProHelper::renderHTML('select.booleanlist', 'jform[enablepdf]', '', $this->directory->enablepdf);
         $lists['enablecsv'] = RSFormProHelper::renderHTML('select.booleanlist', 'jform[enablecsv]', '', $this->directory->enablecsv);
         $this->lists = $lists;
     } elseif ($layout == 'edit_emails') {
         $this->emails = $this->get('emails');
     } else {
         $this->addToolbar();
         JToolBarHelper::title(JText::_('RSFP_SUBM_DIR'), 'rsform');
         JToolbarHelper::deleteList('', 'directory.remove');
         $this->sidebar = $this->get('Sidebar');
         $this->forms = $this->get('forms');
         $this->pagination = $this->get('pagination');
         $this->sortColumn = $this->get('sortColumn');
         $this->sortOrder = $this->get('sortOrder');
     }
     parent::display($tpl);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:40,代码来源:view.html.php

示例14: __construct

 function __construct()
 {
     parent::__construct();
     if (RSFormProHelper::isJ16()) {
         JHTML::_('behavior.framework');
     }
     $this->_db = JFactory::getDBO();
     $version = new RSFormProVersion();
     $v = $version->revision;
     $doc = JFactory::getDocument();
     $doc->addScript(JURI::root(true) . '/administrator/components/com_rsform/assets/js/jquery.js?v=' . $v);
     $doc->addScript(JURI::root(true) . '/administrator/components/com_rsform/assets/js/script.js?v=' . $v);
     $doc->addScript(JURI::root(true) . '/administrator/components/com_rsform/assets/js/tablednd.js?v=' . $v);
     $doc->addScript(JURI::root(true) . '/administrator/components/com_rsform/assets/js/jquery.scrollto.js?v=' . $v);
     $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_rsform/assets/css/style.css?v=' . $v);
     if (RSFormProHelper::isJ('2.5') && !RSFormProHelper::isJ('3.0')) {
         $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_rsform/assets/css/style25.css?v=' . $v);
     } elseif (RSFormProHelper::isJ('3.0')) {
         $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_rsform/assets/css/style30.css?v=' . $v);
     }
     $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_rsform/assets/css/rsdesign.css?v=' . $v);
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:22,代码来源:controller.php

示例15: RSFormProCaptcha

 function RSFormProCaptcha($componentId = 0)
 {
     $this->data = RSFormProHelper::getComponentProperties($componentId);
     if (!isset($this->data['IMAGETYPE'])) {
         $this->data['IMAGETYPE'] = 'FREETYPE';
     }
     if (!isset($this->data['LENGTH'])) {
         $this->data['LENGTH'] = 4;
     }
     if ($this->data['IMAGETYPE'] == 'INVISIBLE') {
         die;
     }
     if (!function_exists('imagecreate')) {
         header('Location:' . JURI::root() . 'components/com_rsform/assets/images/nogd.gif');
         die;
     }
     header('Content-type: image/png');
     $this->Length = $this->data['LENGTH'];
     $this->Size = is_numeric($this->data['SIZE']) && $this->data['SIZE'] > 0 ? $this->data['SIZE'] : 15;
     $this->fontpath = JPATH_SITE . DS . 'components' . DS . 'com_rsform' . DS . 'assets' . DS . 'fonts';
     $this->fonts = $this->getFonts();
     if ($this->data['IMAGETYPE'] == 'FREETYPE') {
         if (!count($this->fonts)) {
             $error = new RSFormProCaptchaError();
             $error->addError('No fonts available!');
             $error->displayError();
             die;
         }
         if (!function_exists('imagettftext')) {
             $error = new RSFormProCaptchaError();
             $error->addError('The function imagettftext does not exist.');
             $error->displayError();
             die;
         }
     }
     $this->stringGenerate();
     $this->makeCaptcha($componentId);
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:38,代码来源:captcha.php


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