Server IP : 85.193.89.191 / Your IP : 3.136.25.16 Web Server : Apache System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : bitrix ( 600) PHP Version : 8.1.27 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/bitrix/www/bitrix/modules/statistic/classes/mysql/ |
Upload File : |
<?php require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/statistic/classes/general/guest.php"); class CGuest extends CAllGuest { public static function GetLastByID($ID) { $DB = CDatabase::GetModuleConnection('statistic'); $ID = intval($ID); if($ID>0) { $strSql = " SELECT G.ID, G.FAVORITES, G.LAST_USER_ID, A.ID as LAST_ADV_ID, if(to_days(curdate())=to_days(G.LAST_DATE), 'Y', 'N') LAST FROM b_stat_guest G LEFT JOIN b_stat_adv A ON A.ID = G.LAST_ADV_ID WHERE G.ID='$ID' "; $res = $DB->Query($strSql, false, "File: ".__FILE__."<br>Line: ".__LINE__); } else { $res = new CDBResult; $res->InitFromArray(array()); } return $res; } }