本文整理汇总了PHP中RSFormProHelper::sendSubmissionEmails方法的典型用法代码示例。如果您正苦于以下问题:PHP RSFormProHelper::sendSubmissionEmails方法的具体用法?PHP RSFormProHelper::sendSubmissionEmails怎么用?PHP RSFormProHelper::sendSubmissionEmails使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RSFormProHelper
的用法示例。
在下文中一共展示了RSFormProHelper::sendSubmissionEmails方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: resend
function resend()
{
$formId = JRequest::getInt('formId');
$cid = JRequest::getVar('cid', array(), 'post');
JArrayHelper::toInteger($cid);
foreach ($cid as $SubmissionId) {
RSFormProHelper::sendSubmissionEmails($SubmissionId);
}
$this->setRedirect('index.php?option=com_rsform&task=submissions.manage&formId=' . $formId, JText::_('RSFP_SUBMISSION_MAILS_RESENT'));
}
示例2: resend
function resend()
{
$app = JFactory::getApplication();
$formId = JRequest::getInt('formId');
$cid = JRequest::getVar('cid', array(), 'post');
JArrayHelper::toInteger($cid);
foreach ($cid as $SubmissionId) {
RSFormProHelper::sendSubmissionEmails($SubmissionId);
}
$app->redirect('index.php?option=com_rsform&view=submissions&formId=' . $formId, JText::_('RSFP_SUBMISSION_MAILS_RESENT'));
}
示例3: processForm
//.........这里部分代码省略.........
}
$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');
if (strpos($continueButtonLabel, 'input')) {
$continueButton = JText::sprintf('RSFP_THANKYOU_BUTTON', $goto);
} else {
if ($form->FormLayoutName == 'responsive') {
$continueButton .= '<div class="formResponsive">';
} else {
$continueButton .= '<br/>';
示例4: processForm
//.........这里部分代码省略.........
$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 . '"/>';
}
}
$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();
示例5: rsfp_afterConfirmPayment
public function rsfp_afterConfirmPayment($SubmissionId)
{
RSFormProHelper::sendSubmissionEmails($SubmissionId);
}