1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
sendersendcounter.php
См. документацию.
1<?php
8
9namespace Bitrix\Main\Mail;
10
11use Bitrix\Main\Type;
12use Bitrix\Main\ORM\Fields\ExpressionField;
13use Bitrix\Main\DB\SqlExpression;
14
16{
17 public const DEFAULT_LIMIT = 250;
24 public function get($email)
25 {
26 $counter = 0;
27 $date = new Type\Date();
28
30 "filter" => array(
31 "=DATE_STAT" => $date,
32 "=EMAIL" => $email,
33 )
34 ));
35
36 if($cnt = $res->fetch())
37 {
38 $counter = $cnt["CNT"];
39 }
40
41 return $counter;
42 }
43
50 public function getMonthly($email)
51 {
52 $counter = 0;
53 $date = new Type\Date(date("01.m.Y"), "d.m.Y");
54
56 "select" => array(
57 new ExpressionField('CNT', 'SUM(CNT)'),
58 ),
59 "filter" => array(
60 ">=DATE_STAT" => $date,
61 "=EMAIL" => $email,
62 )
63 ));
64
65 if($cnt = $res->fetch())
66 {
67 $counter = $cnt["CNT"];
68 }
69
70 return $counter;
71 }
72
77 public function increment($email, $increment = 1)
78 {
79 $insert = array(
80 "DATE_STAT" => new Type\Date(),
81 "EMAIL" => $email,
82 "CNT" => $increment,
83 );
84 $update = array(
85 "CNT" => new SqlExpression("?# + ?i", "CNT", $increment),
86 );
87
89 }
90}
static mergeData(array $insert, array $update)
Определения sendersendcounter.php:52
increment($email, $increment=1)
Определения sendersendcounter.php:77
static getList(array $parameters=array())
Определения datamanager.php:431
Определения date.php:9
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
Определения collection.php:2
$email
Определения payment.php:49
$counter
Определения options.php:5