本文整理汇总了PHP中RSFormProHelper::stripJava方法的典型用法代码示例。如果您正苦于以下问题:PHP RSFormProHelper::stripJava方法的具体用法?PHP RSFormProHelper::stripJava怎么用?PHP RSFormProHelper::stripJava使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RSFormProHelper
的用法示例。
在下文中一共展示了RSFormProHelper::stripJava方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RSstripjavaVar
function RSstripjavaVar($val)
{
return RSFormProHelper::stripJava($val);
}
示例2: processForm
//.........这里部分代码省略.........
$post[$data['NAME']]['d'] = str_pad(@$post[$data['NAME']]['d'], 2, '0', STR_PAD_LEFT);
}
$items[$day] = @$post[$data['NAME']]['d'];
}
if ($data['SHOWMONTH'] == 'YES') {
if (isset($data['STORELEADINGZERO']) && $data['STORELEADINGZERO'] == 'YES') {
$post[$data['NAME']]['m'] = str_pad(@$post[$data['NAME']]['m'], 2, '0', STR_PAD_LEFT);
}
$items[$month] = @$post[$data['NAME']]['m'];
}
if ($data['SHOWYEAR'] == 'YES') {
$items[$year] = @$post[$data['NAME']]['y'];
}
ksort($items);
$hasValues = false;
foreach ($items as $item) {
if (!empty($item)) {
$hasValues = true;
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');
示例3: processForm
//.........这里部分代码省略.........
}
// Prefix
$prefix = uniqid('') . '-';
if (isset($data['PREFIX']) && strlen(trim($data['PREFIX'])) > 0) {
$prefix = RSFormProHelper::isCode($data['PREFIX']);
}
// Path
$realpath = realpath($data['DESTINATION'] . DS);
if (substr($realpath, -1) != DS) {
$realpath .= DS;
}
// Filename
$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 . '"/>';
}
}