%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.139.81.143 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/install/components/bitrix/sale.notice.product/ |
Upload File : |
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); //CUtil::InitJSCore(array('popup')); global $USER; $arParams["NOTIFY_ID"] = intval($arParams["NOTIFY_ID"]); $arParams["NOTIFY_PRODUCT_ID"] = trim($arParams["NOTIFY_PRODUCT_ID"]); $arParams["NOTIFY_ACTION"]=trim($arParams["NOTIFY_ACTION"]); if($arParams["NOTIFY_ACTION"] == '') $arParams["NOTIFY_ACTION"] = "action"; $arParams["NOTIFY_USE_CAPTHA"] = $arParams["NOTIFY_USE_CAPTHA"] == "Y" ? "Y" : "N"; $arResult = array("STATUS" => "N", "NOTIFY_URL" => "", "ERRORS" => ""); $notifyOption = COption::GetOptionString("sale", "subscribe_prod", ""); $arNotify = Array(); if($notifyOption <> '') $arNotify = unserialize($notifyOption, ['allowed_classes' => false]); if (CModule::IncludeModule('sale') && CModule::IncludeModule('catalog') && $arParams["NOTIFY_ID"] > 0 && !empty($arNotify) && $arNotify[SITE_ID]['use'] == 'Y') { if ($USER->IsAuthorized() && !isset($_SESSION["NOTIFY_PRODUCT"][$USER->GetID()])) { $_SESSION["NOTIFY_PRODUCT"][$USER->GetID()] = array(); if ($USER->IsAuthorized()) { $dbNotifyList = CSaleBasket::GetList( array(), array( "FUSER_ID" => CSaleBasket::GetBasketUserID(), "ORDER_ID" => "NULL", "SUBSCRIBE" => "Y", "CAN_BUY" => "N" ), false, false, array('PRODUCT_ID', 'TYPE', 'SET_PARENT_ID') ); while ($arNotifyList = $dbNotifyList->Fetch()) { if (CSaleBasketHelper::isSetItem($arNotifyList)) continue; $_SESSION["NOTIFY_PRODUCT"][$USER->GetID()][] = $arNotifyList["PRODUCT_ID"]; } } } if ($USER->IsAuthorized() && isset($_GET[$arParams["NOTIFY_ACTION"]]) && $_GET[$arParams["NOTIFY_ACTION"]] == "SUBSCRIBE_PRODUCT") { $_SESSION["NOTIFY_PRODUCT"][$USER->GetID()][$arParams["NOTIFY_ID"]] = $arParams["NOTIFY_ID"]; } if ($USER->IsAuthorized()) { if (is_array($_SESSION["NOTIFY_PRODUCT"][$USER->GetID()]) && in_array($arParams["NOTIFY_ID"], $_SESSION["NOTIFY_PRODUCT"][$USER->GetID()])) $arResult["STATUS"] = "Y"; else { $arResult["STATUS"] = "N"; //$arResult["NOTIFY_URL"] = htmlspecialcharsbx($APPLICATION->GetCurPageParam($arParams["NOTIFY_ACTION"]."=SUBSCRIBE_PRODUCT&".$arParams["NOTIFY_PRODUCT_ID"]."=".$arParams["NOTIFY_ID"], array($arParams["NOTIFY_PRODUCT_ID"], $arParams["NOTIFY_ACTION"]))); $arResult["NOTIFY_URL"] = htmlspecialcharsback($arParams['NOTIFY_URL']); } } else { $arResult["STATUS"] = "R"; $arResult["NOTIFY_URL"] = htmlspecialcharsback($arParams['NOTIFY_URL']); if ($arParams["NOTIFY_USE_CAPTHA"] == "Y") $_SESSION["NOTIFY_PRODUCT"]["CAPTHA"] = "Y"; else $_SESSION["NOTIFY_PRODUCT"]["CAPTHA"] = "N"; } if($arParams["NOTIFY_USE_CAPTHA"] == "Y") $arResult["CAPTCHA_CODE"] = $APPLICATION->CaptchaGetCode(); else $arResult["CAPTCHA_CODE"] = false; $this->IncludeComponentTemplate(); }//end sale ?>