1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
interface.php
См. документацию.
1<?
4{
5 function GetChainString($items = false, $templates = false)
6 {
7 $arItemLast = array();
8 $arItems = array();
9 if (!is_array($items))
10 return false;
11 if (!is_set($templates, "T_SEPARATOR"))
12 $templates["T_SEPARATOR"] = "<font class=\"forum-chain-separator\">&nbsp;/&nbsp;</font>";
13 if (!is_set($templates, "T_ALL_ITEMS"))
14 $templates["T_ALL_ITEMS"] = "<a href=\"#LINK#\" class=\"forum-chain-item\">#TITLE#</a>";
15 if (!is_set($templates, "T_LAST_ITEM"))
16 $templates["T_LAST_ITEM"] = "<font class=\"forum-chain-last\">#TITLE#</font>";
17 $arItemLast = array_pop($items);
18 foreach ($items as $res)
19 $arItems[] = str_replace(array("#LINK#", "#TITLE#"), array(htmlspecialcharsbx($res["LINK"]), htmlspecialcharsbx($res["TITLE"])), $templates["T_ALL_ITEMS"]);
20 $arItems[] = str_replace(array("#LINK#", "#TITLE#"), array(htmlspecialcharsbx($arItemLast["LINK"]), htmlspecialcharsbx($arItemLast["TITLE"])), $templates["T_LAST_ITEM"]);
21 return implode($templates["T_SEPARATOR"], $arItems);
22 }
23
24 function ShowFilter($arForm = false, $arFields = false, $prefix = false, $arTable = array())
25 {
26 $outPut = array();
27 $arGroupCookie = array();
28 $forum_cookie = COption::GetOptionString("main", "cookie_name", "BITRIX_SM")."_FORUM_FILTER";
29 if (!empty($_COOKIE[$forum_cookie]))
30 {
31 $result = explode("/", $_COOKIE[$forum_cookie]);
32 if (!empty($result))
33 {
34 foreach ($result as $res)
35 {
36 $res_ = explode("-", $res);
37 $arGroupCookie[$res_[0]] = $res_[1];
38 }
39 }
40 }
41
42 if ((empty($arFields)) || !is_array($arFields["params"]))
43 return false;
44 if ($arForm["formName"] == '')
45 $arForm["formName"] = "form1";
46 if (empty($arForm["formMethod"]))
47 $arForm["formMethod"] = "get";
48 $res_first = array();
49 $all_checkbox = true;
50 $prefix = "f";
51 if (!empty($arFields["prefix"]))
52 $prefix = $arFields["prefix"];
53 if (empty($arFields["visible"]))
54 $arFields["visible"] = 2;
55 $res_visible = array();
56 for ($ii = 0; $ii < $arFields["visible"]; $ii++)
57 $res_visible[] = array_shift($arFields["params"]);
58 $res_other = $arFields["params"];
59
60 $JSFile = "";
61 $prefix = preg_replace("/[^a-z0-9]/is", "_", $prefix);
62 ob_start();
63 $path = str_replace(array("\\", "//"), "/", __DIR__."/interface_js.php");
64 include_once($path);
65 $JSFile = ob_get_contents();
66 ob_end_clean();
67
68 if (!empty($res_other))
69 {
70 $outPut["body"] .= '
71 <script>
72 window.'.$prefix.'_popup_window = new ForumPopupMenu("'.$prefix.'_popup_window");
73 '.$JSFile.'
74 </script>
75 <div id="'.$prefix.'_popup_window" style="position:absolute; left:0; top:0; visibility:hidden;">
76 <table class="forum-main forum-filter-popup">';
77 foreach ($res_other as $res)
78 {
79 $name = $prefix.$res["id"];
80 $all_checkbox = ($arGroupCookie[$name] != "Y") ? false : $all_checkbox;
81 $outPut["body"] .=
82 '<tr><td><div onMouseOver="this.className=\'filter-check-hover\';" onMouseOut="this.className=\'filter-check\';" class="filter-check" onclick="SectionSH(\''.$name.'\', \'\', \''.$prefix.'\');"><input type="checkbox" name="'.$name.'_checkbox" id="'.$name.'_checkbox" onclick="this.checked=(this.checked==true) ? false:true;"'.(($arGroupCookie[$name] != "Y") ? "" : " checked").' />'.$res["title"].'</div></td></tr>';
83 }
84 $outPut["body"] .=
85 '<tr><th><div onMouseOver="this.className=\'filter-check-hover\';" onMouseOut="this.className=\'filter-check\';" class="filter-check" onclick="var checkbox=document.getElementById(\''.$prefix.'_all_checkbox\'); checkbox.checked=(checkbox.checked ? false : true); SectionGA(\''.$prefix.'\', document.getElementById(\''.$prefix.'_all_checkbox\'));"><input type="checkbox" name="'.$prefix.'_all_checkbox" id="'.$prefix.'_all_checkbox" '.($all_checkbox ? "checked" : "").' onclick="this.checked=(this.checked==true) ? false:true;" />'.GetMessage("FORUM_SHOW_ALL_FILTER").'</div></th></tr>
86 </table></div>';
87 }
88 $outPut["body"] .=
89 '<form name="'.$arForm["formName"].'" action="'.$arForm["formAction"].'" method="'.$arForm["formMethod"].'" class="forum-form">'.
90 '<table class="forum-main forum-filter" name="'.$prefix.'_table" id="'.$prefix.'_table" width="100%">';
91 if ($arForm["showTitle"] != "N")
92 {
93 $outPut["body"] .=
94 '<tr><th colspan="2">'.
95 ((!empty($res_other)) ? '<span class="filter-more" onClick="'.$prefix.'_popup_window.ShowMenu(this, null);" ></span>':'').
96 GetMessage("FORUM_FILTER").
97 '</th></tr>';
98 }
99 elseif (!empty($res_other))
100 {
101 $outPut["title"] = '<span class="filter-more" onClick="'.$prefix.'_popup_window.ShowMenu(this, null);" ></span>';
102 }
103 foreach ($res_visible as $res):
104 $outPut["body"] .=
105 '<tr><td align="right">'.$res["title"].':</td><td>'.$res["body"].'</td></tr>';
107 foreach ($res_other as $res):
108 $name = $prefix.$res["id"];
109 $outPut["body"] .=
110 '<tr name="'.$name.'" id="'.$name.'"'.(($arGroupCookie[$name] != "Y") ? " style=\"display:none;\"" : "").'>
111 <td align="right">'.$res["title"].':</td>
112 <td nowrap="nowrap">
113 <span class="filter-hide" onclick="SectionSH(\''.$name.'\', \'\', \''.$prefix.'\'); return false;"></span>'.$res["body"].
114 '</td></tr>';
115 endforeach;
116 $outPut["body"] .=
117 '<tr><td colspan="2" align="center" nowrap="nowrap">';
118 if (!empty($arForm["buttons"])):
119 foreach ($arForm["buttons"] as $res):
120 $outPut["body"] .=
121 '<input type="submit" name="'.$res["NAME"].'" value="'.$res["VALUE"].'" />';
122 endforeach;
123 else:
124 $outPut["body"] .=
125 '<input type="submit" name="set_filter" value="'.GetMessage("FORUM_BUTTON_FILTER").'"/>&nbsp;
126 <input type="submit" name="del_filter" value="'.GetMessage("FORUM_BUTTON_RESET").'"/>';
127 endif;
128 $outPut["body"] .=
129 '</td>
130 </tr>
131 </table>';
132
133 foreach ($arForm["addInputs"] as $res)
134 {
135 $outPut["body"] .=
136 '<input type="'.$res["TYPE"].'" name="'.$res["NAME"].'" value="'.$res["VALUE"].'" />';
137 }
138 $outPut["body"] .=
139 '</form>';
140 return $outPut;
141 }
142}
143
144?>
$path
Определения access_edit.php:21
ShowFilter($arForm=false, $arFields=false, $prefix=false, $arTable=array())
Определения interface.php:24
GetChainString($items=false, $templates=false)
Определения interface.php:5
$arFields
Определения dblapprove.php:5
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения tools.php:2701
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
is_set($a, $k=false)
Определения tools.php:2133
GetMessage($name, $aReplace=null)
Определения tools.php:3397
$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
$items
Определения template.php:224