2namespace Bitrix\Landing\Landing;
4use Bitrix\Landing\PublicAction\Block;
5use \Bitrix\Main\Entity;
6use \Bitrix\Main\Type\DateTime;
7use \Bitrix\Landing\Manager;
8use \Bitrix\Landing\Landing;
9use \Bitrix\Landing\Rights;
10use \Bitrix\Landing\Internals\ViewTable;
11use \Bitrix\Landing\Controller;
28 $res = ViewTable::getList([
37 'SUM',
'SUM(%s)', [
'VIEWS']
41 if ($row =
$res->fetch())
45 'VIEWS' => $row[
'SUM'],
46 'DATE_MODIFY' =>
false
58 public static function inc($lid,
$uid =
null)
72 if (!isset($_SESSION[self::SESSION_VIEWS_KEY]))
74 $_SESSION[self::SESSION_VIEWS_KEY] = [];
77 if (!in_array($lid, $_SESSION[self::SESSION_VIEWS_KEY]))
79 $res = ViewTable::getList([
88 if ($row =
$res->fetch())
90 $result = ViewTable::update($row[
'ID'], [
91 'VIEWS' => $row[
'VIEWS'] + 1,
101 'FIRST_VIEW' => $date,
102 'LAST_VIEW' => $date,
107 self::incViewsPage($lid);
108 $_SESSION[self::SESSION_VIEWS_KEY][] = $lid;
116 $res = ViewTable::getList([
130 if ($row =
$res->fetch())
132 $views = (int)$row[
'COUNT'];
135 if (isset($views) && is_int($views))
145 $res = ViewTable::getList([
154 while ($row =
$res->fetch())
156 $data[
'id'][] = $row[
'USER_ID'];
158 $usersInfo = Controller\User::getUsersInfoAction(
$data[
'id']);
159 $data[
'name'] = $usersInfo[
'name'];
160 $countUsers =
count($usersInfo[
'name']);
161 for (
$i = 0;
$i < $countUsers;
$i++)
163 if ($usersInfo[
'personalPhoto'][
$i])
165 $avatar = \CFile::ResizeImageGet(
166 $usersInfo[
'personalPhoto'][
$i],
167 [
'width' => 58,
'height' => 58],
171 if (isset($avatar[
'src']))
173 $data[
'avatar'][] = $avatar[
'src'];
177 $data[
'avatar'][] =
'';
static getUniqueUserData(int $lid)
static incViewsPage($lid)
static getNumberUniqueViews(int $lid)
static inc($lid, $uid=null)
static update($primary, array $data)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
const BX_RESIZE_IMAGE_EXACT
</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."%"