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


PHP RSFormProHelper::getURL方法代码示例

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


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

示例1: processForm


//.........这里部分代码省略.........
                         break;
                     }
                 }
                 if (!$hasValues) {
                     $post[$data['NAME']] = '';
                 } else {
                     $post[$data['NAME']] = implode($data['DATESEPARATOR'], $items);
                 }
             }
         }
         //Trigger Event - onBeforeStoreSubmissions
         $mainframe->triggerEvent('rsfp_f_onBeforeStoreSubmissions', array(array('formId' => $formId, 'post' => &$post, 'SubmissionId' => $SubmissionId)));
         // Add to db (values)
         foreach ($post as $key => $val) {
             $val = is_array($val) ? implode("\n", $val) : $val;
             $val = RSFormProHelper::stripJava($val);
             $db->setQuery("INSERT INTO #__rsform_submission_values SET `SubmissionId`='" . $SubmissionId . "', `FormId`='" . $formId . "', `FieldName`='" . $db->escape($key) . "', `FieldValue`='" . $db->escape($val) . "'");
             $db->execute();
         }
         //Trigger Event - onAfterStoreSubmissions
         $mainframe->triggerEvent('rsfp_f_onAfterStoreSubmissions', array(array('SubmissionId' => $SubmissionId, 'formId' => $formId)));
         // Send emails
         list($replace, $with) = RSFormProHelper::sendSubmissionEmails($SubmissionId);
         // RSForm! Pro Scripting - Thank You Message
         // performance check
         if (strpos($form->Thankyou, '{if ') !== false && strpos($form->Thankyou, '{/if}') !== false) {
             require_once dirname(__FILE__) . '/scripting.php';
             RSFormProScripting::compile($form->Thankyou, $replace, $with);
         }
         // Thank You Message
         $thankYouMessage = str_replace($replace, $with, $form->Thankyou);
         $form->ReturnUrl = str_replace($replace, $with, $form->ReturnUrl);
         // Set redirect link
         $u = RSFormProHelper::getURL();
         // Create the Continue button
         $continueButton = '';
         if ($form->ShowContinue) {
             // Create goto link
             $goto = 'document.location.reload();';
             // Cache workaround #1
             if ($cache_enabled) {
                 $goto = "document.location='" . addslashes($u) . "';";
             }
             if (!empty($form->ReturnUrl)) {
                 $goto = "document.location='" . addslashes($form->ReturnUrl) . "';";
             }
             // Continue button
             $continueButtonLabel = JText::_('RSFP_THANKYOU_BUTTON');
             if (strpos($continueButtonLabel, 'input')) {
                 $continueButton = JText::sprintf('RSFP_THANKYOU_BUTTON', $goto);
             } else {
                 if ($form->FormLayoutName == 'responsive') {
                     $continueButton .= '<div class="formResponsive">';
                 } else {
                     $continueButton .= '<br/>';
                 }
                 $continueButton .= '<input type="button" class="rsform-submit-button btn btn-primary" name="continue" value="' . JText::_('RSFP_THANKYOU_BUTTON') . '" onclick="' . $goto . '"/>';
                 if ($form->FormLayoutName == 'responsive') {
                     $continueButton .= '</div>';
                 }
             }
         }
         // get mappings data
         $db->setQuery("SELECT * FROM #__rsform_mappings WHERE formId = " . (int) $formId . " ORDER BY ordering ASC");
         $mappings = $db->loadObjectList();
         // get Post to another location
开发者ID:renekreijveld,项目名称:rsformpro-bootstrapped,代码行数:67,代码来源:rsform.php

示例2: processForm


//.........这里部分代码省略.........
                 $file = $realpath . $prefix . $files['form']['name'][$fieldName];
                 // Upload File
                 JFile::upload($files['form']['tmp_name'][$fieldName], $file);
                 // Add to db (submission value)
                 $db->setQuery("INSERT INTO #__rsform_submission_values SET `SubmissionId`='" . $SubmissionId . "', `FormId`='" . $formId . "', `FieldName`='" . $db->getEscaped($fieldName) . "', `FieldValue`='" . $db->getEscaped($file) . "'");
                 $db->query();
                 $emails = !empty($data['EMAILATTACH']) ? explode(',', $data['EMAILATTACH']) : array();
                 // Attach to user and admin email
                 if (in_array('useremail', $emails)) {
                     $userEmail['files'][] = $file;
                 }
                 if (in_array('adminemail', $emails)) {
                     $adminEmail['files'][] = $file;
                 }
             }
         }
         //Trigger Event - onBeforeStoreSubmissions
         $mainframe->triggerEvent('rsfp_f_onBeforeStoreSubmissions', array(array('formId' => $formId, 'post' => &$post, 'SubmissionId' => $SubmissionId)));
         // Add to db (values)
         foreach ($post as $key => $val) {
             $val = is_array($val) ? implode("\n", $val) : $val;
             $val = RSFormProHelper::stripJava($val);
             $db->setQuery("INSERT INTO #__rsform_submission_values SET `SubmissionId`='" . $SubmissionId . "', `FormId`='" . $formId . "', `FieldName`='" . $db->getEscaped($key) . "', `FieldValue`='" . $db->getEscaped($val) . "'");
             $db->query();
         }
         //Trigger Event - onAfterStoreSubmissions
         $mainframe->triggerEvent('rsfp_f_onAfterStoreSubmissions', array(array('SubmissionId' => $SubmissionId, 'formId' => $formId)));
         // Send emails
         list($replace, $with) = RSFormProHelper::sendSubmissionEmails($SubmissionId);
         // Thank You Message
         $thankYouMessage = str_replace($replace, $with, $form->Thankyou);
         $form->ReturnUrl = str_replace($replace, $with, $form->ReturnUrl);
         // Set redirect link
         $u = RSFormProHelper::getURL();
         // Create the Continue button
         $continueButton = '';
         if ($form->ShowContinue) {
             // Create goto link
             $goto = 'document.location.reload();';
             // Cache workaround #1
             if ($cache_enabled) {
                 $goto = "document.location='" . addslashes($u) . "';";
             }
             if (!empty($form->ReturnUrl)) {
                 $goto = "document.location='" . addslashes($form->ReturnUrl) . "';";
             }
             // Continue button
             $continueButtonLabel = JText::_('RSFP_THANKYOU_BUTTON');
             if (strpos($continueButtonLabel, 'input')) {
                 $continueButton = JText::sprintf('RSFP_THANKYOU_BUTTON', $goto);
             } else {
                 $continueButton = '<br/><input type="button" class="rsform-submit-button" name="continue" value="' . JText::_('RSFP_THANKYOU_BUTTON') . '" onclick="' . $goto . '"/>';
             }
         }
         $RSadapter = RSFormProHelper::getLegacyAdapter();
         eval($form->ScriptProcess2);
         $thankYouMessage .= $continueButton;
         //Mappings
         //get mappings data
         $db->setQuery("SELECT * FROM #__rsform_mappings WHERE formId = " . (int) $formId . " ORDER BY ordering ASC ");
         $mappings = $db->loadObjectList();
         if (!empty($mappings)) {
             $lastinsertid = '';
             $replacewith = $with;
             array_walk($replacewith, array('RSFormProHelper', 'escapeSql'));
             foreach ($mappings as $mapping) {
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:67,代码来源:rsform.php


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