12 public static function reset(
int $userId = 0,
array $types = [],
array $logIds = [],
array $groupIds = [],
array $exceptGroups = []): void
18 $where[] =
'USER_ID = ' .
$userId;
23 $where[] =
"TYPE IN ('". implode(
"','", $types) .
"')";
28 $where[] =
"SONET_LOG_ID IN (". implode(
",", $logIds) .
")";
31 if (!empty($groupIds))
33 $where[] =
"GROUP_ID IN (". implode(
",", $groupIds) .
")";
36 if (!empty($exceptGroups))
38 $where[] =
"GROUP_ID NOT IN (". implode(
",", $exceptGroups) .
")";
41 $where = (!empty($where)) ? (
'WHERE ' . implode(
' AND ', $where)) :
'';
49 Application::getConnection()->query($sql);
52 private function saveFlag(
int $userId): void
56 (USER_ID, SONET_LOG_ID, GROUP_ID, TYPE, VALUE)
59 Application::getConnection()->query($sql);
62 private function batchInsert(
array $data): void
65 foreach ($data as $row)
67 $row[
'TYPE'] =
"'". $row[
'TYPE'] .
"'";
68 $req[] = implode(
',', $row);
78 (USER_ID, SONET_LOG_ID, GROUP_ID, TYPE, VALUE)
80 (". implode(
"),(", $req) .
")
83 Application::getConnection()->query($sql);
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
const COUNTER_FLAG_COUNTED
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)