1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
options.php
См. документацию.
1
<?
2
3
$module_id
=
"b24connector"
;
4
5
use
Bitrix\Main\Loader
;
6
use
Bitrix\Main\Localization\Loc
;
7
use
Bitrix\B24Connector\Connection
;
8
use Bitrix\Main\Page\Asset;
9
10
$moduleAccess
=
$APPLICATION
->GetGroupRight(
$module_id
);
11
12
if
(
$moduleAccess
>=
"W"
):
13
18
19
Loader::includeModule(
$module_id
);
20
IncludeModuleLangFile
(
$_SERVER
[
"DOCUMENT_ROOT"
].
BX_ROOT
.
"/modules/main/options.php"
);
21
IncludeModuleLangFile
(__FILE__);
22
23
$aTabs
=
array
(
24
array
(
"DIV"
=>
"edit1"
,
"TAB"
=> Loc::getMessage(
"B24C_OPTIONS"
),
"ICON"
=>
""
,
"TITLE"
=> Loc::getMessage(
"B24C_OPTIONS"
)),
25
array
(
"DIV"
=>
"edit2"
,
"TAB"
=> Loc::getMessage(
"MAIN_TAB_RIGHTS"
),
"ICON"
=>
""
,
"TITLE"
=> Loc::getMessage(
"MAIN_TAB_TITLE_RIGHTS"
))
26
);
27
28
$tabControl
=
new
CAdminTabControl
(
"tabControl"
,
$aTabs
);
29
30
if
(
$_SERVER
[
"REQUEST_METHOD"
] ==
"POST"
&&
$_REQUEST
[
"Update"
] !=
""
&&
check_bitrix_sessid
())
31
{
32
if
(isset(
$_REQUEST
[
"disconnect"
]) &&
$_REQUEST
[
"disconnect"
] ==
'Y'
)
33
Connection::delete();
34
35
ob_start();
36
require_once(
$_SERVER
[
"DOCUMENT_ROOT"
].
"/bitrix/modules/main/admin/group_rights.php"
);
37
ob_end_clean();
38
39
if
(
$_REQUEST
[
"back_url_settings"
] <>
''
)
40
LocalRedirect
(
$_REQUEST
[
"back_url_settings"
]);
41
42
LocalRedirect
(
$APPLICATION
->GetCurPage().
"?mid="
.urlencode(
$module_id
).
"&lang="
.urlencode(LANGUAGE_ID).
"&"
.
$tabControl
->ActiveTabParam());
43
}
44
45
\Bitrix\Main\UI\Extension::load
([
46
"main.core"
,
47
"ui.design-tokens"
48
]);
49
50
Asset::getInstance()->addString(
'<link rel="stylesheet" type="text/css" href="/bitrix/css/b24connector/style.css">'
);
51
Asset::getInstance()->addJs(
"/bitrix/js/b24connector/connector.js"
);
52
53
$tabControl
->Begin();
54
?>
55
<form method=
"post"
action=
"<?echo $APPLICATION->GetCurPage()?>?mid=<?=urlencode($module_id)?>&lang=<?=LANGUAGE_ID?>"
>
56
<?
$tabControl
->BeginNextTab();?>
57
58
<?
if
(Connection::isExist()):?>
59
<tr>
60
<td
width
=
"40%"
><?=Loc::getMessage(
'B24C_CONNECTED'
)?>:</td>
61
<td
width
=
"60%"
>
62
<input type=
"text"
name=
"b24_host"
value=
"<?=\Bitrix\B24Connector\Connection::getDomain()?>"
disabled
>
63
</td>
64
</tr>
65
<tr>
66
<td
width
=
"40%"
><?=Loc::getMessage(
'B24C_DISCONNECT'
)?>:</td>
67
<td
width
=
"60%"
>
68
<input type=
"checkbox"
name=
"disconnect"
value=
"Y"
>
69
</td>
70
</tr>
71
<?
else
:?>
72
<tr>
73
<td colspan=
"2"
>
74
<?=Connection::getOptionButtonHtml(Loc::getMessage(
'B24C_CONNECT'
))?>
75
</td>
76
</tr>
77
<?
endif
;?>
78
79
<?
$tabControl
->BeginNextTab();?>
80
<?require_once(
$_SERVER
[
"DOCUMENT_ROOT"
].
"/bitrix/modules/main/admin/group_rights.php"
);?>
81
82
<?
$tabControl
->Buttons();?>
83
<input type=
"submit"
name=
"Update"
value=
"<?=GetMessage("
MAIN_SAVE
")?>"
title
=
"<?=GetMessage("
MAIN_OPT_SAVE_TITLE
")?>"
class
=
"adm-btn-save"
>
84
<?=
bitrix_sessid_post
();?>
85
<?
if
(
$_REQUEST
[
"back_url_settings"
] <>
''
):?>
86
<input type=
"button"
name=
"Cancel"
value=
"<?=GetMessage("
MAIN_OPT_CANCEL
")?>"
onclick=
"window.location='<?echo htmlspecialcharsbx(CUtil::addslashes($_REQUEST["
back_url_settings
"]))?>'"
>
87
<input type=
"hidden"
name=
"back_url_settings"
value=
"<?=htmlspecialcharsbx($_REQUEST["
back_url_settings
"])?>"
>
88
<?
endif
;?>
89
<?
$tabControl
->End();?>
90
</form>
91
92
<?
endif
;?>
$moduleAccess
$moduleAccess
Определения
options.php:10
BX_ROOT
const BX_ROOT
Определения
bx_root.php:3
$APPLICATION
global $APPLICATION
Определения
include.php:80
$module_id
$module_id
Определения
options.php:6
Bitrix\B24Connector\Connection
Определения
connection.php:19
Bitrix\Main\Loader
Определения
loader.php:13
Bitrix\Main\Localization\Loc
Определения
loc.php:12
Bitrix\Main\UI\Extension\load
static load($extNames)
Определения
extension.php:16
CAdminTabControl
Определения
admin_tabcontrol.php:14
width
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
Определения
file_new.php:677
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
disabled
Form FILTER_ACTION disabled
Определения
options.php:358
$_REQUEST
$_REQUEST["admin_mnu_menu_id"]
Определения
get_menu.php:8
$_SERVER
$_SERVER["DOCUMENT_ROOT"]
Определения
cron_frame.php:9
$tabControl
$tabControl
Определения
csv_new_setup.php:244
$aTabs
$aTabs
Определения
csv_new_setup.php:238
endif
endif
Определения
csv_new_setup.php:990
bitrix_sessid_post
bitrix_sessid_post($varname='sessid', $returnInvocations=false)
Определения
tools.php:4700
check_bitrix_sessid
check_bitrix_sessid($varname='sessid')
Определения
tools.php:4686
IncludeModuleLangFile
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения
tools.php:3778
LocalRedirect
LocalRedirect($url, $skip_security_check=false, $status="302 Found")
Определения
tools.php:4005
title
<? endif;?> window document title
Определения
prolog_main_admin.php:76
bitrix
modules
b24connector
options.php
Создано системой
1.14.0