1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
options.php
См. документацию.
1<?php
2
3if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
4{
5 die();
6}
7
10
11IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'].BX_ROOT.'/modules/pull/options.php');
12IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'].BX_ROOT.'/modules/main/options.php');
13
14$module_id = 'pull';
16
19
20include($_SERVER['DOCUMENT_ROOT'].BX_ROOT.'/modules/pull/default_option.php');
22
24 array(
25 "DIV" => "edit1",
26 "TAB" => Loc::getMessage("PULL_TAB_SETTINGS"),
27 "ICON" => "pull_path",
28 "TITLE" => Loc::getMessage("PULL_TAB_TITLE_SETTINGS"),
29 ),
30);
31$tabControl = new CAdminTabControl("tabControl", $aTabs);
33if (
34 $_POST['Update'].$_GET['RestoreDefaults'] <> ''
36 && $MOD_RIGHT >= 'W'
37)
38{
39 if($_GET['RestoreDefaults'] <> '')
40 {
41 $arDefValues = $arDefaultValues['default'];
42 foreach($arDefValues as $key=>$value)
43 {
44 COption::RemoveOption("pull", $key);
45 }
46 COption::RemoveOption("pull", 'exclude_sites');
47 }
48 elseif($_POST['Update'] <> '')
49 {
50 if ($_POST['push_server_mode'] === 'N')
51 {
52 if (CPullOptions::GetQueueServerStatus())
53 {
54 CPullOptions::SendConfigDie();
55 CPullOptions::SetQueueServerStatus('N');
56 }
57 CPullOptions::SetQueueServerMode(CPullOptions::SERVER_MODE_PERSONAL);
58 SharedServer\Config::setRegistered(false);
59 }
60 else if ($_POST['push_server_mode'] === CPullOptions::SERVER_MODE_SHARED)
61 {
62 if(!CPullOptions::IsServerShared())
63 {
64 CPullOptions::SendConfigDie();
65 CPullOptions::SetQueueServerMode(\CPullOptions::SERVER_MODE_SHARED);
66 }
67
68 if(!SharedServer\Config::isRegistered())
69 {
70 // try to register
71 $preferredServer = $_POST["cloud_server_hostname"] ?? "";
72 $registerResult = \Bitrix\Pull\SharedServer\Client::register($preferredServer);
73 if($registerResult->isSuccess())
74 {
75 CPullOptions::SetQueueServerStatus("Y");
76 CPullOptions::SetConfigTimestamp();
77 }
78 else
79 {
80 $registrationErrors = $registerResult->getErrorMessages();
81 }
82 }
83 }
84 else
85 {
86 if(CPullOptions::IsServerShared())
87 {
88 CPullOptions::SendConfigDie();
89 CPullOptions::SetQueueServerMode(CPullOptions::SERVER_MODE_PERSONAL);
90 }
91
92 CPullOptions::SetQueueServerStatus('Y');
93 SharedServer\Config::setRegistered(false);
94 if (CPullOptions::GetSignatureKey() != $_POST['signature_key'] && $_POST['nginx_version'] > 2)
95 {
96 CPullOptions::SetSignatureKey($_POST['signature_key']);
97 }
98 if ($_POST['path_to_publish'] != "" && CPullOptions::GetPublishUrl() != $_POST['path_to_publish'])
99 {
100 CPullOptions::SetPublishUrl($_POST['path_to_publish']);
101 }
102 if ($_POST['path_to_json_rpc'] != "" && CPullOptions::GetJsonRpcUrl() != $_POST['path_to_json_rpc'])
103 {
104 CPullOptions::SetJsonRpcUrl($_POST['path_to_json_rpc']);
105 }
106 if ($_POST['path_to_modern_listener'] != "" && CPullOptions::GetListenUrl("") != $_POST['path_to_modern_listener'])
107 {
108 CPullOptions::SetListenUrl($_POST['path_to_modern_listener']);
109 }
110 if ($_POST['path_to_modern_listener_secure'] != "" && CPullOptions::GetListenSecureUrl("") != $_POST['path_to_modern_listener_secure'])
111 {
112 CPullOptions::SetListenSecureUrl($_POST['path_to_modern_listener_secure']);
113 }
114 if ($_POST['path_to_publish_web'] != "" && CPullOptions::GetPublishWebUrl() != $_POST['path_to_publish_web'])
115 {
116 CPullOptions::SetPublishWebUrl($_POST['path_to_publish_web']);
117 }
118 if ($_POST['path_to_publish_web_secure'] != "" && CPullOptions::GetPublishWebSecureUrl() != $_POST['path_to_publish_web_secure'])
119 {
120 CPullOptions::SetPublishWebSecureUrl($_POST['path_to_publish_web_secure']);
121 }
122 if ($_POST['nginx_version'] != "" && CPullOptions::GetQueueServerVersion() != $_POST['nginx_version'])
123 {
124 CPullOptions::SetQueueServerVersion($_POST['nginx_version']);
125 }
126
127 if (isset($_POST['websocket']) || CPullOptions::GetQueueServerVersion() > 2)
128 {
129 CPullOptions::SetWebSocket('Y');
130 }
131 else
132 {
133 CPullOptions::SetWebSocket('N');
134 }
135 if ($_POST['path_to_websocket'] != "" && CPullOptions::GetWebSocketUrl() != $_POST['path_to_websocket'])
136 {
137 CPullOptions::SetWebSocketUrl($_POST['path_to_websocket']);
138 }
139 if ($_POST['path_to_websocket_secure'] != "" && CPullOptions::GetWebSocketSecureUrl() != $_POST['path_to_websocket_secure'])
140 {
141 CPullOptions::SetWebSocketSecureUrl($_POST['path_to_websocket_secure']);
142 }
143 }
144
145 CPullOptions::SetConfigTimestamp();
146 CPullOptions::SendConfigDie();
147
148 if (isset($_POST['push']))
149 {
150 if (!CPullOptions::GetPushStatus())
151 CPullOptions::SetPushStatus('Y');
152 }
153 else
154 {
155 if (CPullOptions::GetPushStatus())
156 CPullOptions::SetPushStatus('N');
157 }
158
159 if ($_POST['push_message_per_hit'] != "")
160 {
161 CPullOptions::SetPushMessagePerHit($_POST['push_message_per_hit']);
162 }
163
164 if (isset($_POST['guest']))
165 {
166 if (!CPullOptions::GetGuestStatus())
167 CPullOptions::SetGuestStatus('Y');
168 }
169 else
170 {
171 if (CPullOptions::GetGuestStatus())
172 CPullOptions::SetGuestStatus('N');
173 }
174
175 if (isset($_POST['exclude_sites']))
176 {
177 $arSites = Array();
178 foreach ($_POST['exclude_sites'] as $site)
179 {
181 if ($site == '')
182 continue;
183
185 }
186 CPullOptions::SetExcludeSites($arSites);
187 }
188 }
189}
190?>
191<form method="post" action="<?= $APPLICATION->GetCurPage()?>?mid=<?=htmlspecialcharsbx($mid)?>&lang=<?= LANG?>">
192<?= bitrix_sessid_post()?>
193<?php
194$tabControl->Begin();
195$tabControl->BeginNextTab();
196
199$ar = CPullOptions::GetDependentModule();
200foreach ($ar as $key => $value)
201 $arDependentModule[] = $value['MODULE_ID'];
202
203
204$dbSites = CSite::GetList('', '', Array("ACTIVE" => "Y"));
207while ($site = $dbSites->Fetch())
208{
209 $site["ID"] = htmlspecialcharsbx($site["ID"]);
210 $site["NAME"] = htmlspecialcharsbx($site["NAME"]);
211 $arSites[$site["ID"]] = $site;
212}
213$arExcludeSites = CPullOptions::GetExcludeSites();
214?>
215 <tr>
216 <td width="40%"><?=Loc::getMessage("PULL_OPTIONS_STATUS")?>:</td>
217 <td width="60%">
218 <? if(CPullOptions::ModuleEnable()): ?>
219 <span style="color:green; font-weight: bold"><?=Loc::getMessage("PULL_OPTIONS_STATUS_Y")?></span>
220 <? else: ?>
221 <span style="color:gray; font-weight: bold"><?=Loc::getMessage("PULL_OPTIONS_STATUS_N")?></span>
222 <? endif; ?>
223 </td>
224 </tr>
225<? if(CPullOptions::ModuleEnable()): ?>
226 <tr>
227 <td width="40%"><?=Loc::getMessage("PULL_OPTIONS_USE")?>:</td>
228 <td width="60%"><?=implode(", ", $arDependentModule)?></td>
229 </tr>
230<?endif;?>
231 <tr>
232 <td width="40%"></td>
233 <td width="60%"></td>
234 </tr>
235 <tr>
236 <td align="right" width="50%"><?=Loc::getMessage("PULL_OPTIONS_PUSH")?>:</td>
237 <td><input id="push_enable" type="checkbox" size="40" value="Y" <?=(CPullOptions::GetPushStatus()?' checked':'')?> name="push"></td>
238 </tr>
239 <tr>
240 <td align="right" width="50%"><?= Loc::getMessage("PULL_BATCH_MAX_COUNT_MESSAGES");?>:</td>
241 <td><input id="push_message_per_hit" type="text" size="10" value="<?=\CPullOptions::GetPushMessagePerHit()?>" name="push_message_per_hit" <?=(!CPullOptions::GetPushStatus()?' disabled':'')?>></td>
242 </tr>
243 <tr>
244 <td align="right" width="50%" valign="top"><?=Loc::getMessage("PULL_OPTIONS_GUEST")?>:</td>
245 <td><input type="checkbox" size="40" value="Y" <?=(CPullOptions::GetGuestStatus()?' checked':'')?> <?=(IsModuleInstalled('statistic')?'':' disabled="true')?> name="guest" title="<?=htmlspecialcharsEx(Loc::getMessage("PULL_OPTIONS_GUEST_DESC"))?>"></td>
246 </tr>
247 <tr>
248 <td width="40%"></td>
249 <td width="60%"></td>
250 </tr>
251 <tr>
252 <td width="40%"><nobr><?=Loc::getMessage("PULL_OPTIONS_USE_PUSH_SERVER")?></nobr>:</td>
253 <td width="60%">
254 <select id="push_server_mode" name="push_server_mode">
255 <option value="N" <?=(!\CPullOptions::IsServerShared() && !\CPullOptions::GetQueueServerStatus() ? "selected" : "")?>>
256 <?= Loc::getMessage("PULL_OPTIONS_DO_NOT_USE_PUSH_SERVER") ?>
257 </option>
258 <option value="<?=\CPullOptions::SERVER_MODE_SHARED?>" <?=(\CPullOptions::IsServerShared() ? "selected" : "")?>>
259 <?= Loc::getMessage("PULL_OPTIONS_USE_CLOUD_SERVER") ?>
260 </option>
261 <option value="<?=\CPullOptions::SERVER_MODE_PERSONAL?>" <?=(!\CPullOptions::IsServerShared() && \CPullOptions::GetQueueServerStatus() ? "selected" : "")?>>
262 <?= Loc::getMessage("PULL_OPTIONS_USE_LOCAL_SERVER") ?>
263 </option>
264 </select>
265 </td>
266 </tr>
267 <tbody id="pull_disabled" style="<?= \CPullOptions::IsServerShared() || \CPullOptions::GetQueueServerStatus() ? "display: none" : ""?>">
268 <tr>
269 <td colspan="2" align="center">
270 <?= BeginNote() ?>
271 <?= Loc::getMessage("PULL_OPTIONS_PUSH_SERVER_IS_REQUIRED")?>
272 <?= EndNote() ?>
273 </td>
274 </tr>
275 <tbody id="pull_cloud_settings" style="<?= \CPullOptions::IsServerShared() ? "" : "display: none"?>">
276 <tr>
277 <td align="right"><?=Loc::getMessage("PULL_OPTIONS_CLOUD_SERVER_REGISTRATION")?>:</td>
278 <td>
279 <? if (SharedServer\Config::isRegistered()): ?>
280 <span style="color:green; font-weight: bold"><?= Loc::getMessage("PULL_OPTIONS_CLOUD_REGISTRATION_ACTIVE")?></span>
281 <? else: ?>
282 <? if (count($registrationErrors) > 0): ?>
283 <span style="color:red; font-weight: bold;"><?= Loc::getMessage("PULL_OPTIONS_CLOUD_REGISTRATION_ERROR") ?>: <?=htmlspecialcharsbx($registrationErrors[0])?></span>
284 <? else: ?>
285 <span style="color:red; font-weight: bold;"><?= Loc::getMessage("PULL_OPTIONS_CLOUD_REGISTRATION_INACTIVE")?></span>
286 <? endif ?>
287 <? endif ?>
288 </td>
289 </tr>
290 <? if (SharedServer\Config::isRegistered()): ?>
291 <tr>
292 <td align="right"><?=Loc::getMessage("PULL_OPTIONS_CLOUD_SERVER_ADDRESS")?>:</td>
293 <td><?=htmlspecialcharsbx(SharedServer\Config::getServerAddress())?></td>
294 </tr>
295 <? else: ?>
296 <tr>
297 <td align="right"><?=Loc::getMessage("PULL_OPTIONS_REGISTER_ON_CLOUD_SERVER")?>:</td>
298 <td>
299 <? $cloudServerResult = SharedServer\Client::getServerList();?>
300 <? if($cloudServerResult->isSuccess()): ?>
301 <select name="cloud_server_hostname">
302 <option value="">
303 <?=Loc::getMessage("PULL_OPTIONS_CLOUD_SERVER_ADDRESS_AUTO_SELECT")?>
304 </option>
305 <? foreach ($cloudServerResult->getData()['serverList'] as $server): ?>
306 <option value="<?= htmlspecialcharsbx($server['url'])?>">
307 <?= htmlspecialcharsbx($server['url'] . " (" . $server['region']. ")") ?>
308 </option>
309 <? endforeach ?>
310 </select>
311 <? else: ?>
312 <span style="color:red;"><?=Loc::getMessage("PULL_OPTIONS_CLOUD_SERVER_ADDRESS_LIST_ERROR", ["#HOST#" => SharedServer\Config::getDefaultServer()])?></span>
313 <? endif ?>
314 </td>
315 </tr>
316 <? if ($MOD_RIGHT >= 'W'): ?>
317 <tr>
318 <td></td>
319 <td >
320 <input type="submit" name="Update" value="<?= Loc::getMessage('PULL_OPTIONS_CLOUD_SERVER_REGISTER')?>" class="adm-btn-save">
321 </td>
322 </tr>
323 <? endif ?>
324 <? endif ?>
325 <tr>
326 <td colspan="2" align="center">
327 <?= BeginNote()?>
328 <?= Loc::getMessage("PULL_OPTIONS_CLOUD_ACTIVE_KEY_REQUIRED")?>
329 <?= EndNote()?>
330 </td>
331 </tr>
332 <tbody id="pull_local_settings" style="<?= \CPullOptions::IsServerShared() || !CPullOptions::GetQueueServerStatus() ? "display: none" : ""?>">
333 <tr>
334 <td width="40%" valign="top" style="padding-top:9px"><nobr><?=Loc::getMessage("PULL_OPTIONS_NGINX_VERSION")?></nobr>:</td>
335 <td width="60%">
336 <nobr>
337 <label>
338 <input type="radio" id="config_nginx_version_4" value="4" name="nginx_version" <?=(CPullOptions::GetQueueServerVersion() == 4?' checked':'')?>>
339 <?=Loc::getMessage("PULL_OPTIONS_NGINX_VERSION_730_2")?>
340 </label>
341 </nobr>
342 <?php if (defined('PULL_ALLOW_VERSION_5')): ?>
343 <nobr>
344 <label>
345 <input type="radio" id="config_nginx_version_5" value="5" name="nginx_version" <?=(CPullOptions::GetQueueServerVersion() == 5?' checked':'')?>>
346 <?=Loc::getMessage("PULL_OPTIONS_NGINX_VERSION_760")?>
347 </label>
348 </nobr>
349 <?php endif; ?>
350 </td>
351 </tr>
352 <tr>
353 <td colspan="2" align="center">
354 <?= BeginNote(); ?>
355 <?=Loc::getMessage('PULL_NOTIFY_DEPRECATED');?>
356 <?= EndNote(); ?>
357 </td>
358 </tr>
359 <tr class="heading">
360 <td colspan="2"><b><?=Loc::getMessage('PULL_OPTIONS_HEAD_PUB_2')?></b></td>
361 </tr>
362 <tr>
363 <td><?=Loc::getMessage("PULL_OPTIONS_PATH_TO_PUBLISH")?>:</td>
364 <td><input id="config_path_to_publish" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetPublishUrl())?>" name="path_to_publish"></td>
365 </tr>
366 <tr>
367 <td><?=Loc::getMessage("PULL_OPTIONS_PATH_TO_JSON_RPC")?>:</td>
368 <td><input id="config_path_to_json_rpc" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetJsonRpcUrl())?>" name="path_to_json_rpc"></td>
369 </tr>
370 <tr>
371 <td><?=Loc::getMessage("PULL_OPTIONS_SIGNATURE_KEY")?>:</td>
372 <td><input id="config_signature_key" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetSignatureKey())?>" name="signature_key" <?=(CPullOptions::GetQueueServerVersion() > 2? '':'disabled="true"')?>></td>
373 </tr>
374 <tr>
375 <td></td>
376 <td><div id="config_signature_key_error" style="color: darkred; font-weight: bold; <?=(CPullOptions::GetQueueServerStatus() && CPullOptions::GetQueueServerVersion() > 3 && !CPullOptions::GetSignatureKey()? '':'display: none')?>"><b><?=Loc::getMessage('PULL_OPTIONS_SIGNATURE_KEY_ERROR')?></b></div></td>
377 </tr>
378 <tr class="heading">
379 <td colspan="2"><b><?=Loc::getMessage('PULL_OPTIONS_PUBLISH_WEB_HEAD')?></b></td>
380 </tr>
381 <tr>
382 <td ><?=Loc::getMessage("PULL_OPTIONS_PATH_TO_PUBLISH_WEB")?>:</td>
383 <td><input id="config_path_to_publish_web" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetPublishWebUrl())?>" name="path_to_publish_web" <?=(CPullOptions::GetQueueServerVersion() > 3? '': 'disabled="true"')?>></td>
384 </tr>
385 <tr>
386 <td ><?=Loc::getMessage("PULL_OPTIONS_PATH_TO_PUBLISH_WEB_SECURE")?>:</td>
387 <td><input id="config_path_to_publish_web_secure" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetPublishWebSecureUrl())?>" name="path_to_publish_web_secure" <?=(CPullOptions::GetQueueServerVersion() > 3? '': 'disabled="true"')?>></td>
388 </tr>
389 <tr>
390 <td width="40%"></td>
391 <td width="60%">
392 <?=Loc::getMessage("PULL_OPTIONS_PUBLISH_WEB_DESC")?>
393 </td>
394 </tr>
395 <tr class="heading">
396 <td colspan="2"><b><?=Loc::getMessage('PULL_OPTIONS_HEAD_SUB_MODERN')?></b></td>
397 </tr>
398 <tr>
399 <td ><?=Loc::getMessage("PULL_OPTIONS_PATH_TO_LISTENER")?>:</td>
400 <td><input id="config_path_to_modern_listener" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetListenUrl())?>" name="path_to_modern_listener"></td>
401 </tr>
402 <tr>
403 <td ><?=Loc::getMessage("PULL_OPTIONS_PATH_TO_LISTENER_SECURE")?>:</td>
404 <td><input id="config_path_to_modern_listener_secure" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetListenSecureUrl())?>" name="path_to_modern_listener_secure"></td>
405 </tr>
406 <tr class="heading">
407 <td colspan="2"><b><?=Loc::getMessage('PULL_OPTIONS_HEAD_SUB_WS')?></b></td>
408 </tr>
409 <tr>
410 <td align="right" width="50%"><?=Loc::getMessage("PULL_OPTIONS_WEBSOCKET")?>:</td>
411 <td><input type="checkbox" size="40" value="Y" <?=(CPullOptions::GetWebSocket()?' checked':'')?> id="config_websocket" name="websocket" <?=(CPullOptions::GetQueueServerVersion() == 2? '': 'disabled="true"')?>></td>
412 </tr>
413 <tr>
414 <td ><?=Loc::getMessage("PULL_OPTIONS_PATH_TO_LISTENER")?>:</td>
415 <td><input id="config_path_to_websocket" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetWebSocketUrl())?>" name="path_to_websocket" <?=(!CPullOptions::GetWebSocketStatus() ? 'disabled="true"': '')?></td>
416 </tr>
417 <tr>
418 <td ><?=Loc::getMessage("PULL_OPTIONS_PATH_TO_LISTENER_SECURE")?>:</td>
419 <td><input id="config_path_to_websocket_secure" type="text" size="40" value="<?=htmlspecialcharsbx(CPullOptions::GetWebSocketSecureUrl())?>" name="path_to_websocket_secure" <?=(!CPullOptions::GetWebSocketStatus() ? 'disabled="true"': '')?></td>
420 </tr>
421 <tr>
422 <td width="40%"></td>
423 <td width="60%">
424 <?=Loc::getMessage("PULL_OPTIONS_WEBSOCKET_DESC")?>
425 </td>
426 </tr>
427 <?if (count($arSites) > 1 || count($arExcludeSites) > 0):?>
428 <tbody id="pull_disabled_sites">
429 <tr class="heading">
430 <td colspan="2"><b><?=Loc::getMessage('PULL_OPTIONS_HEAD_BLOCK')?></b></td>
431 </tr>
432 <tr valign="top">
433 <td><?=Loc::getMessage("PULL_OPTIONS_SITES")?>:</td>
434 <td>
435 <select name="exclude_sites[]" multiple size="4">
436 <option value=""></option>
437 <?foreach($arSites as $site):?>
438 <option value="<?=$site['ID']?>" <?=(isset($arExcludeSites[$site['ID']])?' selected':'')?>><? echo $site['NAME'].' ['.$site['ID'].']'?></option>
439 <?endforeach;?>
440 </select>
441 </td>
442 </tr>
443 </tbody>
444 <?endif;?>
445
446 <?$tabControl->Buttons();?>
447<script>
448BX.bind(BX('push_enable'), 'change', function(){
449 BX('push_message_per_hit').disabled = !this.checked;
450});
451
452BX.bind(BX('push_server_mode'), 'bxchange', function() {
453 var mode = this.value;
454 var disabledServerSection = BX("pull_disabled");
455 var sharedServerSettings = BX("pull_cloud_settings");
456 var localServerSettings = BX("pull_local_settings");
457 var disabledSites = BX("pull_disabled_sites");
458 if (mode == "N")
459 {
460 disabledServerSection.style.removeProperty("display");
461 sharedServerSettings.style.display = "none";
462 localServerSettings.style.display = "none";
463 if(disabledSites)
464 {
465 disabledSites.style.display = "none";
466 }
467 }
468 else if (mode == "<?=CPullOptions::SERVER_MODE_PERSONAL?>")
469 {
470 disabledServerSection.style.display = "none";
471 sharedServerSettings.style.display = "none";
472 localServerSettings.style.removeProperty("display");
473 if(disabledSites)
474 {
475 disabledSites.style.removeProperty("display");
476 }
477 }
478 else
479 {
480 disabledServerSection.style.display = "none";
481 sharedServerSettings.style.removeProperty("display");
482 localServerSettings.style.display = "none";
483 if(disabledSites)
484 {
485 disabledSites.style.removeProperty("display");
486 }
487 }
488});
489
490BX.bind(BX('config_nginx'), 'change', function(){
491 if (this.checked)
492 {
493 if (confirm("<?=GetMessageJS("PULL_OPTIONS_NGINX_CONFIRM")?>"))
494 {
495 BX('config_nginx_version_1').disabled = false;
496 BX('config_nginx_version_2').disabled = false;
497 BX('config_nginx_version_3').disabled = false;
498 BX('config_nginx_version_4').disabled = false;
499 BX('config_path_to_publish').disabled = false;
500 BX('config_path_to_json_rpc').disabled = false;
501 BX('config_path_to_modern_listener').disabled = false;
502 BX('config_path_to_modern_listener_secure').disabled = false;
503 BX('config_signature_key').disabled = false;
504
505 if (BX('config_nginx_version_2').checked || BX('config_nginx_version_3').checked || BX('config_nginx_version_4').checked)
506 {
507 BX('config_websocket').disabled = false;
508 BX('config_signature_key').disabled = BX('config_nginx_version_2').checked;
509
510 if (BX('config_websocket').checked || BX('config_nginx_version_3').checked)
511 {
512 BX('config_path_to_websocket').disabled = false;
513 BX('config_path_to_websocket_secure').disabled = false;
514 }
515 if (BX('config_nginx_version_3').checked || BX('config_nginx_version_4').checked)
516 {
517 BX('config_websocket').disabled = true;
518 }
519 if (BX('config_nginx_version_4').checked)
520 {
521 BX('config_path_to_publish_web').disabled = false;
522 BX('config_path_to_publish_web_secure').disabled = false;
523 BX.style(BX('config_signature_key_error'), 'display', BX('config_signature_key').value.toString().length>0? 'none': 'block');
524 }
525 else
526 {
527 BX('config_path_to_publish_web').disabled = true;
528 BX('config_path_to_publish_web_secure').disabled = true;
529 BX.style(BX('config_signature_key_error'), 'display', 'none');
530 }
531 }
532 else
533 {
534 BX('config_websocket').disabled = true;
535 BX('config_signature_key').disabled = true;
536 BX('config_path_to_websocket').disabled = true;
537 BX('config_path_to_websocket_secure').disabled = true;
538 BX('config_path_to_publish_web').disabled = true;
539 BX('config_path_to_publish_web_secure').disabled = true;
540 BX.style(BX('config_signature_key_error'), 'display', 'none');
541 }
542 }
543 else
544 {
545 this.checked = false;
546 BX.style(BX('config_signature_key_error'), 'display', 'none');
547 }
548 }
549 else
550 {
551 BX('config_nginx_version_1').disabled = true;
552 BX('config_nginx_version_2').disabled = true;
553 BX('config_nginx_version_3').disabled = true;
554 BX('config_nginx_version_4').disabled = true;
555 BX('config_signature_key').disabled = true;
556 BX('config_path_to_publish').disabled = true;
557 BX('config_path_to_json_rpc').disabled = true;
558 BX('config_path_to_modern_listener').disabled = true;
559 BX('config_path_to_modern_listener_secure').disabled = true;
560
561 BX('config_websocket').disabled = true;
562 BX('config_path_to_websocket').disabled = true;
563 BX('config_path_to_websocket_secure').disabled = true;
564 BX('config_path_to_publish_web').disabled = true;
565 BX('config_path_to_publish_web_secure').disabled = true;
566
567 BX.style(BX('config_signature_key_error'), 'display', 'none');
568 }
569});
570BX.bind(BX('config_nginx_version_1'), 'change', function(){
571
572 BX('config_signature_key').disabled = true;
573
574 BX('config_path_to_publish_web').disabled = true;
575 BX('config_path_to_publish_web_secure').disabled = true;
576
577 BX('config_websocket').disabled = true;
578 BX('config_websocket').checked = false;
579 BX('config_path_to_websocket').disabled = true;
580 BX('config_path_to_websocket_secure').disabled = true;
581
582 BX.style(BX('config_signature_key_error'), 'display', 'none');
583});
584BX.bind(BX('config_nginx_version_2'), 'change', function(){
585
586 BX('config_signature_key').disabled = true;
587
588 BX('config_path_to_publish_web').disabled = true;
589 BX('config_path_to_publish_web_secure').disabled = true;
590
591 BX('config_websocket').disabled = false;
592 if (BX('config_websocket').checked)
593 {
594 BX('config_path_to_websocket').disabled = false;
595 BX('config_path_to_websocket_secure').disabled = false;
596 }
597
598 BX.style(BX('config_signature_key_error'), 'display', 'none');
599});
600BX.bind(BX('config_nginx_version_3'), 'change', function(){
601
602 BX('config_signature_key').disabled = false;
603
604 BX('config_websocket').disabled = true;
605 BX('config_websocket').checked = true;
606 BX('config_path_to_websocket').disabled = false;
607 BX('config_path_to_websocket_secure').disabled = false;
608
609 BX('config_websocket').disabled = true;
610 BX('config_websocket').checked = true;
611 BX('config_path_to_websocket').disabled = false;
612 BX('config_path_to_websocket_secure').disabled = false;
613 BX('config_path_to_publish_web').disabled = true;
614 BX('config_path_to_publish_web_secure').disabled = true;
615
616 BX.style(BX('config_signature_key_error'), 'display', 'none');
617});
618
619BX.bind(BX('config_nginx_version_4'), 'change', function(){
620
621 BX('config_signature_key').disabled = false;
622 BX('config_path_to_json_rpc').disabled = true;
623
624 BX('config_websocket').disabled = true;
625 BX('config_websocket').checked = true;
626 BX('config_path_to_websocket').disabled = false;
627 BX('config_path_to_websocket_secure').disabled = false;
628
629 BX('config_path_to_websocket').disabled = false;
630 BX('config_path_to_websocket_secure').disabled = false;
631
632 BX('config_path_to_publish_web').disabled = false;
633 BX('config_path_to_publish_web_secure').disabled = false;
634
635 BX.style(BX('config_signature_key_error'), 'display', BX('config_signature_key').value.toString().length>0? 'none': 'block');
636});
637BX.bind(BX('config_nginx_version_5'), 'change', function(){
638
639 BX('config_signature_key').disabled = false;
640 BX('config_path_to_json_rpc').disabled = false;
641
642 BX('config_websocket').disabled = true;
643 BX('config_websocket').checked = true;
644 BX('config_path_to_websocket').disabled = false;
645 BX('config_path_to_websocket_secure').disabled = false;
646
647 BX('config_path_to_websocket').disabled = false;
648 BX('config_path_to_websocket_secure').disabled = false;
649
650 BX('config_path_to_publish_web').disabled = false;
651 BX('config_path_to_publish_web_secure').disabled = false;
652
653 BX.style(BX('config_signature_key_error'), 'display', BX('config_signature_key').value.toString().length>0? 'none': 'block');
654});
655BX.bind(BX('config_websocket'), 'change', function(){
656 if (this.checked)
657 {
658 BX('config_path_to_websocket').disabled = false;
659 BX('config_path_to_websocket_secure').disabled = false;
660 }
661 else
662 {
663 BX('config_path_to_websocket').disabled = true;
664 BX('config_path_to_websocket_secure').disabled = true;
665 }
666});
667BX.bind(BX('config_signature_key'), 'keyup', function() {
668 BX.style(BX('config_signature_key_error'), 'display', this.value.toString().length>0? 'none': 'block');
669});
670function RestoreDefaults()
671{
672 if(confirm('<?= AddSlashes(Loc::getMessage('MAIN_HINT_RESTORE_DEFAULTS_WARNING'))?>'))
673 window.location = "<?= $APPLICATION->GetCurPage()?>?RestoreDefaults=Y&lang=<?= LANG?>&mid=<?= urlencode($mid)."&".bitrix_sessid_get();?>";
674}
675</script>
676<input type="submit" name="Update" <?if ($MOD_RIGHT<'W') echo "disabled" ?> value="<?= Loc::getMessage('MAIN_SAVE')?>" class="adm-btn-save">
677<input type="reset" name="reset" value="<?= Loc::getMessage('MAIN_RESET')?>">
678<?=bitrix_sessid_post();?>
679<input type="button" <?if ($MOD_RIGHT<'W') echo "disabled" ?> title="<?= Loc::getMessage('MAIN_HINT_RESTORE_DEFAULTS')?>" OnClick="RestoreDefaults();" value="<?= Loc::getMessage('MAIN_RESTORE_DEFAULTS')?>">
680<?$tabControl->End();?>
681</form>
682<?=BeginNote();?>
683 <?=Loc::getMessage("PULL_OPTIONS_NGINX_DOC")?> <a href="<?=(LANGUAGE_ID == "ru"? "https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=41&LESSON_ID=2033": "https://www.bitrixsoft.com/support/training/course/index.php?COURSE_ID=26&LESSON_ID=5144")?>" target="_blank"><?=Loc::getMessage("PULL_OPTIONS_NGINX_DOC_LINK")?></a>.
684<?=EndNote();?>
685</div>
return select
Определения access_edit.php:440
$dbSites
Определения options.php:14
$arSites
Определения options.php:15
$aSubTabs
Определения options.php:16
const BX_ROOT
Определения bx_root.php:3
global $APPLICATION
Определения include.php:80
$module_id
Определения options.php:6
static includeModule($moduleName)
Определения loader.php:67
static register($preferredServer="", array $options=[])
Определения client.php:15
static ClearAgent()
Определения pull_options.php:600
$MOD_RIGHT
Определения options.php:11
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
Определения file_new.php:677
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
EndNote()
Определения filter_tools.php:601
BeginNote($sParams='', $sMessParams='')
Определения filter_tools.php:589
if(CIMConvert::ConvertCount() > 0) $arDefaultValues['default']
Определения options.php:26
$_SERVER["DOCUMENT_ROOT"]
Определения cron_frame.php:9
$tabControl
Определения csv_new_setup.php:244
$aTabs
Определения csv_new_setup.php:238
endif
Определения csv_new_setup.php:990
bitrix_sessid_post($varname='sessid', $returnInvocations=false)
Определения tools.php:4700
check_bitrix_sessid($varname='sessid')
Определения tools.php:4686
IsModuleInstalled($module_id)
Определения tools.php:5301
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения tools.php:2701
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
global_menu_<?echo $menu["menu_id"]?> adm main menu item icon adm main menu item text text adm main menu hover adm submenu menucontainer menu_id menu_id items_id items_id desktop menu_id block none adm global submenu<?=($subMenuDisplay=="block" ? " adm-global-submenu-active" :"")?> global_submenu_<?echo $menu["menu_id"]?> text MAIN_PR_ADMIN_FAV items adm submenu items wrap adm submenu items stretch wrap BX adminMenu itemsStretchScroll()"> <table class if (!empty( $menu["items"])) elseif ( $menu[ 'menu_id']=='desktop') if ( $menu[ 'menu_id']=='desktop') endforeach
Определения prolog_main_admin.php:255
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
<? endif;?> window document title
Определения prolog_main_admin.php:76
if(file_exists($_SERVER["DOCUMENT_ROOT"]."/bitrix/php_interface/pull.php")) $pull_default_option
Определения default_option.php:54
$ar
Определения options.php:199
while($site=$dbSites->Fetch()) $arExcludeSites
Определения options.php:213
$registrationErrors
Определения options.php:32
$arDependentModule
Определения options.php:198
if(empty($signedUserToken)) $key
Определения quickway.php:257
die
Определения quickway.php:367
font style
Определения invoice.php:442
font size
Определения invoice.php:442
</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."%"
Определения waybill.php:936
text align
Определения template.php:556
$site
Определения yandex_run.php:614
adm detail iblock types adm detail iblock list tr_SITE_ID display
Определения yandex_setup.php:388