35 $intUserID = intval(
$USER->GetID());
36 $strDateFunction =
$DB->GetNowFunction();
37 $boolNoUpdate =
false;
40 $arFields[
'~LAST_USE'] = $strDateFunction;
41 $boolNoUpdate = (
'UPDATE' ==
$ACTION);
45 if (0 == strncmp(
$key,
'=', 1))
49 if (array_key_exists(
'TIMESTAMP_X',
$arFields))
51 if (array_key_exists(
'DATE_CREATE',
$arFields))
56 $arFields[
'~TIMESTAMP_X'] = $strDateFunction;
57 $arFields[
'~DATE_CREATE'] = $strDateFunction;
60 if (!array_key_exists(
'CREATED_BY',
$arFields) || intval(
$arFields[
"CREATED_BY"]) <= 0)
62 if (!array_key_exists(
'MODIFIED_BY',
$arFields) || intval(
$arFields[
"MODIFIED_BY"]) <= 0)
68 if (array_key_exists(
'CREATED_BY',
$arFields))
72 if (array_key_exists(
'MODIFIED_BY',
$arFields))
79 if (!array_key_exists(
'MODIFIED_BY',
$arFields) || intval(
$arFields[
"MODIFIED_BY"]) <= 0)
82 $arFields[
'~TIMESTAMP_X'] = $strDateFunction;
96 return $DB->Query(
"DELETE FROM b_catalog_export WHERE ID = ".
$ID.
" AND IS_EXPORT = 'Y'",
true);
102 $arSqlSearch =
array();
105 $filter_keys =
array();
109 for (
$i = 0, $intCount =
count($filter_keys);
$i < $intCount;
$i++)
117 if (mb_substr(
$key, 0, 1) ==
"!")
123 switch(mb_strtoupper(
$key))
126 $arSqlSearch[] =
"CE.ID ".($bInvert?
"<>" :
"=").
" ".intval(
$val).
"";
129 $arSqlSearch[] =
"CE.FILE_NAME ".($bInvert?
"<>" :
"=").
" '".
$val.
"'";
132 $arSqlSearch[] =
"CE.NAME ".($bInvert?
"<>" :
"=").
" '".
$val.
"'";
134 case "DEFAULT_PROFILE":
135 $arSqlSearch[] =
"CE.DEFAULT_PROFILE ".($bInvert?
"<>" :
"=").
" '".
$val.
"'";
138 $arSqlSearch[] =
"CE.IN_MENU ".($bInvert?
"<>" :
"=").
" '".
$val.
"'";
141 $arSqlSearch[] =
"CE.IN_AGENT ".($bInvert?
"<>" :
"=").
" '".
$val.
"'";
144 $arSqlSearch[] =
"CE.IN_CRON ".($bInvert?
"<>" :
"=").
" '".
$val.
"'";
147 $arSqlSearch[] =
"CE.NEED_EDIT ".($bInvert?
"<>" :
"=").
" '".
$val.
"'";
150 $arSqlSearch[] =
"CE.CREATED_BY ".($bInvert?
"<>" :
"=").
" '".intval(
$val).
"'";
153 $arSqlSearch[] =
"CE.MODIFIED_BY ".($bInvert?
"<>" :
"=").
" '".intval(
$val).
"'";
159 if (!empty($arSqlSearch))
161 $strSqlSearch =
' AND ('.implode(
') AND (', $arSqlSearch).
') ';
165 "SELECT CE.ID, CE.FILE_NAME, CE.NAME, CE.IN_MENU, CE.IN_AGENT, ".
166 " CE.IN_CRON, CE.SETUP_VARS, CE.DEFAULT_PROFILE, CE.LAST_USE, CE.NEED_EDIT, ".
167 " ".$DB->DateToCharFunction(
"CE.LAST_USE",
"FULL").
" as LAST_USE_FORMAT, ".
168 " CE.CREATED_BY, CE.MODIFIED_BY, ".$DB->DateToCharFunction(
'CE.TIMESTAMP_X',
'FULL').
' as TIMESTAMP_X, '.
$DB->DateToCharFunction(
'CE.DATE_CREATE',
'FULL').
' as DATE_CREATE ';
171 "FROM b_catalog_export CE ";
176 "SELECT COUNT(CE.ID) as CNT ".
178 "WHERE CE.IS_EXPORT = 'Y' ".
184 $iCnt = intval(
$ar_res[
"CNT"]);
192 "WHERE CE.IS_EXPORT = 'Y' ".
195 $arSqlOrder =
array();
196 $arOrderKeys =
array();
197 foreach ($arOrder as $by=>
$order)
199 $by = mb_strtoupper($by);
202 if (!in_array($by, $arOrderKeys))
204 if ($by ==
"NAME") $arSqlOrder[] =
"CE.NAME ".$order;
205 elseif ($by ==
"FILE_NAME") $arSqlOrder[] =
"CE.FILE_NAME ".$order;
206 elseif ($by ==
"DEFAULT_PROFILE") $arSqlOrder[] =
"CE.DEFAULT_PROFILE ".$order;
207 elseif ($by ==
"IN_MENU") $arSqlOrder[] =
"CE.IN_MENU ".$order;
208 elseif ($by ==
"LAST_USE") $arSqlOrder[] =
"CE.LAST_USE ".$order;
209 elseif ($by ==
"IN_AGENT") $arSqlOrder[] =
"CE.IN_AGENT ".$order;
210 elseif ($by ==
"IN_CRON") $arSqlOrder[] =
"CE.IN_CRON ".$order;
211 elseif ($by ==
"NEED_EDIT") $arSqlOrder[] =
"CE.NEED_EDIT ".$order;
215 if (in_array($by, $arOrderKeys))
217 $arSqlOrder[] =
"CE.ID ".$order;
219 $arOrderKeys[] = $by;
224 if (!empty($arSqlOrder))
226 $strSqlOrder =
' ORDER BY '.implode(
', ', $arSqlOrder);
229 $strSql .= $strSqlOrder;
240 "SELECT CE.ID, CE.FILE_NAME, CE.NAME, CE.IN_MENU, CE.IN_AGENT, ".
241 " CE.IN_CRON, CE.SETUP_VARS, CE.DEFAULT_PROFILE, CE.LAST_USE, CE.NEED_EDIT, ".
242 " ".$DB->DateToCharFunction(
"CE.LAST_USE",
"FULL").
" as LAST_USE_FORMAT, ".
243 " CE.CREATED_BY, CE.MODIFIED_BY, ".$DB->DateToCharFunction(
'CE.TIMESTAMP_X',
'FULL').
' as TIMESTAMP_X, '.
$DB->DateToCharFunction(
'CE.DATE_CREATE',
'FULL').
' as DATE_CREATE '.
244 "FROM b_catalog_export CE ".
245 "WHERE CE.ID = ".intval(
$ID).
" ".
246 " AND CE.IS_EXPORT = 'Y' ";
309 if (!defined(
'CATALOG_EXPORT_NO_STEP'))
310 define(
'CATALOG_EXPORT_NO_STEP',
true);
320 "=LAST_USE" =>
$DB->GetNowFunction()
324 return "CCatalogExport::PreGenerateExport(".$profile_id.
");";
const CATALOG_PATH2EXPORTS_DEF
const CATALOG_PATH2EXPORTS
static PreGenerateExport($profile_id)
static CheckFields($ACTION, &$arFields)
static GetList($arOrder=array("ID"=>"ASC"), $arFilter=array(), $bCount=false)
static getDefaultSettings($type, $extFormat=false)
static getSettingsFields($type, $extFormat=false)
static Update($ID, $arFields)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!file_exists($_SERVER["DOCUMENT_ROOT"]. $strFile)) $arSetupVars
$_SERVER["DOCUMENT_ROOT"]
if(!\Bitrix\Main\Loader::includeModule('catalog')) $profile_id
global $arCatalogAvailPriceFields
global $defCatalogAvailValueFields
global $arCatalogAvailQuantityFields
if(! $ar_profile) $strFile
global $defCatalogAvailProdFields
if(isset( $argv[1])) if($profile_id<=0) $ar_profile
global $defCatalogAvailQuantityFields
global $arCatalogAvailProdFields
global $defCatalogAvailCurrencies
if($ar_profile["DEFAULT_PROFILE"] !='Y') $firstStep
global $arCatalogAvailGroupFields
global $arCatalogAvailValueFields
global $defCatalogAvailPriceFields
global $defCatalogAvailGroupFields
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
if(empty($signedUserToken)) $key
</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."%"