7 public static function Init()
20 $trace_count =
count($aTrace);
21 $trace_current = $trace_count - 1;
22 for (
$i = 0;
$i < $trace_count;
$i++)
24 if (strtolower($aTrace[
$i][
'function']) ==
'includecomponent' && (($c = strtolower($aTrace[
$i][
'class'])) ==
'callmain' || $c ==
'cmain'))
31 $sSrcFile = $aTrace[$trace_current][
"file"];
32 $iSrcLine = intval($aTrace[$trace_current][
"line"]);
34 if ($iSrcLine > 0 && $sSrcFile !=
'')
36 $session_string = $sSrcFile
43 return md5($session_string);
68 $url_anchor = mb_strstr(
$url,
'#');
69 if ($url_anchor !==
false)
71 $url = mb_substr(
$url, 0, -mb_strlen($url_anchor));
74 $url .= str_contains(
$url,
'?') ?
'&' :
'?';
79 $url .=
'&AJAX_CALL=Y';
82 if ($url_anchor !==
false)
91 public static function GetLinkEx($real_url, $public_url,
$text, $container_id, $additional =
'')
95 $public_url = $real_url;
99 '<a href="%s" onclick="BX.ajax.insertToNode(\'%s\', \'%s\'); return false;" %s>%s</a>',
114 public static function GetForm($form_params, $container_id, $ajax_id, $bReplace =
true, $bShadow =
true)
116 static $rndGenerator =
null;
119 $rndGenerator = new \Bitrix\Main\Type\RandomSequence(
"BX_AJAX");
121 $rnd = $rndGenerator->randString(6);
123<form ' . trim($form_params) .
'><input type="hidden" name="' .
BX_AJAX_PARAM_ID .
'" id="' .
BX_AJAX_PARAM_ID .
'_' . $ajax_id .
'_' . $rnd .
'" value="' . $ajax_id .
'" /><input type="hidden" name="AJAX_CALL" value="Y" /><script>
124function _processform_' . $rnd .
'(){
127 var obForm = BX(\
'' .
BX_AJAX_PARAM_ID .
'_' . $ajax_id .
'_' . $rnd .
'\').form;
128 BX.bind(obForm, \
'submit\', function() {' .
CAjax::GetFormEventValue($container_id, $bReplace, $bShadow,
'"') .
'});
130 BX.removeCustomEvent(\'onAjaxSuccess\', _processform_' . $rnd .
');
133 _processform_
' . $rnd . '();
135 BX.addCustomEvent(\
'onAjaxSuccess\', _processform_' . $rnd .
');
139 public static function ClearForm($form_params, $ajax_id =
false)
143 return '<form ' . trim($form_params) .
'>';
148 return 'onsubmit="BX.ajax.submitComponentForm(this, \'' .
htmlspecialcharsbx(CUtil::JSEscape($container_id)) .
'\',
true);
"';
151 public static function GetFormEventValue($container_id, $bReplace = true, $bShadow = true, $event_delimiter = '\'')
153 $delimiter = $event_delimiter == '\'' ? '"' : '\
'';
154 return 'BX.ajax.submitComponentForm(this, ' . $delimiter . CUtil::JSEscape($container_id) . $delimiter .
', true)';
168 $pos = mb_strpos(
$str,
'view');
175 $str = str_replace([
"\r",
"\n"],
"", mb_substr(
$str, 4));
177 if (preg_match(
"'^(/bitrix/|http://|https://|ftp://)'i",
$str))
static getBackTrace($limit=0, $options=null, $skip=1)
static GetComponentID($componentName, $componentTemplate, $additionalID)
static GetLink($url, $text, $container_id, $additional='')
static GetFormEventValue($container_id, $bReplace=true, $bShadow=true, $event_delimiter='\'')
static GetSessionParam($ajax_id=false)
static ClearForm($form_params, $ajax_id=false)
static GetLinkEx($real_url, $public_url, $text, $container_id, $additional='')
static GetForm($form_params, $container_id, $ajax_id, $bReplace=true, $bShadow=true)
static AddSessionParam($url, $ajax_id=false)
static GetFormEvent($container_id)
const BX_AJAX_PARAM_ID(!defined('TAGGED_user_card_size'))
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
GetMessage($name, $aReplace=null)
</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."%"