1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
options.php
См. документацию.
1<?
2$module_id = "sender";
4if($POST_RIGHT>="R") :
5
6IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/options.php");
8
10 array("interval", GetMessage("opt_interval"), array("text", 10)),
11 array("auto_method", GetMessage("opt_method"), array("selectbox", array("agent"=>GetMessage("opt_method_agent"), "cron"=>GetMessage("opt_method_cron")))),
12 array("max_emails_per_hit", GetMessage("opt_max_per_hit"), array("text", 10)),
13 array("auto_agent_interval", GetMessage("opt_auto_agent_interval"), array("text", 10)),
14 array("max_emails_per_cron", GetMessage("opt_max_per_cron"), array("text", 10)),
15 array("reiterate_method", GetMessage("opt_reiterate_method"), array("selectbox", array("agent"=>GetMessage("opt_method_agent"), "cron"=>GetMessage("opt_method_cron")))),
16 array("thread_type", GetMessage("opt_threads_type"), array("selectbox", array
17 ("Single"=>GetMessage("opt_method_single_thread"),"Ten"=>GetMessage("opt_method_ten_threads")))),
18 array("reiterate_interval", GetMessage("opt_reiterate_interval"), array("text", 10)),
19 array("link_protocol", GetMessage("opt_link_protocol"), array("selectbox", array(""=>"http", "https"=>"https"))),
20 array("track_mails", GetMessage("opt_track_mails"), array("checkbox", 35)),
21 array("unsub_link", GetMessage("opt_unsub_link"), array("text", 35)),
22 array("sub_link", GetMessage("opt_sub_link"), array("text", 35)),
23 array("address_from", GetMessage("opt_address_from"), array("text-list", 3, 20)),
24 array("address_send_to_me", GetMessage("opt_address_send_to_me"), array("text-list", 3, 20)),
25 array("mail_headers", GetMessage("opt_mail_headers"), array("srlz-list", 3, 20)),
26 array("mail_consent",GetMessage("mail_need_consent"),array("checkbox")),
27 array("~mail_max_consent_requests",GetMessage("mail_max_consent_requests"),array("text", 10)),
28);
30 array("DIV" => "edit1", "TAB" => GetMessage("MAIN_TAB_SET"), "ICON" => "sender_settings", "TITLE" => GetMessage("MAIN_TAB_TITLE_SET")),
31 array("DIV" => "edit2", "TAB" => GetMessage("MAIN_TAB_RIGHTS"), "ICON" => "sender_settings", "TITLE" => GetMessage("MAIN_TAB_TITLE_RIGHTS")),
32);
33$tabControl = new CAdminTabControl("tabControl", $aTabs);
34
35if($_SERVER['REQUEST_METHOD']=="POST" && $Update.$Apply.$RestoreDefaults <> '' && $POST_RIGHT=="W" && check_bitrix_sessid())
36{
38 {
39 COption::RemoveOption("sender");
40 $z = CGroup::GetList("id", "asc", array("ACTIVE" => "Y", "ADMIN" => "N"));
41 while($zr = $z->Fetch())
42 $APPLICATION->DelGroupRight($module_id, array($zr["ID"]));
43 }
44 else
45 {
46 foreach($arAllOptions as $arOption)
47 {
48 $name = $arOption[0];
49 if($arOption[2][0]=="srlz-list")
50 {
51 $val = ${$name};
53 sort($val);
54 $val = serialize($val);
55 }
56 else if($arOption[2][0]=="text-list")
57 {
58 $val = "";
59 $valCount = count(${$name});
60 for($j=0; $j<$valCount; $j++)
61 {
62 if(trim(${$name}[$j]) <> '')
63 $val .= ($val <> ""? ",":"").trim(${$name}[$j]);
64 }
65 }
66 else
67 $val=${$name};
68 if($arOption[2][0] == "checkbox" && $val <> "Y")
69 $val="N";
70
71 COption::SetOptionString($module_id, $name, $val);
72 }
73 }
74
76
77 $Update = $Update.$Apply;
78 ob_start();
79 require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/admin/group_rights.php");
80 ob_end_clean();
81
82 if($_REQUEST["back_url_settings"] <> '')
83 {
84 if(($Apply <> '') || ($RestoreDefaults <> ''))
85 LocalRedirect($APPLICATION->GetCurPage()."?mid=".urlencode($module_id)."&lang=".urlencode(LANGUAGE_ID)."&back_url_settings=".urlencode($_REQUEST["back_url_settings"])."&".$tabControl->ActiveTabParam());
86 else
87 LocalRedirect($_REQUEST["back_url_settings"]);
88 }
89 else
90 {
91 LocalRedirect($APPLICATION->GetCurPage()."?mid=".urlencode($module_id)."&lang=".urlencode(LANGUAGE_ID)."&".$tabControl->ActiveTabParam());
92 }
93}
94
95?>
96<form method="post" action="<?echo $APPLICATION->GetCurPage()?>?mid=<?=urlencode($module_id)?>&amp;lang=<?=LANGUAGE_ID?>">
97<?
98$tabControl->Begin();
99$tabControl->BeginNextTab();
100
101 foreach($arAllOptions as $Option):
102 $type = $Option[2];
103 $val = COption::GetOptionString($module_id, $Option[0]);
104 ?>
105 <tr>
106 <td width="40%" <?if($type[0]=="textarea" || $type[0]=="text-list") echo 'class="adm-detail-valign-top"'?>>
107 <label for="<?echo htmlspecialcharsbx($Option[0])?>"><?echo $Option[1]?></label>
108 <td width="60%">
109 <?
110 if($type[0]=="checkbox"):
111 ?><input type="checkbox" name="<?echo htmlspecialcharsbx($Option[0])?>" id="<?echo htmlspecialcharsbx($Option[0])?>" value="Y"<?if($val=="Y")echo" checked";?>><?
112 elseif($type[0]=="text"):
113 ?><input type="text" size="<?echo $type[1]?>" maxlength="255" value="<?echo htmlspecialcharsbx($val)?>" name="<?echo htmlspecialcharsbx($Option[0])?>"><?
114 elseif($type[0]=="textarea"):
115 ?><textarea rows="<?echo $type[1]?>" cols="<?echo $type[2]?>" name="<?echo htmlspecialcharsbx($Option[0])?>"><?echo htmlspecialcharsbx($val)?></textarea><?
116 elseif($type[0]=="text-list" || $type[0]=="srlz-list"):
117 if ($type[0]=="srlz-list")
118 {
119 $aVal = !empty($val) ? unserialize($val, ['allowed_classes' => false]) : '';
120 }
121 else
122 {
123 $aVal = explode(",", $val);
124 }
125 $aVal = is_array($aVal) ? $aVal : [];
126
127 sort($aVal);
128 $aValCount = count($aVal);
129 for($j=0; $j<$aValCount; $j++):
130 ?><input type="text" size="<?echo $type[2]?>" value="<?echo htmlspecialcharsbx($aVal[$j])?>" name="<?echo htmlspecialcharsbx($Option[0])."[]"?>"><br><?
131 endfor;
132 for($j=0; $j<$type[1]; $j++):
133 ?><input type="text" size="<?echo $type[2]?>" value="" name="<?echo htmlspecialcharsbx($Option[0])."[]"?>"><br><?
134 endfor;
135 elseif($type[0]=="selectbox"):
136 $arr = $type[1];
137 $arr_keys = array_keys($arr);
138 $alertWarning = '';
139 if(in_array($Option[0], array('auto_method', 'reiterate_method')) && !CheckVersion(SM_VERSION, '15.0.9'))
140 $alertWarning = 'onchange="if(this.value==\'cron\')alert(\''.GetMessage('opt_sender_cron_support').SM_VERSION.'.\');"';
141 ?><select name="<?echo htmlspecialcharsbx($Option[0])?>" <?=$alertWarning?>><?
142 $arr_keys_count = count($arr_keys);
143 for($j=0; $j<$arr_keys_count; $j++):
144 ?><option value="<?echo $arr_keys[$j]?>"<?if($val==$arr_keys[$j])echo" selected"?>><?echo htmlspecialcharsbx($arr[$arr_keys[$j]])?></option><?
145 endfor;
146 ?></select><?
147 endif;
148 ?></td>
149 </tr>
150 <?endforeach?>
151<?$tabControl->BeginNextTab();?>
152<?require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/admin/group_rights.php");?>
153<?$tabControl->Buttons();?>
154 <input <?if ($POST_RIGHT<"W") echo "disabled" ?> type="submit" name="Update" value="<?=GetMessage("MAIN_SAVE")?>" title="<?=GetMessage("MAIN_OPT_SAVE_TITLE")?>" class="adm-btn-save">
155 <input <?if ($POST_RIGHT<"W") echo "disabled" ?> type="submit" name="Apply" value="<?=GetMessage("MAIN_OPT_APPLY")?>" title="<?=GetMessage("MAIN_OPT_APPLY_TITLE")?>">
156 <?if($_REQUEST["back_url_settings"] <> ''):?>
157 <input <?if ($POST_RIGHT<"W") echo "disabled" ?> type="button" name="Cancel" value="<?=GetMessage("MAIN_OPT_CANCEL")?>" title="<?=GetMessage("MAIN_OPT_CANCEL_TITLE")?>" onclick="window.location='<?echo htmlspecialcharsbx(CUtil::addslashes($_REQUEST["back_url_settings"]))?>'">
158 <input type="hidden" name="back_url_settings" value="<?=htmlspecialcharsbx($_REQUEST["back_url_settings"])?>">
159 <?endif?>
160 <input <?if ($POST_RIGHT<"W") echo "disabled" ?> type="submit" name="RestoreDefaults" title="<?echo GetMessage("MAIN_HINT_RESTORE_DEFAULTS")?>" OnClick="return confirm('<?echo AddSlashes(GetMessage("MAIN_HINT_RESTORE_DEFAULTS_WARNING"))?>')" value="<?echo GetMessage("MAIN_RESTORE_DEFAULTS")?>">
161 <?=bitrix_sessid_post();?>
162<?$tabControl->End();?>
163</form>
return select
Определения access_edit.php:440
$type
Определения options.php:106
const BX_ROOT
Определения bx_root.php:3
global $APPLICATION
Определения include.php:80
$module_id
Определения options.php:6
if($_SERVER $arAllOptions['REQUEST_METHOD']=='GET' &&!empty($_REQUEST['RestoreDefaults']) &&! $bReadOnly &&check_bitrix_sessid())
Определения options.php:63
static actualizeAll()
Определения job.php:44
static GetList($by='c_sort', $order='asc', $arFilter=[], $SHOW_USERS_AMOUNT="N")
Определения group.php:136
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
Определения file_new.php:677
$arr
Определения file_new.php:624
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$zr
Определения options.php:5
$_REQUEST["admin_mnu_menu_id"]
Определения get_menu.php:8
$Update
Определения options.php:212
$Apply
Определения options.php:213
for($j=0; $j< count($aVal); $j++) for( $j=0;$j< $type[1];$j++) elseif($type[0]=='selectbox') $arr_keys
Определения options.php:425
$RestoreDefaults
Определения options.php:55
$_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
const SM_VERSION
Определения version.php:2
$z
Определения options.php:31
bitrix_sessid_post($varname='sessid', $returnInvocations=false)
Определения tools.php:4700
check_bitrix_sessid($varname='sessid')
Определения tools.php:4686
TrimArr(&$arr, $trim_value=false)
Определения tools.php:2110
CheckVersion($version1, $version2)
Определения tools.php:5319
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения tools.php:2701
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
GetMessage($name, $aReplace=null)
Определения tools.php:3397
LocalRedirect($url, $skip_security_check=false, $status="302 Found")
Определения tools.php:4005
$name
Определения menu_edit.php:35
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
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
endfor
Определения template.php:569
$val
Определения options.php:1793
foreach($arAllOptions as $Option) $val
Определения options.php:103
$POST_RIGHT
Определения options.php:3
else $Option[0]
Определения options.php:387