1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
options.php
См. документацию.
1
<?
$RIGHTS
=
$GLOBALS
[
"APPLICATION"
]->GetGroupRight(
"photogallery"
);
2
if
(
$RIGHTS
>
"D"
):
3
IncludeModuleLangFile
(__FILE__);
4
$arSights
=
array
();
5
$counter
= 0;
6
$bVarsFromForm
=
false
;
7
8
$arSights
= @unserialize(COption::GetOptionString(
"photogallery"
,
"pictures"
), [
'allowed_classes'
=>
false
]);
9
if
(!is_array(
$arSights
))
10
$arSights
=
array
();
11
12
$arLangs
=
array
();
13
$db_res
=
CLanguage::GetList
();
14
while
(
$res
=
$db_res
->Fetch())
15
$arLangs
[
$res
[
"LID"
]] =
$res
;
16
//*****************************************************************************************************************
17
if
(
$_SERVER
[
'REQUEST_METHOD'
] ==
"POST"
&& ((
$save
??
null
) !=
""
|| ($apply ??
null
) !=
""
) && (
$RIGHTS
>=
"W"
) &&
check_bitrix_sessid
())
18
{
19
$arSights
=
array
();
20
if
(is_array(
$_REQUEST
[
"CODE"
] ??
null
))
21
{
22
foreach
(
$_REQUEST
[
"CODE"
] as
$key
=>
$val
)
23
{
24
$val
= mb_strtolower(trim(
$val
));
25
if
(preg_match(
"/[0-9]/"
, mb_substr(
$val
, 0, 1),
$matches
))
26
continue
;
27
28
if
(!empty(
$val
) && intval(
$_REQUEST
[
"SIZE"
][
$key
] ??
null
) > 0 && ((
$_REQUEST
[
"DROP"
][
$key
] ??
null
) !=
"Y"
))
29
{
30
$_REQUEST
[
"SIGHTS"
][
$key
] = (empty(
$_REQUEST
[
"SIGHTS"
][
$key
]) ?
$val
:
$_REQUEST
[
"SIGHTS"
][
$key
]);
31
$arSights
[] =
array
(
32
"size"
=> intval(
$_REQUEST
[
"SIZE"
][
$key
]),
33
"quality"
=> (intval(
$_REQUEST
[
"QUALITY"
][
$key
] ??
null
) <= 0 ? 95 : intval(
$_REQUEST
[
"QUALITY"
][
$key
])),
34
"title"
=>
$_REQUEST
[
"SIGHTS"
][
$key
],
35
"code"
=>
$val
);
36
}
37
}
38
}
39
COption::SetOptionString
(
"photogallery"
,
"pictures"
, serialize(
$arSights
));
40
41
if
($apply!=
""
)
42
LocalRedirect
(
"/bitrix/admin/settings.php?&lang="
.LANG.
"&back_url="
.urlencode(
$back_url
).
"&mid=photogallery"
);
43
elseif
(
$back_url
)
44
LocalRedirect
(
$back_url
);
45
else
46
LocalRedirect
(
"/bitrix/admin/settings.php?lang="
.LANG);
47
}
48
//*****************************************************************************************************************
49
?><form method=
"POST"
action=
"<?=$APPLICATION->GetCurPage()?>?mid=photogallery&lang=<?=LANGUAGE_ID?>"
id
=
"FORMACTION"
>
50
<input type=
"hidden"
name=
"back_url"
value=
"<?=htmlspecialcharsbx($back_url ?? null)?>"
/>
51
<?=
bitrix_sessid_post
()?><?
52
53
$aTabs
=
array
(
array
(
"DIV"
=>
"edit1"
,
"TAB"
=>
GetMessage
(
"MAIN_TAB_SET"
),
"TITLE"
=>
GetMessage
(
"MAIN_TAB_TITLE_SET"
)));
54
$tabControl
=
new
CAdminTabControl
(
"tabControl"
,
$aTabs
);
55
$tabControl
->Begin();
56
$tabControl
->BeginNextTab();
57
58
?>
59
<tr valign=
"top"
z><td
width
=
"50%"
><?=
GetMessage
(
"P_FONT"
)?>:</td><td
width
=
"50%"
><?
60
$arFiles
=
array
();
61
$path
= str_replace(
array
(
"\\"
,
"//"
),
"/"
, __DIR__.
"/fonts/"
);
62
CheckDirPath
(
$path
);
63
$handle
= opendir(
$path
);
64
$file_exist
=
false
;
65
if
(
$handle
)
66
{
67
while
($file = readdir(
$handle
))
68
{
69
if
($file ==
"."
|| $file ==
".."
|| !is_file(
$path
.$file))
70
continue
;
71
$file_exist
=
true
;
72
?><?=$file?><br/><?
73
}
74
}
75
if
(!
$file_exist
)
76
{
77
?><?=
GetMessage
(
"P_FONT_IS_NOT_EXISTS"
)?><br /><?
78
}
79
?>
80
<a href=
"/bitrix/admin/fileman_file_upload.php?path=/bitrix/modules/photogallery/fonts/"
><?=
GetMessage
(
"P_UPLOAD"
)?></a>
81
</td></tr>
82
83
<?
/*
84
<tr class="heading"><td colspan="2"><?=GetMessage("P_PICTURES")?><sup>1</sup>:</td></tr>
85
<tr><td align="center" colspan="2">
86
<table cellpadding="0" cellspacing="5">
87
<tr class="heading">
88
<td><?=GetMessage("P_TITLE")?></td>
89
<td><?=GetMessage("P_CODE")?><sup>2</sup></td>
90
<td><?=GetMessage("P_SIZE")?></td>
91
<td><?=GetMessage("P_QUALITY")?></td>
92
<td><?=GetMessage("P_DROP")?></td>
93
</tr><?
94
95
foreach ($arSights as $key => $val):
96
$counter++;
97
?><tr>
98
<td style="text-align: center !important;"><input type="text" name="SIGHTS[<?=$counter?>]" value="<?=htmlspecialcharsbx($val["title"])?>" /></td>
99
<td style="text-align: center !important;"><input type="text" name="CODE[<?=$counter?>]" value="<?=htmlspecialcharsbx($val["code"])?>" size="10" /></td>
100
<td style="text-align: center !important;"><input type="text" name="SIZE[<?=$counter?>]" value="<?=htmlspecialcharsbx($val["size"])?>" size="10" /></td>
101
<td style="text-align: center !important;"><input type="text" name="QUALITY[<?=$counter?>]" value="<?=htmlspecialcharsbx($val["quality"])?>" size="10" /></td>
102
<td style="text-align: center !important;"><input type="checkbox" name="DROP[<?=$counter?>]" value="Y" /></td>
103
</tr><?
104
endforeach;
105
for ($ii = 0; $ii < 5; $ii++):
106
$counter++;
107
?><tr>
108
<td style="text-align: center !important;"><input type="text" name="SIGHTS[<?=$counter?>]" value="" /></td>
109
<td style="text-align: center !important;"><input type="text" name="CODE[<?=$counter?>]" value="" size="10" /></td>
110
<td style="text-align: center !important;"><input type="text" name="SIZE[<?=$counter?>]" value="" size="10" /></td>
111
<td style="text-align: center !important;"><input type="text" name="QUALITY[<?=$counter?>]" value="95" size="10" /></td>
112
<td style="text-align: center !important;"></td>
113
</tr><?
114
endfor;
115
?>
116
</table></td></tr><?*/
117
$tabControl
->Buttons(
118
array
(
119
"disabled"
=>
$RIGHTS
<
"W"
,
120
"back_url"
=>(empty(
$back_url
) ?
"settings.php?lang="
.LANG :
$back_url
)));
121
$tabControl
->End();
122
?></form>
123
<?=
BeginNote
();?>
124
<?=str_replace(
125
array
(
126
"#FILEMAN_ADMIN#"
,
127
"#FILEMAN_FILE_UPLOAD#"
),
128
array
(
129
"/bitrix/admin/fileman_admin.php?site=&path=/bitrix/modules/photogallery/fonts/"
,
130
"/bitrix/admin/fileman_file_upload.php?path=/bitrix/modules/photogallery/fonts/"
),
131
Getmessage(
"P_FONTS_NOTE"
))?>
132
133
<?=
EndNote
();?>
134
<?
/*
135
<?=BeginNote();?>
136
<sup>1</sup> <?=GetMessage("P_PICTURES_HELP")?><br />
137
<sup>2</sup> <span class="required"><?=GetMessage("P_PICTURES_CODE_HELP")?></span><br />
138
<?=EndNote();?>
139
*/
?>
140
<?
endif
;?>
$path
$path
Определения
access_edit.php:21
$back_url
$back_url
Определения
access_edit.php:50
$db_res
$db_res
Определения
options_user_settings.php:8
CAdminTabControl
Определения
admin_tabcontrol.php:14
CAllLanguage\GetList
static GetList($by="sort", $order="asc", $arFilter=[])
Определения
language.php:12
CAllOption\SetOptionString
static SetOptionString($module_id, $name, $value="", $desc=false, $site="")
Определения
option.php:29
$bVarsFromForm
$bVarsFromForm
Определения
file_edit.php:44
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
$res
$res
Определения
filter_act.php:7
EndNote
EndNote()
Определения
filter_tools.php:601
BeginNote
BeginNote($sParams='', $sMessParams='')
Определения
filter_tools.php:589
$handle
$handle
Определения
include.php:55
$_REQUEST
$_REQUEST["admin_mnu_menu_id"]
Определения
get_menu.php:8
$save
$save
Определения
iblock_catalog_edit.php:365
$_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
CheckDirPath
CheckDirPath($path)
Определения
tools.php:2707
IncludeModuleLangFile
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения
tools.php:3778
GetMessage
GetMessage($name, $aReplace=null)
Определения
tools.php:3397
LocalRedirect
LocalRedirect($url, $skip_security_check=false, $status="302 Found")
Определения
tools.php:4005
$arFiles
$arFiles
Определения
options.php:60
$RIGHTS
$RIGHTS
Определения
options.php:1
$arSights
$arSights
Определения
options.php:4
$file_exist
$file_exist
Определения
options.php:64
$counter
$counter
Определения
options.php:5
$arLangs
$arLangs
Определения
prolog_auth_admin.php:31
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
$val
$val
Определения
options.php:1793
$matches
$matches
Определения
index.php:22
$GLOBALS
$GLOBALS['_____370096793']
Определения
update_client.php:1
bitrix
modules
photogallery
options.php
Создано системой
1.14.0