87 'data_type' =>
'date',
91 'data_type' =>
'integer',
95 'data_type' =>
'integer',
98 'PASSWORD_ID' =>
array(
99 'data_type' =>
'integer',
103 'data_type' =>
'integer',
107 'data_type' =>
'integer',
111 'data_type' =>
'integer',
115 'data_type' =>
'integer',
119 'data_type' =>
'integer',
123 'data_type' =>
'integer',
127 'data_type' =>
'integer',
131 'data_type' =>
'integer',
135 'data_type' =>
'integer',
139 'data_type' =>
'integer',
143 'data_type' =>
'integer',
147 'data_type' =>
'integer',
151 'data_type' =>
'integer',
155 'data_type' =>
'integer',
159 'data_type' =>
'integer',
163 'data_type' =>
'integer',
167 'data_type' =>
'integer',
171 'data_type' =>
'integer',
175 'data_type' =>
'integer',
179 'data_type' =>
'integer',
183 'data_type' =>
'integer',
187 'data_type' =>
'integer',
191 'data_type' =>
'integer',
195 'data_type' =>
'integer',
199 'data_type' =>
'Bitrix\Rest\StatAppTable',
200 'reference' =>
array(
201 '=this.APP_ID' =>
'ref.APP_ID',
205 'data_type' =>
'Bitrix\Rest\StatMethodTable',
206 'reference' =>
array(
207 '=this.METHOD_ID' =>
'ref.ID',
211 'data_type' =>
'\Bitrix\Rest\APAuth\PasswordTable',
212 'reference' =>
array(
213 '=this.PASSWORD_ID' =>
'ref.ID',
219 public static function log(\CRestServer $server)
266 protected static function addApToLog($passwordID, $methodName, $methodType)
268 if (!isset(static::$dataPassword[$passwordID]))
270 static::$dataPassword[$passwordID] =
array();
273 if (!isset(static::$dataPassword[$passwordID][$methodName]))
275 static::$dataPassword[$passwordID][$methodName] = 0;
278 static::$dataPassword[$passwordID][$methodName]++;
288 if (!isset(static::$data[
$clientId][$methodName]))
290 static::$data[
$clientId][$methodName] = 0;
306 $hour = intval(date(
'G'));
308 if(
count(static::$data) > 0)
310 foreach(static::$data as
$clientId => $stat)
316 foreach($stat as $methodName =>
$count)
325 'STAT_DATE' => $curDateSql,
326 'APP_ID' => $appInfo[
'ID'],
327 'METHOD_ID' => $methodId,
336 $queries = $helper->prepareMerge(
337 static::getTableName(),
338 array(
'DATE',
'APP_ID',
'METHOD_ID'),
343 foreach($queries as
$query)
352 if(
count(static::$dataPassword) > 0)
354 foreach(static::$dataPassword as $passwordID => $stat)
357 foreach ($stat as $methodName =>
$count)
366 'STAT_DATE' => $curDateSql,
367 'PASSWORD_ID' => $passwordID,
368 'METHOD_ID' => $methodId,
369 'HOUR_' . $hour =>
$count,
377 $queries = $helper->prepareMerge(
378 static::getTableName(),
379 array(
'DATE',
'APP_ID',
'METHOD_ID'),
384 foreach($queries as
$query)
397 static::$data =
array();
406 $sqlTableName = static::getTableName();
411 $sql =
"DELETE FROM {$sqlTableName} WHERE ".$where;
412 $entity->getConnection()->queryExecute($sql);
423 $sqlHelper =
$entity->getConnection()->getSqlHelper();
424 $sqlTableName = static::getTableName();
426 $update = $sqlHelper->prepareUpdate($sqlTableName,
$fields);
428 if($where <>
'' && $update[0] <>
'')
430 $sql =
"UPDATE {$sqlTableName} SET $update[0] WHERE $where";
431 $entity->getConnection()->queryExecute($sql);
440 static::deleteByFilter(
array(
441 "<STAT_DATE" => $date,
444 return "\\Bitrix\\Rest\\StatTable::cleanUpAgent();";
static getConnection($name="")
static getByClientId($clientId)
static register($appInfo)
static getId($methodName)
const METHOD_TYPE_ACTIVITY
const METHOD_TYPE_PLACEMENT
static addApToLog($passwordID, $methodName, $methodType)
static log(\CRestServer $server)
static logActivity($clientId)
static addToLog($clientId, $methodName, $methodType)
static deleteByFilter(array $filter)
static updateByFilter(array $filter, array $fields)
static logEvent($clientId, $eventName)
static logApMethod($passwordID, $methodName)
static logMethod($clientId, $methodName)
static logPlacement($clientId, $placementName)
static logRobot($clientId)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"