當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mailer::loadPOST方法代碼示例

本文整理匯總了PHP中mailer::loadPOST方法的典型用法代碼示例。如果您正苦於以下問題:PHP mailer::loadPOST方法的具體用法?PHP mailer::loadPOST怎麽用?PHP mailer::loadPOST使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mailer的用法示例。


在下文中一共展示了mailer::loadPOST方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: recalcRecipients

function recalcRecipients($post)
{
    $objResponse = new xajaxResponse();
    if (trim($post)) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/mailer.php';
        if (get_magic_quotes_runtime() || get_magic_quotes_gpc()) {
            $post = stripslashes($post);
        }
        $post = iconv('CP1251', 'UTF-8', $post);
        $_post = json_decode($post, true);
        foreach ($_post as $k => $v) {
            if ($v['name'] == 'attachedfiles_session') {
                continue;
            }
            $result[$v['name']] = iconv('UTF-8', 'CP1251', $v['value']);
        }
        $url = http_build_query($result);
        parse_str($url, $output);
        $mailer = new mailer();
        $filter = $mailer->loadPOST($output);
        $cnt = $mailer->getCountRecipients(array('frl', 'emp'), $filter);
        if ($filter['filter_emp'] > 0 && $filter['filter_frl'] > 0) {
            $sum = array_sum($cnt);
        } elseif ($filter['filter_emp'] > 0) {
            $sum = $cnt[0];
        } elseif ($filter['filter_frl'] > 0) {
            $sum = $cnt[1];
        } else {
            $sum = array_sum($cnt);
        }
        $sum = $mailer->calcSumRecipientsCount($filter, $cnt);
        $text = number_format($sum, 0, ',', ' ') . ' ' . ending($sum, 'человек', 'человека', 'человек');
        $objResponse->assign('all_recipients_count', 'innerHTML', $text);
        $objResponse->assign('emp_recipients_count', 'innerHTML', number_format($cnt[0], 0, ',', ' '));
        $objResponse->assign('frl_recipients_count', 'innerHTML', number_format($cnt[1], 0, ',', ' '));
    }
    return $objResponse;
}
開發者ID:kapai69,項目名稱:fl-ru-damp,代碼行數:38,代碼來源:mailer.server.php

示例2: array

    $filter['to'] = $filter['to'] === null ? '' : $filter['to'];
}
if (empty($filter)) {
    $filter = false;
}
$css_file = array();
switch ($pAction) {
    case 'delete':
        $id = __paramInit('int', null, 'id');
        $mailer->delete($id);
        header('Location: /siteadmin/mailer/');
        exit;
        break;
    case 'create_and_sendme':
        $insert = $mailer->initPost($_POST);
        $message = $mailer->loadPOST($_POST);
        if (!$mailer->error) {
            if ($insert['filter_file']) {
                $insert['filter_file'] = $mailer->uploadExtra();
            } else {
                if ($insert['filter_emp']) {
                    $insert['filter_emp'] = $mailer->createFilter('mailer_filter_employer', $insert['filter_emp']);
                }
                if ($insert['filter_frl']) {
                    $insert['filter_frl'] = $mailer->createFilter('mailer_filter_freelancer', $insert['filter_frl']);
                }
                $count = mailer::getCountRecipients(array('emp', 'frl'), $message);
                $insert['count_rec_emp'] = (int) $count[0];
                $insert['count_rec_frl'] = (int) $count[1];
            }
            $id = $mailer->create($insert);
開發者ID:kapai69,項目名稱:fl-ru-damp,代碼行數:31,代碼來源:index.php


注:本文中的mailer::loadPOST方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。