本文整理汇总了PHP中mailer::getCountRecipients方法的典型用法代码示例。如果您正苦于以下问题:PHP mailer::getCountRecipients方法的具体用法?PHP mailer::getCountRecipients怎么用?PHP mailer::getCountRecipients使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mailer
的用法示例。
在下文中一共展示了mailer::getCountRecipients方法的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;
}
示例2: DigestFactory
$rec_frl_count = $uCount['live_frl_today'];
if (!$blocks) {
$digest['filter_frl'] = 1;
$digest['filter_emp'] = 1;
$blocks = new DigestFactory();
$blocks->createDefaultBlocks();
}
$js_file = array('/css/block/b-textarea/b-textarea.js', 'highlight.min.js', 'highlight.init.js', 'digest.js');
$js_file_utf8[] = '/scripts/ckedit/ckeditor.js';
array_push($css_file, 'wysiwyg.css', 'hljs.css');
$inner_page = 'tpl.digest.php';
break;
case 'create':
$is_sub_regular = !empty(mailer::$SUB_TYPE_REGULAR[$message['type_regular']]);
if (empty($count)) {
list($rec_emp_count, $rec_frl_count) = $mailer->getCountRecipients(array('emp', 'frl'), $message);
} else {
list($rec_emp_count, $rec_frl_count) = $count;
}
$specs = professions::GetAllGroupsLite();
$countries = country::GetCountries();
$inner_page = 'tpl.create.php';
$js_file = array('highlight.min.js', 'highlight.init.js', 'mailer.js', 'attachedfiles.js');
$js_file_utf8[] = '/scripts/ckedit/ckeditor.js';
break;
case 'edit':
$specs = professions::GetAllGroupsLite();
$countries = country::GetCountries();
$id = __paramInit('int', 'id');
if (!$pAction) {
$message = $mailer->getMailerById($id);