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


PHP rex::getErrorEmail方法代码示例

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


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

示例1: replaceVars

 static function replaceVars($template, $er = array())
 {
     $r = rex_extension::registerPoint(new rex_extension_point('YFORM_EMAIL_BEFORE_REPLACEVARS', ['template' => $template, 'search_replace' => $er, 'status' => false]));
     $template = $r['template'];
     $er = $r['search_replace'];
     $status = $r['status'];
     if ($status) {
         return true;
     }
     $er['REX_SERVER'] = rex::getServer();
     $er['REX_ERROR_EMAIL'] = rex::getErrorEmail();
     $er['REX_SERVERNAME'] = rex::getServerName();
     $er['REX_NOTFOUND_ARTICLE_ID'] = rex_article::getNotfoundArticleId();
     $er['REX_ARTICLE_ID'] = rex_article::getCurrentId();
     $template['body'] = rex_var::parse($template['body'], '', 'yform_email_template', $er);
     $template['body_html'] = rex_var::parse($template['body_html'], '', 'yform_email_template', $er);
     // rex_vars bug: sonst wird der Zeilenumbruch entfernt - wenn DATA_VAR am Ende einer Zeile
     if (rex_string::versionCompare(rex::getVersion(), '5.0.1', '<')) {
         $template['body'] = str_replace("?>\r", "?>\r\n\r", $template['body']);
         $template['body'] = str_replace("?>\n", "?>\n\r\n", $template['body']);
         $template['body_html'] = str_replace("?>\r", "?>\r\n\r", $template['body_html']);
         $template['body_html'] = str_replace("?>\n", "?>\n\r\n", $template['body_html']);
     }
     $template['body'] = rex_file::getOutput(rex_stream::factory('yform/email/template/' . $template['name'] . '/body', $template['body']));
     $template['body_html'] = rex_file::getOutput(rex_stream::factory('yform/email/template/' . $template['name'] . '/body_html', $template['body_html']));
     return $template;
 }
开发者ID:VIEWSION,项目名称:redaxo_yform,代码行数:27,代码来源:yform_email_template.php

示例2: executeAction

 function executeAction()
 {
     $template_name = $this->getElement(2);
     if ($etpl = rex_yform_email_template::getTemplate($template_name)) {
         $mail_to = rex::getErrorEmail();
         if ($this->getElement(3) != false && $this->getElement(3) != '') {
             foreach ($this->params['value_pool']['email'] as $key => $value) {
                 if ($this->getElement(3) == $key) {
                     $mail_to = $value;
                     break;
                 }
             }
         }
         // ---- fix mailto from definition
         if ($this->getElement(4) != false && $this->getElement(4) != '') {
             $mail_to = $this->getElement(4);
         }
         if ($this->params['debug']) {
             echo '<hr /><pre>';
             var_dump($etpl);
             echo '</pre><hr />';
         }
         $etpl = rex_yform_email_template::replaceVars($etpl, $this->params['value_pool']['email']);
         if ($this->params['debug']) {
             echo '<hr /><pre>';
             var_dump($etpl);
             echo '</pre><hr />';
         }
         $etpl['mail_to'] = $mail_to;
         $etpl['mail_to_name'] = $mail_to;
         if ($etpl['attachments'] != '') {
             $f = explode(',', $etpl['attachments']);
             $etpl['attachments'] = array();
             foreach ($f as $v) {
                 $etpl['attachments'][] = array('name' => $v, 'path' => rex_path::media($v));
             }
         } else {
             $etpl['attachments'] = array();
         }
         if (!rex_yform_email_template::sendMail($etpl, $template_name)) {
             if ($this->params['debug']) {
                 echo 'email could be sent';
             }
             return false;
         } else {
             if ($this->params['debug']) {
                 echo 'email sent';
             }
             return true;
         }
     } else {
         if ($this->params['debug']) {
             echo '<p>Template: "' . htmlspecialchars($template_name) . '" not found';
         }
     }
     return false;
 }
开发者ID:VIEWSION,项目名称:redaxo_yform,代码行数:57,代码来源:yform_action_tpl2email.php

示例3: htmlspecialchars

$fragment->setVar('title', rex_i18n::msg('system_features'));
$fragment->setVar('body', $content, false);
echo $fragment->parse('core/page/section.php');
$content = [];
$formElements = [];
$n = [];
$n['label'] = '<label for="rex-id-server">' . rex_i18n::msg('server') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-server" name="settings[server]" value="' . htmlspecialchars(rex::getServer()) . '" />';
$formElements[] = $n;
$n = [];
$n['label'] = '<label for="rex-id-servername">' . rex_i18n::msg('servername') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-servername" name="settings[servername]" value="' . htmlspecialchars(rex::getServerName()) . '" />';
$formElements[] = $n;
$n = [];
$n['label'] = '<label for="rex-id-error-email">' . rex_i18n::msg('error_email') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-error-email" name="settings[error_email]" value="' . htmlspecialchars(rex::getErrorEmail()) . '" />';
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$content[] = $fragment->parse('core/form/form.php');
$elements = '';
$formElements = [];
$n = [];
$n['label'] = '<label for="rex-id-lang">' . rex_i18n::msg('backend_language') . '</label>';
$n['field'] = $sel_lang->get();
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$elements .= $fragment->parse('core/form/form.php');
$formElements = [];
$n = [];
开发者ID:staabm,项目名称:redaxo,代码行数:31,代码来源:system.settings.php


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