17 if(!array_key_exists(
"RULE_TYPE",
$arFields))
20 if(!array_key_exists(
"ADMIN_SECTION",
$arFields))
23 if(!array_key_exists(
"ACTIVE",
$arFields))
33 if(array_key_exists(
"INCL_MASKS",
$arFields))
35 if(array_key_exists(
"EXCL_MASKS",
$arFields))
42 if(array_key_exists(
"EXCL_MASKS",
$arFields))
46 if(array_key_exists(
"INCL_IPS",
$arFields))
48 if(array_key_exists(
"EXCL_IPS",
$arFields))
55 if(array_key_exists(
"EXCL_IPS",
$arFields))
60 COption::RemoveOption(
"security",
"iprules_count");
62 if(CACHED_b_sec_iprule !==
false)
73 $DB->StartTransaction();
76 $res =
$DB->Query(
"DELETE FROM b_sec_iprule_incl_mask WHERE IPRULE_ID = ".
$ID);
79 $res =
$DB->Query(
"DELETE FROM b_sec_iprule_excl_mask WHERE IPRULE_ID = ".
$ID);
82 $res =
$DB->Query(
"DELETE FROM b_sec_iprule_incl_ip WHERE IPRULE_ID = ".
$ID);
85 $res =
$DB->Query(
"DELETE FROM b_sec_iprule_excl_ip WHERE IPRULE_ID = ".
$ID);
88 $res =
$DB->Query(
"DELETE FROM b_sec_iprule WHERE ID = ".
$ID);
95 COption::RemoveOption(
"security",
"iprules_count");
97 if(CACHED_b_sec_iprule !==
false)
114 $strUpdate =
$DB->PrepareUpdate(
"b_sec_iprule",
$arFields);
118 UPDATE b_sec_iprule SET
122 if(!
$DB->Query($strSql))
126 if(array_key_exists(
"INCL_MASKS",
$arFields))
128 if(array_key_exists(
"EXCL_MASKS",
$arFields))
135 if(array_key_exists(
"EXCL_MASKS",
$arFields))
139 if(array_key_exists(
"INCL_IPS",
$arFields))
141 if(array_key_exists(
"EXCL_IPS",
$arFields))
148 if(array_key_exists(
"EXCL_IPS",
$arFields))
152 COption::RemoveOption(
"security",
"iprules_count");
154 if(CACHED_b_sec_iprule !==
false)
160 public static function UpdateRuleMasks($IPRULE_ID, $arInclMasks =
false, $arExclMasks =
false)
163 $IPRULE_ID = intval($IPRULE_ID);
167 $arLikeSearch =
array(
"?",
"*",
".");
168 $arLikeReplace =
array(
"_",
"%",
"\\.");
169 $arPregSearch =
array(
"\\",
".",
"?",
"*",
"'");
170 $arPregReplace =
array(
"/",
"\\.",
".",
".*?",
"\\'");
172 if(is_array($arInclMasks))
174 $res =
$DB->Query(
"DELETE FROM b_sec_iprule_incl_mask WHERE IPRULE_ID = ".$IPRULE_ID);
180 foreach($arInclMasks as $mask)
183 if($mask && !array_key_exists($mask, $added))
187 "IPRULE_ID" => $IPRULE_ID,
188 "RULE_MASK" => $mask,
190 "LIKE_MASK" => str_replace($arLikeSearch, $arLikeReplace, $mask),
191 "PREG_MASK" => str_replace($arPregSearch, $arPregReplace, $mask),
193 $DB->Add(
"b_sec_iprule_incl_mask", $arMask);
195 $added[$mask] =
true;
199 if(CACHED_b_sec_iprule !==
false)
204 if(is_array($arExclMasks))
206 $res =
$DB->Query(
"DELETE FROM b_sec_iprule_excl_mask WHERE IPRULE_ID = ".$IPRULE_ID);
212 foreach($arExclMasks as $mask)
215 if($mask && !array_key_exists($mask, $added))
219 "IPRULE_ID" => $IPRULE_ID,
220 "RULE_MASK" => $mask,
222 "LIKE_MASK" => str_replace($arLikeSearch, $arLikeReplace, $mask),
223 "PREG_MASK" => str_replace($arPregSearch, $arPregReplace, $mask),
225 $DB->Add(
"b_sec_iprule_excl_mask", $arMask);
227 $added[$mask] =
true;
231 if(CACHED_b_sec_iprule !==
false)
242 $IPRULE_ID = intval($IPRULE_ID);
246 if(is_array($arInclIPs))
248 $res =
$DB->Query(
"DELETE FROM b_sec_iprule_incl_ip WHERE IPRULE_ID = ".$IPRULE_ID);
253 foreach($arInclIPs as $ip)
255 $ip = preg_replace(
"/[\\s]/u",
"", $ip);
256 if($ip && !array_key_exists($ip, $added))
258 $ar = explode(
"-", $ip);
265 "IPRULE_ID" => $IPRULE_ID,
271 $DB->Add(
"b_sec_iprule_incl_ip", $arIP);
277 if(CACHED_b_sec_iprule !==
false)
283 if(is_array($arExclIPs))
285 $res =
$DB->Query(
"DELETE FROM b_sec_iprule_excl_ip WHERE IPRULE_ID = ".$IPRULE_ID);
290 foreach($arExclIPs as $ip)
292 $ip = preg_replace(
"/[\\s]/u",
"", $ip);
293 if($ip && !array_key_exists($ip, $added))
295 $ar = explode(
"-", $ip);
302 "IPRULE_ID" => $IPRULE_ID,
308 $DB->Add(
"b_sec_iprule_excl_ip", $arIP);
314 if(CACHED_b_sec_iprule !==
false)
327 $res = doubleval(sprintf(
"%u", ip2long(trim($ip))));
333 function CheckIP($arInclIPs=
false, $arExclIPs=
false)
340 if($ip2check > 0 && is_array($arInclIPs))
342 foreach($arInclIPs as $id => $ip)
344 $ip = preg_replace(
"/[\\s]/u",
"", $ip);
347 $ar = explode(
"-", $ip);
352 if($ip2check >= $ip1 && $ip2check <= $ip2)
361 if($idFound !==
null && $ip2check > 0 && is_array($arExclIPs))
363 foreach($arExclIPs as $id => $ip)
365 $ip = preg_replace(
"/[\\s]/u",
"", $ip);
368 $ar = explode(
"-", $ip);
373 if($ip2check >= $ip1 && $ip2check <= $ip2)
382 if($idFound !==
null)
384 if(COption::GetOptionString(
"security",
"ipcheck_allow_self_block")===
"Y")
396 $this->LAST_ERROR = $e->GetString();
401 $this->LAST_ERROR =
"";
410 $this->LAST_ERROR =
"";
413 if(array_key_exists(
"RULE_TYPE",
$arFields))
431 if(array_key_exists(
"ACTIVE_FROM",
$arFields))
436 if(array_key_exists(
"ACTIVE_TO",
$arFields))
441 if(array_key_exists(
"ACTIVE",
$arFields))
446 if(array_key_exists(
"ADMIN_SECTION",
$arFields))
453 foreach(
$arFields[
"INCL_IPS"] as $id => $ip)
455 $ip = preg_replace(
"/[\\s]/u",
"", $ip);
458 $ar = explode(
"-", $ip);
502 foreach(
$arFields[
"EXCL_IPS"] as $id => $ip)
504 $ip = preg_replace(
"/[\\s]/u",
"", $ip);
507 $ar = explode(
"-", $ip);
552 $this->LAST_ERROR = $e->GetString();
561 $IPRULE_ID = intval($IPRULE_ID);
565 $rs =
$DB->Query(
"SELECT RULE_MASK FROM b_sec_iprule_incl_mask WHERE IPRULE_ID = ".$IPRULE_ID.
" ORDER BY SORT");
575 if (!is_array($files))
576 $files =
array($files);
578 foreach ($files as $file)
579 $DB->Query(
"DELETE FROM b_sec_iprule_excl_mask WHERE RULE_MASK = '".
$DB->ForSQL($file).
"'");
587 $exclToUpdate =
array();
588 if (!is_array($files))
589 $files =
array($files);
591 foreach ($files as $file)
596 ),
array(
"ID" =>
"ASC"));
599 while ($arIPRule = $rsIPRule->Fetch())
602 if (array_key_exists($arIPRule[
"ID"], $exclToUpdate))
603 $masks = array_merge($exclToUpdate[$arIPRule[
"ID"]],$masks);
605 $masks =
array($file);
607 $exclToUpdate[$arIPRule[
"ID"]]= $masks;
611 foreach ($exclToUpdate as $rule_id => $excl_mask)
614 $masks = array_unique(array_merge($masks,$excl_mask));
623 if (!is_array($files))
624 $files =
array($files);
628 $files=array_map(
array(
$DB,
'ForSQL'),$files);
629 $masks=implode(
"','", $files);
630 $rs =
$DB->Query(
"SELECT IPRULE_ID FROM b_sec_iprule_excl_mask WHERE RULE_MASK IN ('".$masks.
"')");
640 $IPRULE_ID = intval($IPRULE_ID);
644 $rs =
$DB->Query(
"SELECT RULE_MASK FROM b_sec_iprule_excl_mask WHERE IPRULE_ID = ".$IPRULE_ID.
" ORDER BY SORT");
654 $IPRULE_ID = intval($IPRULE_ID);
658 $rs =
$DB->Query(
"SELECT RULE_IP FROM b_sec_iprule_incl_ip WHERE IPRULE_ID = ".$IPRULE_ID.
" ORDER BY SORT");
668 $IPRULE_ID = intval($IPRULE_ID);
672 $rs =
$DB->Query(
"SELECT RULE_IP FROM b_sec_iprule_excl_ip WHERE IPRULE_ID = ".$IPRULE_ID.
" ORDER BY SORT");
683 if(!is_array($arSelect))
685 if(
count($arSelect) < 1)
698 if(!is_array($arOrder))
701 $arQueryOrder =
array();
702 foreach($arOrder as $strColumn => $strDirection)
704 $strColumn = mb_strtoupper($strColumn);
705 $strDirection = mb_strtoupper($strDirection) ==
"ASC"?
"ASC":
"DESC";
711 case "ADMIN_SECTION":
715 $arSelect[] = $strColumn;
716 $arQueryOrder[$strColumn] = $strColumn.
" ".$strDirection;
720 $arSelect[] = $strColumn;
721 $arSelect[] = $strColumn.
"_TIMESTAMP";
722 $arQueryOrder[$strColumn] = $strColumn.
"_TIMESTAMP ".$strDirection;
727 $arQuerySelect =
array();
728 foreach($arSelect as $strColumn)
730 $strColumn = mb_strtoupper($strColumn);
736 case "ADMIN_SECTION":
740 case "ACTIVE_FROM_TIMESTAMP":
741 case "ACTIVE_TO_TIMESTAMP":
742 $arQuerySelect[$strColumn] =
"r.".$strColumn;
746 $arQuerySelect[$strColumn] =
$DB->DateToCharFunction(
"r.".$strColumn,
"FULL").
" AS ".$strColumn;
750 if(
count($arQuerySelect) < 1)
751 $arQuerySelect =
array(
"ID"=>
"r.ID");
756 "TABLE_ALIAS" =>
"r",
757 "FIELD_NAME" =>
"r.ID",
758 "FIELD_TYPE" =>
"int",
761 "RULE_TYPE" =>
array(
762 "TABLE_ALIAS" =>
"r",
763 "FIELD_NAME" =>
"r.RULE_TYPE",
764 "FIELD_TYPE" =>
"string",
768 "TABLE_ALIAS" =>
"r",
769 "FIELD_NAME" =>
"r.ACTIVE",
770 "FIELD_TYPE" =>
"string",
773 "ADMIN_SECTION" =>
array(
774 "TABLE_ALIAS" =>
"r",
775 "FIELD_NAME" =>
"r.ADMIN_SECTION",
776 "FIELD_TYPE" =>
"string",
780 "TABLE_ALIAS" =>
"r",
781 "FIELD_NAME" =>
"r.SITE_ID",
782 "FIELD_TYPE" =>
"string",
786 "TABLE_ALIAS" =>
"r",
787 "FIELD_NAME" =>
"r.SORT",
788 "FIELD_TYPE" =>
"int",
792 "TABLE_ALIAS" =>
"r",
793 "FIELD_NAME" =>
"r.NAME",
794 "FIELD_TYPE" =>
"string",
797 "ACTIVE_FROM" =>
array(
798 "TABLE_ALIAS" =>
"r",
799 "FIELD_NAME" =>
"r.ACTIVE_FROM",
800 "FIELD_TYPE" =>
"datetime",
803 "ACTIVE_TO" =>
array(
804 "TABLE_ALIAS" =>
"r",
805 "FIELD_NAME" =>
"r.ACTIVE_TO",
806 "FIELD_TYPE" =>
"datetime",
814 $strQueryWhere = $obQueryWhere->GetQuery(
$arFilter);
816 $bDistinct = $obQueryWhere->bDistinctReqired;
826 INNER JOIN b_sec_iprule_incl_mask im on im.IPRULE_ID = r.ID
827 LEFT JOIN b_sec_iprule_excl_mask em on em.IPRULE_ID = r.ID AND '".$DB->ForSQL(
$path).
"' like em.LIKE_MASK
829 $strMaskWhere =
"('".$DB->ForSQL(
$path).
"' like im.LIKE_MASK AND em.IPRULE_ID is null)";
832 $strQueryWhere =
"(".$strQueryWhere.
") AND ".$strMaskWhere;
834 $strQueryWhere = $strMaskWhere;
846 INNER JOIN b_sec_iprule_incl_ip ii on ii.IPRULE_ID = r.ID
847 LEFT JOIN b_sec_iprule_excl_ip ei on ei.IPRULE_ID = r.ID AND ".$ip.
" between ei.IP_START AND ei.IP_END
849 $strIPWhere =
"(".$ip.
" between ii.IP_START AND ii.IP_END AND ei.IPRULE_ID is null)";
851 $strQueryWhere =
"(".$strQueryWhere.
") AND ".$strIPWhere;
853 $strQueryWhere = $strIPWhere;
858 SELECT ".($bDistinct?
"DISTINCT":
"").
"
859 ".implode(
", ", $arQuerySelect).
"
864 ".$obQueryWhere->GetJoins().
"
875 if(
count($arQueryOrder) > 0)
879 ".implode(
", ", $arQueryOrder).
"
883 return $DB->Query($strSql);
888 $c = COption::GetOptionInt(
"security",
"iprules_count", -1);
892 $rs =
$DB->Query(
"SELECT count(*) CNT FROM b_sec_iprule WHERE ACTIVE='Y'");
894 COption::SetOptionInt(
"security",
"iprules_count",
$ar[
"CNT"]);
895 $c = COption::GetOptionInt(
"security",
"iprules_count", -1);
902 if(isset(self::$bActive) && self::$bActive ===
true)
909 isset(
$event[
"TO_MODULE_ID"]) &&
$event[
"TO_MODULE_ID"] ==
"security"
910 && isset(
$event[
"TO_CLASS"]) &&
$event[
"TO_CLASS"] ==
"CSecurityIPRule"
938 $file = COption::GetOptionString(
"security",
"ipcheck_disable_file",
"");
939 $res = ($file <>
'') && file_exists(
$_SERVER[
"DOCUMENT_ROOT"].$file) && is_file(
$_SERVER[
"DOCUMENT_ROOT"].$file);
960 !CSecuritySystemInformation::isCliMode()
970 if (($pos = mb_strpos(
$uri,
'?')) !==
false)
974 $uri = preg_replace(
'#/+#',
'/',
$uri);
976 if (!static::isValidUri(
$uri))
977 include(
$_SERVER[
'DOCUMENT_ROOT'].
'/bitrix/admin/security_403.php');
980 if (CSecuritySystemInformation::isRunOnWin())
981 $uri = preg_replace(
'#(. )+[/\\\]+#',
'/',
$uri);
985 if(!$use_query && CACHED_b_sec_iprule !==
false)
987 $cache_id =
"b_sec_iprule";
988 if(
$CACHE_MANAGER->Read(CACHED_b_sec_iprule, $cache_id,
"b_sec_iprule"))
1001 r.ACTIVE_FROM_TIMESTAMP,
1002 r.ACTIVE_TO_TIMESTAMP
1009 OR r.ACTIVE_TO >= ".
$DB->CurrentTimeFunction().
"
1012 while(
$ar =
$rs->Fetch())
1014 $ar[
"ACTIVE_FROM_TIMESTAMP"] = intval(
$ar[
"ACTIVE_FROM_TIMESTAMP"]);
1015 $ar[
"ACTIVE_TO_TIMESTAMP"] = intval(
$ar[
"ACTIVE_TO_TIMESTAMP"]);
1020 $arRules[
$ar[
"ID"]] =
$ar;
1029 INNER JOIN b_sec_iprule_incl_mask im on im.IPRULE_ID = r.ID
1034 OR r.ACTIVE_TO >= ".
$DB->CurrentTimeFunction().
"
1037 while(
$ar =
$rs->Fetch())
1038 if(array_key_exists(
$ar[
"IPRULE_ID"], $arRules))
1039 $arRules[
$ar[
"IPRULE_ID"]][
"INCL_MASKS"][] =
$ar[
"PREG_MASK"];
1041 foreach($arRules as
$ID =>
$ar)
1043 unset($arRules[
$ID]);
1051 INNER JOIN b_sec_iprule_excl_mask em on em.IPRULE_ID = r.ID
1056 OR r.ACTIVE_TO >= ".
$DB->CurrentTimeFunction().
"
1059 while(
$ar =
$rs->Fetch())
1060 if(array_key_exists(
$ar[
"IPRULE_ID"], $arRules))
1061 $arRules[
$ar[
"IPRULE_ID"]][
"EXCL_MASKS"][] =
$ar[
"PREG_MASK"];
1070 INNER JOIN b_sec_iprule_incl_ip ii on ii.IPRULE_ID = r.ID
1075 OR r.ACTIVE_TO >= ".
$DB->CurrentTimeFunction().
"
1078 while(
$ar =
$rs->Fetch())
1079 if(array_key_exists(
$ar[
"IPRULE_ID"], $arRules))
1080 $arRules[
$ar[
"IPRULE_ID"]][
"INCL_IPS"][] =
array(
1081 doubleval(
$ar[
"IP_START"]),
1082 doubleval(
$ar[
"IP_END"]),
1085 foreach($arRules as
$ID =>
$ar)
1087 unset($arRules[
$ID]);
1096 INNER JOIN b_sec_iprule_excl_ip ei on ei.IPRULE_ID = r.ID
1101 OR r.ACTIVE_TO >= ".
$DB->CurrentTimeFunction().
"
1104 while(
$ar =
$rs->Fetch())
1105 if(array_key_exists(
$ar[
"IPRULE_ID"], $arRules))
1106 $arRules[
$ar[
"IPRULE_ID"]][
"EXCL_IPS"][] =
array(
1107 doubleval(
$ar[
"IP_START"]),
1108 doubleval(
$ar[
"IP_END"]),
1114 foreach($arRules as $arRule)
1118 ($arRule[
"ACTIVE_FROM_TIMESTAMP"] <= 0 || $arRule[
"ACTIVE_FROM_TIMESTAMP"] <= time())
1119 && ($arRule[
"ACTIVE_TO_TIMESTAMP"] <= 0 || $arRule[
"ACTIVE_TO_TIMESTAMP"] >= time())
1133 $bMatch = $arRule[
"ADMIN_SECTION"] ==
"Y";
1135 $bMatch = (!$arRule[
"SITE_ID"] || $arRule[
"SITE_ID"] ==
SITE_ID);
1146 foreach($arRule[
"INCL_IPS"] as $arIP)
1148 if($ip2check >= $arIP[0] && $ip2check <= $arIP[1])
1157 foreach($arRule[
"EXCL_IPS"] as $arIP)
1159 if($ip2check >= $arIP[0] && $ip2check <= $arIP[1])
1176 (!defined(
'SELF_FOLDER_URL') || SELF_FOLDER_URL ==
'/bitrix/admin/'))
1178 $bMatch = $arRule[
"ADMIN_SECTION"] ==
"Y";
1183 foreach($arRule[
"INCL_MASKS"] as $mask)
1185 if(preg_match(
"#^".$mask.
"$#",
$uri))
1195 foreach($arRule[
"EXCL_MASKS"] as $mask)
1197 if(preg_match(
"#^".$mask.
"$#",
$uri))
1221 INNER JOIN b_sec_iprule_incl_mask im on im.IPRULE_ID = r.ID
1222 LEFT JOIN b_sec_iprule_excl_mask em on em.IPRULE_ID = r.ID AND '".$DB->ForSQL(
$uri).
"' like em.LIKE_MASK
1223 INNER JOIN b_sec_iprule_incl_ip ii on ii.IPRULE_ID = r.ID
1224 LEFT JOIN b_sec_iprule_excl_ip ei on ei.IPRULE_ID = r.ID AND ".$ip2check.
" between ei.IP_START and ei.IP_END
1227 AND (r.ACTIVE_FROM IS NULL OR r.ACTIVE_FROM <= ".
$DB->CurrentTimeFunction().
")
1228 AND (r.ACTIVE_TO IS NULL OR r.ACTIVE_TO >= ".
$DB->CurrentTimeFunction().
")
1230 "AND r.ADMIN_SECTION = 'Y'":
1231 "AND (r.SITE_ID IS NULL OR r.SITE_ID = '".$DB->ForSQL(
SITE_ID).
"')"
1233 AND '".
$DB->ForSQL(
$uri).
"' like im.LIKE_MASK
1234 AND em.IPRULE_ID is null
1235 AND ".$ip2check.
" between ii.IP_START and ii.IP_END
1236 AND ei.IPRULE_ID is null
1239 $rs =
$DB->Query($strSql);
1241 if($arRule =
$rs->Fetch())
1248 include(
$_SERVER[
"DOCUMENT_ROOT"].
"/bitrix/admin/security_403.php");
1255 if (trim(
$uri) ==
'')
1258 if (mb_strpos(
$uri,
"\0") !==
false)
1261 if (mb_strpos(
$uri,
'/./') !==
false)
1264 if (mb_strpos(
$uri,
'/') !== 0)
1275 $agentName =
"CSecurityIPRule::CleanUpAgent();";
1277 $activeTo = ConvertTimeStamp(time() - $cleanupDays*24*60*60,
"FULL");
1284 "=RULE_TYPE" =>
"A",
1285 "<=ACTIVE_TO" => $activeTo,
1289 while(
$ar =
$rs->Fetch())
static isPathTraversalUri($url)
static GetRuleExclIPs($IPRULE_ID)
static GetRuleInclIPs($IPRULE_ID)
static GetRuleInclMasks($IPRULE_ID)
static GetRuleExclMasks($IPRULE_ID)
static SetActive($bActive=false, $end_time=0)
CheckFields(&$arFields, $ID)
static CheckAntiFile($return_message=false)
static OnPageStart($use_query=false)
static DeleteRuleExclFiles($files)
static GetList($arSelect, $arFilter, $arOrder)
static AddRuleExclFiles($files)
static GetRuleExclFiles($files)
CheckIP($arInclIPs=false, $arExclIPs=false)
static UpdateRuleMasks($IPRULE_ID, $arInclMasks=false, $arExclMasks=false)
UpdateRuleIPs($IPRULE_ID, $arInclIPs=false, $arExclIPs=false)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
$_SERVER["DOCUMENT_ROOT"]
if(file_exists($_SERVER['DOCUMENT_ROOT'] . "/urlrewrite.php")) $uri
RegisterModuleDependences($FROM_MODULE_ID, $MESSAGE_ID, $TO_MODULE_ID, $TO_CLASS="", $TO_METHOD="", $SORT=100, $TO_PATH="", $TO_METHOD_ARG=[])
UnRegisterModuleDependences($FROM_MODULE_ID, $MESSAGE_ID, $TO_MODULE_ID, $TO_CLASS="", $TO_METHOD="", $TO_PATH="", $TO_METHOD_ARG=[])
GetModuleEvents($MODULE_ID, $MESSAGE_ID, $bReturnArray=false)
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
GetMessage($name, $aReplace=null)
MakeTimeStamp($datetime, $format=false)
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
</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."%"