Exemplo n.º 1
0
function __GetSubmenu($menu)
{
	global $aUserOpt, $bSkipRecent;

	$aPopup = array();
	if (is_array($menu))
	{
		foreach($menu as $item)
		{
			if(!is_array($item))
				continue;

			$aItem = array(
				"TEXT"=>$item["text"],
				"TITLE"=>($aUserOpt['start_menu_title'] <> 'N'? $item["title"] : ''),
				"ICON"=>$item["icon"],
			);
			if($item["url"] <> "")
			{
				$link = htmlspecialcharsback($item["url"]);
				if(strpos($link, "/freetrix/admin/") !== 0)
					$link = "/freetrix/admin/".$link;

				if ($_REQUEST['back_url_pub'])
					$link .= (strpos($link, '?') > 0 ? '&' : '?')."back_url_pub=".urlencode($_REQUEST["back_url_pub"]);

				$aItem['LINK'] = $link;

				if (!$bSkipRecent)
					$aItem['ONCLICK'] = 'BX.admin.startMenuRecent('.CUtil::PhpToJsObject($aItem).')';
			}

			if(is_array($item["items"]) && count($item["items"])>0)
			{
				$aItem["MENU"] = __GetSubmenu($item["items"]);
				if($item["url"] <> "" && $aUserOpt['start_menu_title'] <> 'N')
					$aItem["TITLE"] .= ' '.GetMessage("get_start_menu_dbl");
			}
			elseif($item["dynamic"] == true)
			{
				$aItem["MENU_URL"] = '/freetrix/admin/get_start_menu.php?mode=dynamic&lang='.LANGUAGE_ID.'&admin_mnu_module_id='.urlencode($item['module_id']).'&admin_mnu_menu_id='.urlencode($item['items_id']).($bSkipRecent?'&skip_recent=Y':'').($_REQUEST["back_url_pub"]<>''? '&back_url_pub='.urlencode($_REQUEST["back_url_pub"]):'').'&'.freetrix_sessid_get();
				$aItem['MENU_PRELOAD'] = false;

				if($item["url"] <> "" && $aUserOpt['start_menu_title'] <> 'N')
					$aItem["TITLE"] .= ' '.GetMessage("get_start_menu_dbl");
			}

			$aPopup[] = $aItem;
		}
	}

	return $aPopup;
}
Exemplo n.º 2
0
						<?php 
echo $authID;
?>
						<?if ($arUser["PERSONAL_LINK"] != ''):?>
							</a>
						<?endif;?>
					</td>
					<td class="soc-serv-name">
						<?php 
echo $arUser["VIEW_NAME"];
?>
					</td>
					<td class="split-item-actions">
						<?if (in_array($arUser["ID"], $arResult["ALLOW_DELETE_ID"])):?>
						<a class="split-delete-item" href="?action=delete&user_id=<?php 
echo $arUser["ID"] . "&" . freetrix_sessid_get();
?>
" onclick="return confirm('<?php 
echo GetMessage("SS_PROFILE_DELETE_CONFIRM");
?>
')" title=<?php 
echo GetMessage("SS_DELETE");
?>
></a>
						<?endif;?>
					</td>
				</tr>
				<?
			}
			?>
		</table>
Exemplo n.º 3
0
echo $href;
?>
"><?php 
echo GetMessage("FORM_VIEW");
?>
</a>&nbsp;]<br />
						<? 
							} //endif (strlen(trim($VIEW_URL))>0);
							?>
						<? 
						} //endif ($can_view);
						?>
						<?
						if ($arRes["can_delete"]) 
						{
							$href = $arParams["LIST_URL"].(strpos($arParams["LIST_URL"], "?") === false ? "?" : "&").($arParams["SEF_MODE"] == "Y" ? "" : "WEB_FORM_ID=".$arParams["WEB_FORM_ID"]."&")."del_id=".$arRes["ID"]."&".freetrix_sessid_get()."#nav_start";
						?>
						[&nbsp;<a title="<?php 
echo GetMessage("FORM_DELETE_ALT");
?>
" href="javascript:if(confirm('<?php 
echo GetMessage("FORM_CONFIRM_DELETE");
?>
')) window.location='<?php 
echo $href;
?>
'"><?php 
echo GetMessage("FORM_DELETE");
?>
</a>&nbsp;]<br />
						<? 
Exemplo n.º 4
0
function DoNext(name, id, recount)
{
	if (!name || name=='undefined')
	{
		name = 'size_files';
		id = name;
	}
	var str = '';

	if (result['stop'] == false)
	{
		if (result['done'] == true)
		{
			result['done'] = false;
			if (recount == 'begin')
				str = '&recount=begin';
			document.getElementById('frame_disk_quota').src='/freetrix/admin/quota.php?name=' + id + '&id=' + name + str + '&<?echo freetrix_sessid_get()?>';
		}
	}
	else
	{
		StopReCount();
		return;
	}
	setTimeout('DoNext(\''+name+'\', \''+id+'\')', 1000);
}
CheckButtons();
</script>
<?endif;?>
<?endif;?>
Exemplo n.º 5
0
</tr>
<?
$tabControl->End();
?>
<script type="text/javascript">
function BXLoadInfo(action)
{
	BX.ajax.loadJSON(
		'/freetrix/tools/seo_google.php?action='+action+'_feed&domain=<?php 
echo urlencode($arDomain['DOMAIN']);
?>
&dir=<?php 
echo urlencode($arDomain['SITE_DIR']);
?>
&<?php 
echo freetrix_sessid_get();
?>
',
		function(res)
		{
			var node = BX('seo_google_' + action);
			if(!!node)
			{
				node.innerHTML = '';
				if(res.error)
				{
					node.innerHTML = res.error;
				}
				else
				{
					var s = '', i = 0;
Exemplo n.º 6
0
    function GetPanelHtml()
    {
        global $USER, $APPLICATION, $adminPage;
        if ($APPLICATION->ShowPanel === false || !$USER->IsAuthorized() && $APPLICATION->ShowPanel !== true) {
            return "";
        }
        CTopPanel::InitPanelIcons();
        $arPanelButtons =& $APPLICATION->arPanelButtons;
        $bShowPanel = false;
        foreach ($arPanelButtons as $arValue) {
            if (trim($arValue["HREF"]) != "" || is_array($arValue["MENU"]) && !empty($arValue["MENU"])) {
                //we have at least one button to show
                $bShowPanel = true;
                break;
            }
        }
        if ($bShowPanel == false) {
            $bShowPanel = self::IsShownForUser();
        }
        if ($bShowPanel == false && $APPLICATION->ShowPanel !== true) {
            return "";
        }
        $APPLICATION->PanelShowed = true;
        if (isset($_GET["back_url_admin"]) && $_GET["back_url_admin"] != "" && strpos($_GET["back_url_admin"], "/") === 0) {
            $_SESSION["BACK_URL_ADMIN"] = $_GET["back_url_admin"];
        }
        $aUserOpt = CUserOptions::GetOption("admin_panel", "settings");
        $aUserOptGlobal = CUserOptions::GetOption("global", "settings");
        $toggleModeSet = false;
        if (isset($_GET["freetrix_include_areas"]) && $_GET["freetrix_include_areas"] != "") {
            $APPLICATION->SetShowIncludeAreas($_GET["freetrix_include_areas"] == "Y");
            $toggleModeSet = true;
        }
        $params = DeleteParam(array("freetrix_include_areas", "freetrix_show_mode", "back_url_admin"));
        $href = $APPLICATION->GetCurPage();
        $hrefEnc = htmlspecialcharsbx($href);
        $toggleModeDynamic = $aUserOptGlobal['panel_dynamic_mode'] == 'Y';
        $toggleMode = $toggleModeDynamic && !$toggleModeSet ? $aUserOpt['edit'] == 'on' : $APPLICATION->GetShowIncludeAreas() == 'Y';
        //Save if changed
        $old_edit = $aUserOpt['edit'];
        $aUserOpt['edit'] = $toggleMode ? 'on' : 'off';
        if ($old_edit !== $aUserOpt['edit']) {
            CUserOptions::SetOption('admin_panel', 'settings', $aUserOpt);
        }
        $toggleModeLink = $hrefEnc . '?freetrix_include_areas=' . ($toggleMode ? 'N' : 'Y') . ($params != "" ? "&amp;" . htmlspecialcharsbx($params) : "");
        $result = CTopPanel::ShowPanelScripts(true);
        $result .= '
	<!--[if lte IE 7]>
	<style type="text/css">#bx-panel {display:none !important;}</style>
	<div id="bx-panel-error">' . GetMessage("top_panel_browser") . '</div><![endif]-->
	<script type="text/javascript">BX.admin.dynamic_mode=' . ($toggleModeDynamic ? 'true' : 'false') . '; BX.admin.dynamic_mode_show_borders = ' . ($toggleMode ? 'true' : 'false') . ';</script>
	<div style="display:none; overflow:hidden;" id="bx-panel-back"></div>
	<div id="bx-panel"' . ($aUserOpt["collapsed"] == "on" ? ' class="bx-panel-folded"' : '') . '>
		<div id="bx-panel-top">
			<div id="bx-panel-top-gutter"></div>
			<div id="bx-panel-tabs">
	';
        $result .= '
				<a id="bx-panel-menu" href="" ' . CTopPanel::AddAttrHint(GetMessage('top_panel_start_menu_tooltip_title'), GetMessage('top_panel_start_menu_tooltip')) . '><span id="bx-panel-menu-icon"></span><span id="bx-panel-menu-text">' . GetMessage("top_panel_menu") . '</span></a><a id="bx-panel-view-tab"><span>' . GetMessage("top_panel_site") . '</span></a><a id="bx-panel-admin-tab" href="' . (isset($_SESSION["BACK_URL_ADMIN"]) && $_SESSION["BACK_URL_ADMIN"] != "" ? htmlspecialcharsbx($_SESSION["BACK_URL_ADMIN"]) . (strpos($_SESSION["BACK_URL_ADMIN"], "?") !== false ? "&amp;" : "?") : '/freetrix/admin/index.php?lang=' . LANGUAGE_ID . '&amp;') . 'back_url_pub=' . urlencode($href . ($params != "" ? "?" . $params : "")) . '"><span>' . GetMessage("top_panel_admin") . '</span></a>';
        $back_url = CUtil::JSUrlEscape(CUtil::addslashes($href . ($params != "" ? "?" . $params : "")));
        $arStartMenuParams = array('DIV' => 'bx-panel-menu', 'ACTIVE_CLASS' => 'bx-pressed', 'MENU_URL' => '/freetrix/admin/get_start_menu.php?lang=' . LANGUAGE_ID . '&back_url_pub=' . urlencode($back_url) . '&' . freetrix_sessid_get(), 'MENU_PRELOAD' => $aUserOptGlobal["start_menu_preload"] == 'Y');
        $result .= '<script type="text/javascript">BX.message({MENU_ENABLE_TOOLTIP: ' . ($aUserOptGlobal['start_menu_title'] != 'N' ? 'true' : 'false') . '}); new BX.COpener(' . CUtil::PhpToJsObject($arStartMenuParams) . ');</script>';
        $hkInstance = CHotKeys::getInstance();
        $Execs = $hkInstance->GetCodeByClassName("top_panel_menu", GetMessage("top_panel_menu"));
        $result .= $hkInstance->PrintJSExecs($Execs);
        $Execs = $hkInstance->GetCodeByClassName("top_panel_admin", GetMessage("top_panel_admin"));
        $result .= $hkInstance->PrintJSExecs($Execs);
        if ($USER->CanDoOperation("cache_control")) {
            $result .= '<a id="bx-panel-clear-cache" href="" onclick="BX.clearCache(); return false;"><span id="bx-panel-clear-cache-icon"></span><span id="bx-panel-clear-cache-text">' . GetMessage("top_panel_cache_new_tooltip_title") . '</span></a>';
        }
        $result .= '
			</div>
			<div id="bx-panel-userinfo">
	';
        $bCanProfile = $USER->CanDoOperation('view_own_profile') || $USER->CanDoOperation('edit_own_profile');
        $userName = CUser::FormatName(CSite::GetNameFormat(false), array("NAME" => $USER->GetFirstName(), "LAST_NAME" => $USER->GetLastName(), "SECOND_NAME" => $USER->GetSecondName(), "LOGIN" => $USER->GetLogin()), $bUseLogin = true, $bHTMLSpec = true);
        if ($bCanProfile) {
            $result .= '<a href="/freetrix/admin/user_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $USER->GetID() . '" id="bx-panel-user" ' . CTopPanel::AddAttrHint(GetMessage('top_panel_profile_tooltip')) . '><span id="bx-panel-user-icon"></span><span id="bx-panel-user-text">' . $userName . '</span></a>';
        } else {
            $result .= '<a id="bx-panel-user"><span id="bx-panel-user-icon"></span><span id="bx-panel-user-text">' . $userName . '</span></a>';
        }
        $result .= '<a href="' . $hrefEnc . '?logout=yes' . htmlspecialcharsbx(($s = DeleteParam(array("logout"))) == "" ? "" : "&" . $s) . '" id="bx-panel-logout" ' . CTopPanel::AddAttrHint(GetMessage('top_panel_logout_tooltip') . $hkInstance->GetTitle("bx-panel-logout", true)) . '>' . GetMessage("top_panel_logout") . '</a>';
        $toggleCaptionOn = '<span id="bx-panel-toggle-caption-mode-on">' . GetMessage("top_panel_on") . '</span>';
        $toggleCaptionOff = '<span id="bx-panel-toggle-caption-mode-off">' . GetMessage("top_panel_off") . '</span>';
        $toggleCaptions = $toggleMode ? $toggleCaptionOn . $toggleCaptionOff : $toggleCaptionOff . $toggleCaptionOn;
        $toogle = '<a href="' . $toggleModeLink . '" id="bx-panel-toggle" class="bx-panel-toggle' . ($toggleMode ? '-on' : '-off') . '"' . ($toggleModeDynamic ? '' : ' ' . CTopPanel::AddAttrHint(GetMessage("top_panel_edit_mode_new_tooltip_title"), GetMessage('top_panel_toggle_tooltip') . $hkInstance->GetTitle("bx-panel-small-toggle", true))) . '><span id="bx-panel-switcher-gutter-left"></span><span id="bx-panel-toggle-indicator"><span id="bx-panel-toggle-icon"></span><span id="bx-panel-toggle-icon-overlay"></span></span><span class="bx-panel-break"></span><span id="bx-panel-toggle-caption">' . GetMessage("top_panel_edit_mode_new") . '</span><span class="bx-panel-break"></span><span id="bx-panel-toggle-caption-mode">' . $toggleCaptions . '</span><span id="bx-panel-switcher-gutter-right"></span></a>';
        if ($aUserOpt["collapsed"] == "on") {
            $result .= $toogle;
        }
        $result .= '<a href="" id="bx-panel-expander" ' . CTopPanel::AddAttrHint(GetMessage("top_panel_expand_tooltip_title"), GetMessage("top_panel_expand_tooltip") . $hkInstance->GetTitle("bx-panel-expander", true)) . '><span id="bx-panel-expander-text">' . GetMessage("top_panel_expand") . '</span><span id="bx-panel-expander-arrow"></span></a>';
        if ($hkInstance->IsActive()) {
            $result .= '<a id="bx-panel-hotkeys" href="javascript:void(0)" onclick="BXHotKeys.ShowSettings();" ' . CTopPanel::AddAttrHint(GetMessage("HK_PANEL_TITLE") . $hkInstance->GetTitle("bx-panel-hotkeys", true)) . '></a>';
        }
        $result .= '<a href="javascript:void(0)" id="bx-panel-pin"' . ($aUserOpt['fix'] == 'on' ? ' class="bx-panel-pin-fixed"' : '') . ' ' . CTopPanel::AddAttrHint(GetMessage('top_panel_pin_tooltip')) . '></a>';
        $Execs = $hkInstance->GetCodeByClassName("bx-panel-logout", GetMessage('top_panel_logout_tooltip'));
        $result .= $hkInstance->PrintJSExecs($Execs);
        $Execs = $hkInstance->GetCodeByClassName("bx-panel-small-toggle", GetMessage("top_panel_edit_mode_new_tooltip_title"), 'location.href="' . $href . '?freetrix_include_areas=' . ($toggleMode ? 'N' : 'Y') . ($params != "" ? "&" . $params : "") . '";');
        $result .= $hkInstance->PrintJSExecs($Execs);
        $Execs = $hkInstance->GetCodeByClassName("bx-panel-expander", GetMessage("top_panel_expand_tooltip_title") . "/" . GetMessage("top_panel_collapse_tooltip_title"));
        $result .= $hkInstance->PrintJSExecs($Execs);
        $result .= '
			</div>
		</div>
	';
        /* BUTTONS */
        $result .= '<div id="bx-panel-site-toolbar"><div id="bx-panel-buttons-gutter"></div><div id="bx-panel-switcher">';
        if ($aUserOpt["collapsed"] != "on") {
            $result .= $toogle;
        }
        $result .= '<a href="" id="bx-panel-hider" ' . CTopPanel::AddAttrHint(GetMessage("top_panel_collapse_tooltip_title"), GetMessage("top_panel_collapse_tooltip") . $hkInstance->GetTitle("bx-panel-expander", true)) . '>' . GetMessage("top_panel_collapse") . '<span id="bx-panel-hider-arrow"></span></a>';
        $result .= '</div><div id="bx-panel-buttons"><div id="bx-panel-buttons-inner">';
        $main_sort = "";
        $last_btn_type = '';
        $last_btn_small_cnt = 0;
        $groupId = -1;
        $result .= '<span class="bx-panel-button-group" data-group-id="' . ++$groupId . '">';
        sortByColumn($arPanelButtons, array("MAIN_SORT" => SORT_ASC, "SORT" => SORT_ASC));
        foreach ($arPanelButtons as $key => $arButton) {
            $result .= $hkInstance->PrintTPButton($arButton);
            if ($main_sort != $arButton["MAIN_SORT"] && $main_sort != "") {
                $result .= '</span><span class="bx-panel-button-separator"></span><span class="bx-panel-button-group" data-group-id="' . ++$groupId . '">';
                $last_btn_small_cnt = 0;
            }
            if (!isset($arButton['TYPE']) || $arButton['TYPE'] != 'BIG') {
                $arButton['TYPE'] = 'SMALL';
            }
            //very old behaviour
            if (is_set($arButton, "SRC_0")) {
                $arButton["SRC"] = $arButton["SRC_0"];
            }
            $arButton['HREF'] = isset($arButton['HREF']) ? trim($arButton['HREF']) : '';
            $bHasAction = $arButton['HREF'] != '';
            if (array_key_exists("RESORT_MENU", $arButton) && $arButton["RESORT_MENU"] === true && is_array($arButton['MENU']) && !empty($arButton['MENU'])) {
                sortByColumn($arButton['MENU'], "SORT", '', PHP_INT_MAX);
            }
            $bHasMenu = is_array($arButton['MENU']) && count($arButton['MENU']) > 0;
            if ($bHasMenu && !$bHasAction) {
                foreach ($arButton['MENU'] as $arItem) {
                    if (isset($arItem['DEFAULT']) && $arItem['DEFAULT']) {
                        $arButton['HREF'] = $arItem['HREF'];
                        $bHasAction = true;
                    }
                }
            }
            if ($last_btn_type != '' && $arButton['TYPE'] != $last_btn_type && $main_sort == $arButton["MAIN_SORT"]) {
                $result .= '</span><span class="bx-panel-button-group" data-group-id="' . ++$groupId . '">';
                $last_btn_small_cnt = 0;
            }
            if ($bHasAction && substr(strtolower($arButton['HREF']), 0, 11) == 'javascript:') {
                $arButton['ONCLICK'] = substr($arButton['HREF'], 11);
                $arButton['HREF'] = 'javascript:void(0)';
            }
            if ($arButton['HINT']) {
                if (isset($arButton['HINT']['ID']) && $arButton['HINT']['ID']) {
                    $hintOptions = CUtil::GetPopupOptions($arButton['HINT']['ID']);
                    if ($hintOptions['display'] == 'off') {
                        unset($arButton['HINT']);
                    }
                }
                if ($arButton['HINT']) {
                    unset($arButton['ALT']);
                }
                if ($bHasMenu && (!isset($arButton['HINT_MENU']) || !$arButton['HINT_MENU'])) {
                    $arButton['HINT']['TARGET'] = 'parent';
                }
            }
            $title = isset($arButton['ALT']) ? htmlspecialcharsbx($arButton['ALT']) : '';
            $onClick = isset($arButton['ONCLICK']) ? htmlspecialcharsbx($arButton['ONCLICK']) : '';
            $onClickJs = isset($arButton['ONCLICK']) ? CUtil::JSEscape($arButton['ONCLICK']) : '';
            $hintMenu = isset($arButton['HINT_MENU']) ? CUtil::PhpToJsObject($arButton['HINT_MENU']) : '';
            switch ($arButton['TYPE']) {
                case 'SMALL':
                    if ($last_btn_small_cnt >= 3 && $main_sort == $arButton["MAIN_SORT"]) {
                        $result .= '</span><span class="bx-panel-button-group" data-group-id="' . ++$groupId . '">';
                        $last_btn_small_cnt = 0;
                    } elseif ($last_btn_small_cnt > 0) {
                        $result .= '<span class="bx-panel-break"></span>';
                    }
                    $result .= '<span class="bx-panel-small-button"><span class="bx-panel-small-button-inner">';
                    $button_icon = '<span class="bx-panel-small-button-icon' . ($arButton['ICON'] ? ' ' . $arButton['ICON'] : '') . '"' . (isset($arButton['SRC']) && $arButton['SRC'] ? ' style="background: scroll transparent url(' . htmlspecialcharsbx($arButton['SRC']) . ') no-repeat center center !important;"' : '') . '></span>';
                    $button_text = '<span class="bx-panel-small-button-text">' . htmlspecialcharsbx($arButton['TEXT']) . '</span>';
                    $button_text_js = CUtil::JSEscape($arButton['TEXT']);
                    if ($bHasAction) {
                        $result .= '<a href="' . htmlspecialcharsbx($arButton['HREF']) . '" onclick="' . $onClick . ';BX.removeClass(this.parentNode.parentNode, \'bx-panel-small-button' . ($bHasMenu ? '-text' : '') . '-active\')" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . $hkInstance->GetTitle("bx_topmenu_btn_" . $key) . '"' : '"' . $hkInstance->GetTitle("bx_topmenu_btn_" . $key) . '"') . '>' . $button_icon . $button_text . '</a>';
                        $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'SMALL\', ACTIVE_CSS: \'bx-panel-small-button' . ($bHasMenu ? '-text' : '') . '-active\', HOVER_CSS: \'bx-panel-small-button' . ($bHasMenu ? '-text' : '') . '-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', SKIP : ' . ($bHasMenu ? "true" : "false") . ', LINK: "' . CUtil::JSEscape($arButton['HREF']) . '", ACTION : "' . $onClickJs . '",TEXT :  "' . $button_text_js . '" })</script>';
                        if ($bHasMenu) {
                            $result .= '<a href="javascript:void(0)" class="bx-panel-small-button-arrow" id="bx_topmenu_btn_' . $key . '_menu"><span class="bx-panel-small-button-arrow"></span></a>';
                            $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '_menu\', TYPE: \'SMALL\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-small-button-arrow-active\', HOVER_CSS: \'bx-panel-small-button-arrow-hover\'' . ($hintMenu ? ', HINT: ' . $hintMenu : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"})</script>';
                        }
                    } elseif ($bHasMenu) {
                        $result .= '<a href="javascript:void(0)" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $button_icon . $button_text . '<span class="bx-panel-small-single-button-arrow"></span></a>';
                        $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'SMALL\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-small-button-active\', HOVER_CSS: \'bx-panel-small-button-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"})</script>';
                    }
                    $result .= '</span></span>';
                    $last_btn_small_cnt++;
                    break;
                case 'BIG':
                    $last_btn_small_cnt = 0;
                    $result .= '<span class="bx-panel-button"><span class="bx-panel-button-inner">';
                    $button_icon = '<span class="bx-panel-button-icon' . ($arButton['ICON'] ? ' ' . $arButton['ICON'] : '') . '"' . (isset($arButton['SRC']) && $arButton['SRC'] ? ' style="background: scroll transparent url(' . htmlspecialcharsbx($arButton['SRC']) . ') no-repeat center center !important;"' : '') . '></span>';
                    $button_text_js = CUtil::JSEscape(str_replace('#BR#', ' ', $arButton['TEXT']));
                    if ($bHasAction && $bHasMenu) {
                        $button_text = '<span class="bx-panel-button-text">' . str_replace('#BR#', '<span class="bx-panel-break"></span>', $arButton['TEXT']) . '&nbsp;<span class="bx-panel-button-arrow"></span></span>';
                        $result .= '<a href="' . htmlspecialcharsbx($arButton['HREF']) . '" onclick="' . $onClick . ';BX.removeClass(this.parentNode.parentNode, \'bx-panel-button-icon-active\');" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $button_icon . '</a><a id="bx_topmenu_btn_' . $key . '_menu" href="javascript:void(0)">' . $button_text . '</a>';
                        $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'BIG\', ACTIVE_CSS: \'bx-panel-button-icon-active\', HOVER_CSS: \'bx-panel-button-icon-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', SKIP : true }); BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '_menu\', TYPE: \'BIG\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-button-text-active\', HOVER_CSS: \'bx-panel-button-text-hover\'' . ($hintMenu ? ', HINT: ' . $hintMenu : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"})</script>';
                    } else {
                        if ($bHasAction) {
                            $button_text = '<span class="bx-panel-button-text">' . str_replace('#BR#', '<span class="bx-panel-break"></span>', $arButton['TEXT']) . '</span>';
                            $result .= '<a href="' . htmlspecialcharsbx($arButton['HREF']) . '" onclick="' . $onClick . ';BX.removeClass(this.parentNode.parentNode, \'bx-panel-button-active\');" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $button_icon . $button_text . '</a>';
                            $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'BIG\', ACTIVE_CSS: \'bx-panel-button-active\', HOVER_CSS: \'bx-panel-button-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', LINK: "' . CUtil::JSEscape($arButton['HREF']) . '", ACTION : "' . $onClickJs . '", TEXT :  "' . $button_text_js . '"});</script>';
                        } else {
                            $button_text = '<span class="bx-panel-button-text">' . str_replace('#BR#', '<span class="bx-panel-break"></span>', $arButton['TEXT']) . '&nbsp;<span class="bx-panel-button-arrow"></span></span>';
                            $result .= '<a href="javascript:void(0)" id="bx_topmenu_btn_' . $key . '_menu">' . $button_icon . $button_text . '</a>';
                            $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '_menu\', TYPE: \'BIG\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-button-active\', HOVER_CSS: \'bx-panel-button-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"});</script>';
                        }
                    }
                    $result .= '</span></span>';
                    break;
            }
            $main_sort = $arButton["MAIN_SORT"];
            $last_btn_type = $arButton['TYPE'];
        }
        $result .= '</span>';
        $result .= '</div>
			</div>
		</div>';
        if ($USER->IsAdmin()) {
            $result .= CAdminNotify::GetHtml();
        }
        $result .= '
	</div>
	';
        $result .= '<script type="text/javascript">
		BX.admin.panel.state = {
			fixed: ' . ($aUserOpt["fix"] == "on" ? 'true' : 'false') . ',
			collapsed: ' . ($aUserOpt["collapsed"] == "on" ? 'true' : 'false') . '
		}
		BX.admin.moreButton.init({ buttonTitle : "' . GetMessageJS("top_panel_more_button_title") . '"});
		</script>';
        //start menu preload
        // if($aUserOptGlobal["start_menu_preload"] == 'Y')
        // 	$result .= '<script type="text/javascript">BX.ready(function(){jsStartMenu.PreloadMenu(\''.CUtil::JSEscape($href.($params<>""? "?".$params:"")).'\');});</script>';
        //show script to play sound
        $result .= $adminPage->ShowSound();
        return $result;
    }
Exemplo n.º 7
0
);
if($ID>0)
{
	$aMenu[] = array("SEPARATOR"=>"Y");
	$aMenu[] = array(
		"TEXT"=>GetMessage("HK_ADD"),
		"TITLE"=>GetMessage("HK_ADD_TITLE"),
		"LINK"=>"hot_keys_edit.php?lang=".LANG,
		"ICON"=>"btn_new",
	);

	if($str_IS_CUSTOM)
		$aMenu[] = array(
			"TEXT"=>GetMessage("HK_DELETE"),
			"TITLE"=>GetMessage("HK_DELETE_TITLE"),
			"LINK"=>"javascript:if(confirm('".GetMessage("HK_DEL_CONFIRM")."')) window.location='hot_keys_list.php?ID=".$ID."&action=delete&lang=".LANG."&".freetrix_sessid_get()."';",
			"ICON"=>"btn_delete",
		);
}
$context = new CAdminContextMenu($aMenu);
$context->Show();

if($_GET["applied"]=="ok")
	CAdminMessage::ShowMessage(array("MESSAGE"=>GetMessage("HK_EDIT_SUCCESS"), "TYPE"=>"OK"));

if($errMess)
	echo $errMess->Show();

$aTabs = array(
	array("DIV" => "edit1", "TAB" => GetMessage("HK_EDIT_TAB"), "TITLE"=>GetMessage("HK_EDIT_TAB_TITLE")),
);
Exemplo n.º 8
0
$tabControl = new CAdminTabControl("tabControl", $aTabs, true, true);
?>

<script>
var running = false;

function DoNext(NS)
{
	var interval = parseInt(document.getElementById('INTERVAL').value);
	var queryString =
		'Export=Y'
		+ '&lang=<?php 
echo LANGUAGE_ID;
?>
'
		+ '&<?echo freetrix_sessid_get()?>'
		+ '&INTERVAL=' + interval
	;

	if(!NS)
	{
		queryString+='&URL_DATA_FILE='+jsUtils.urlencode(document.getElementById('URL_DATA_FILE').value);
		queryString+='&IBLOCK_ID='+jsUtils.urlencode(document.getElementById('IBLOCK_ID').value);
		queryString+='&SECTIONS_FILTER='+jsUtils.urlencode(document.getElementById('SECTIONS_FILTER').value);
		queryString+='&ELEMENTS_FILTER='+jsUtils.urlencode(document.getElementById('ELEMENTS_FILTER').value);
		if(document.getElementById('CK_DOWNLOAD_CLOUD_FILES'))
			queryString+='&DOWNLOAD_CLOUD_FILES='+(document.getElementById('CK_DOWNLOAD_CLOUD_FILES').checked? 'Y': 'N');
	}

	if(running)
	{
Exemplo n.º 9
0
 /**
  * Function adds an delete action to some area inside the component.
  *
  * <ul>
  * <li>$arParams['CONFIRM'] = false - disable confirm;
  * <li>$arParams['CONFIRM'] = 'Text' - confirm with custom text;
  * <li>no $arParams['CONFIRM'] at all - confirm with default text
  * </ul>
  * @param string $entryId
  * @param string $deleteLink
  * @param string|bool $deleteTitle
  * @param array[string]mixed $arParams
  * @return void
  *
  */
 public final function addDeleteAction($entryId, $deleteLink, $deleteTitle = false, $arParams = array())
 {
     /** @global CMain $APPLICATION */
     global $APPLICATION;
     if (!$entryId || !$deleteLink) {
         return;
     }
     includeModuleLangFile(__FILE__);
     if (!$deleteTitle) {
         $deleteTitle = GetMessage('DELETE_ACTION_TITLE_DEFAULT');
     }
     if (!is_array($arParams)) {
         $arParams = array();
     }
     if (!$arParams['ICON'] && !$arParams['SRC'] && !$arParams['IMAGE']) {
         $arParams['ICON'] = 'bx-context-toolbar-delete-icon';
     }
     if (substr($deleteLink, 0, 11) != 'javascript:') {
         if (false === strpos($deleteLink, 'return_url=')) {
             $deleteLink .= '&return_url=' . urlencode($APPLICATION->getCurPageParam());
         }
         $deleteLink .= '&' . freetrix_sessid_get();
         if ($arParams['CONFIRM'] !== false) {
             $confirmText = $arParams['CONFIRM'] ? $arParams['CONFIRM'] : GetMessage('DELETE_ACTION_CONFIRM');
             $deleteLink = 'javascript:if(confirm(\'' . CUtil::JSEscape($confirmText) . '\')) jsUtils.Redirect([], \'' . CUtil::JSEscape($deleteLink) . '\');';
         }
     }
     $arBtn = array('URL' => $deleteLink, 'TITLE' => $deleteTitle);
     if ($arParams['ICON']) {
         $arBtn['ICON'] = $arParams['ICON'];
     } elseif ($arParams['SRC'] || $arParams['IMAGE']) {
         $arBtn['SRC'] = $arParams['IMAGE'] ? $arParams['IMAGE'] : $arParams['SRC'];
     }
     $APPLICATION->setEditArea($this->getEditAreaId($entryId), array($arBtn));
 }
Exemplo n.º 10
0
		"TEXT"	=> GetMessage("MAIN_NEW_RECORD"),
		"LINK"	=> "/freetrix/admin/message_edit.php?lang=".LANGUAGE_ID,
		"TITLE"	=> GetMessage("MAIN_NEW_RECORD_TITLE"),
		"ICON"	=> "btn_new"
		);

	$aMenu[] = array(
		"TEXT"	=> GetMessage("MAIN_COPY_RECORD"),
		"LINK"	=> "/freetrix/admin/message_edit.php?lang=".LANGUAGE_ID.htmlspecialcharsbx("&COPY_ID=").$ID,
		"TITLE"	=> GetMessage("MAIN_COPY_RECORD_TITLE"),
		"ICON"	=> "btn_copy"
		);

	$aMenu[] = array(
		"TEXT"	=> GetMessage("MAIN_DELETE_RECORD"),
		"LINK"	=> "javascript:if(confirm('".GetMessage("MAIN_DELETE_RECORD_CONF")."')) window.location='/freetrix/admin/message_admin.php?ID=".$ID."&lang=".LANGUAGE_ID."&".freetrix_sessid_get()."&action=delete';",
		"TITLE"	=> GetMessage("MAIN_DELETE_RECORD_TITLE"),
		"ICON"	=> "btn_delete"
		);
}
$context = new CAdminContextMenu($aMenu);
$context->Show();

if ($e = $APPLICATION->GetException())
			$message = new CAdminMessage(GetMessage("MAIN_ERROR_SAVING"), $e);
if($message)
	echo $message->Show();

if(strlen($strError)>0)
	CAdminMessage::ShowMessage(Array("MESSAGE"=>$strError, "HTML"=>true, "TYPE"=>"ERROR"));
Exemplo n.º 11
0
$APPLICATION->SetTitle($ID > 0 ? Loc::getMessage("SEO_SITEMAP_EDIT_TITLE") : Loc::getMessage("SEO_SITEMAP_ADD_TITLE"));
require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_after.php");

$aMenu = array();

$aMenu[] = array(
	"TEXT"	=> Loc::getMessage("SITEMAP_LIST"),
	"LINK"	=> "/freetrix/admin/seo_sitemap.php?lang=".LANGUAGE_ID,
	"ICON"	=> "btn_list",
	"TITLE"	=> Loc::getMessage("SITEMAP_LIST_TITLE"),
);
if ($ID > 0)
{
	$aMenu[] = array(
		"TEXT"	=> Loc::getMessage("SITEMAP_DELETE"),
		"LINK"	=> "javascript:if(confirm('".Loc::getMessage("SITEMAP_DELETE_CONFIRM")."')) window.location='/freetrix/admin/seo_sitemap_edit.php?action=delete&ID=".$ID."&lang=".LANGUAGE_ID."&".freetrix_sessid_get()."';",
		"ICON"	=> "btn_delete",
		"TITLE"	=> Loc::getMessage("SITEMAP_DELETE_TITLE"),
	);
}

$context = new CAdminContextMenu($aMenu);
$context->Show();

if(!empty($errors))
{
	CAdminMessage::ShowMessage(join("\n", $errors));
}

?>
<form method="POST" action="<?php 
Exemplo n.º 12
0
		function ShowComment($comment, $tabCount=0, $tabSize=2.5, $canModerate=false, $User=Array(), $use_captcha=false, $bCanUserComment=false, $errorComment=false, $arParams = array())
		{
			$comment["urlToAuthor"] = "";
			$comment["urlToBlog"] = "";

			if($comment["SHOW_AS_HIDDEN"] == "Y" || $comment["PUBLISH_STATUS"] == BLOG_PUBLISH_STATUS_PUBLISH || $comment["SHOW_SCREENNED"] == "Y" || $comment["ID"] == "preview")
			{
				global $prevTab;
				$tabCount = IntVal($tabCount);
				if($tabCount <= 5)
					$paddingSize = 2.5 * $tabCount;
				elseif($tabCount > 5 && $tabCount <= 10)
					$paddingSize = 2.5 * 5 + ($tabCount - 5) * 1.5;
				elseif($tabCount > 10)
					$paddingSize = 2.5 * 5 + 1.5 * 5 + ($tabCount-10) * 1;

				if(($tabCount+1) <= 5)
					$paddingSizeNew = 2.5 * ($tabCount+1);
				elseif(($tabCount+1) > 5 && ($tabCount+1) <= 10)
					$paddingSizeNew = 2.5 * 5 + (($tabCount+1) - 5) * 1.5;
				elseif(($tabCount+1) > 10)
					$paddingSizeNew = 2.5 * 5 + 1.5 * 5 + (($tabCount+1)-10) * 1;
				$paddingSizeNew -= $paddingSize;

				if($prevTab > $tabCount)
					$prevTab = $tabCount;
				if($prevTab <= 5)
					$prevPaddingSize = 2.5 * $prevTab;
				elseif($prevTab > 5 && $prevTab <= 10)
					$prevPaddingSize = 2.5 * 5 + ($prevTab - 5) * 1.5;
				elseif($prevTab > 10)
					$prevPaddingSize = 2.5 * 5 + 1.5 * 5 + ($prevTab-10) * 1;

					$prevTab = $tabCount;
				?>
				<div class="blog-comment-line" style="margin-left:<?php 
echo $prevPaddingSize;
?>
em;"></div>
				<a name="<?php 
echo $comment["ID"];
?>
"></a>
				<div class="blog-comment" style="padding-left:<?php 
echo $paddingSize;
?>
em;">
				<div id="blg-comment-<?php 
echo $comment["ID"];
?>
">
				<?
				if($comment["PUBLISH_STATUS"] == BLOG_PUBLISH_STATUS_PUBLISH || $comment["SHOW_SCREENNED"] == "Y" || $comment["ID"] == "preview")
				{
					$aditStyle = "";
					if($arParams["is_ajax_post"] == "Y" || $comment["NEW"] == "Y")
						$aditStyle .= " blog-comment-new";
					if($comment["AuthorIsAdmin"] == "Y")
						$aditStyle = " blog-comment-admin";
					if(IntVal($comment["AUTHOR_ID"]) > 0)
						$aditStyle .= " blog-comment-user-".IntVal($comment["AUTHOR_ID"]);
					if($comment["AuthorIsPostAuthor"] == "Y")
						$aditStyle .= " blog-comment-author";
					if($comment["PUBLISH_STATUS"] != BLOG_PUBLISH_STATUS_PUBLISH && $comment["ID"] != "preview")
						$aditStyle .= " blog-comment-hidden";
					if($comment["ID"] == "preview")
						$aditStyle .= " blog-comment-preview";
					?>
					<div class="blog-comment-cont<?php 
echo $aditStyle;
?>
">
					<div class="blog-comment-cont-white">
					<div class="blog-comment-info">
						<?if ($arParams["SHOW_RATING"] == "Y"):?>
						<div class="blog-post-rating rating_vote_graphic">
						<?
						$GLOBALS["APPLICATION"]->IncludeComponent(
							"freetrix:rating.vote", $arParams["RATING_TYPE"],
							Array(
								"ENTITY_TYPE_ID" => "BLOG_COMMENT",
								"ENTITY_ID" => $comment["ID"],
								"OWNER_ID" => $comment["arUser"]["ID"],
								"USER_VOTE" => $arParams["RATING"][$comment["ID"]]["USER_VOTE"],
								"USER_HAS_VOTED" => $arParams["RATING"][$comment["ID"]]["USER_HAS_VOTED"],
								"TOTAL_VOTES" => $arParams["RATING"][$comment["ID"]]["TOTAL_VOTES"],
								"TOTAL_POSITIVE_VOTES" => $arParams["RATING"][$comment["ID"]]["TOTAL_POSITIVE_VOTES"],
								"TOTAL_NEGATIVE_VOTES" => $arParams["RATING"][$comment["ID"]]["TOTAL_NEGATIVE_VOTES"],
								"TOTAL_VALUE" => $arParams["RATING"][$comment["ID"]]["TOTAL_VALUE"],
								"PATH_TO_USER_PROFILE" => $arParams["~PATH_TO_USER"],
							),
							$arParams["component"],
							array("HIDE_ICONS" => "Y")
						);?>
						</div>
						<?endif;?>
						<?
						if (COption::GetOptionString("blog", "allow_alias", "Y") == "Y" && (strlen($comment["urlToBlog"]) > 0 || strlen($comment["urlToAuthor"]) > 0) && array_key_exists("ALIAS", $comment["BlogUser"]) && strlen($comment["BlogUser"]["ALIAS"]) > 0)
							$arTmpUser = array(
								"NAME" => "",
								"LAST_NAME" => "",
								"SECOND_NAME" => "",
								"LOGIN" => "",
								"NAME_LIST_FORMATTED" => $comment["BlogUser"]["~ALIAS"],
							);
						elseif (strlen($comment["urlToBlog"]) > 0 || strlen($comment["urlToAuthor"]) > 0)
							$arTmpUser = array(
								"NAME" => $comment["arUser"]["~NAME"],
								"LAST_NAME" => $comment["arUser"]["~LAST_NAME"],
								"SECOND_NAME" => $comment["arUser"]["~SECOND_NAME"],
								"LOGIN" => $comment["arUser"]["~LOGIN"],
								"NAME_LIST_FORMATTED" => "",
							);

						if(strlen($comment["urlToBlog"])>0)
						{
							?>
							<div class="blog-author">
							<?

							$GLOBALS["APPLICATION"]->IncludeComponent("freetrix:main.user.link",
								'',
								array(
									"ID" => $comment["arUser"]["ID"],
									"HTML_ID" => "blog_post_comment_".$comment["arUser"]["ID"],
									"NAME" => $arTmpUser["NAME"],
									"LAST_NAME" => $arTmpUser["LAST_NAME"],
									"SECOND_NAME" => $arTmpUser["SECOND_NAME"],
									"LOGIN" => $arTmpUser["LOGIN"],
									"NAME_LIST_FORMATTED" => $arTmpUser["NAME_LIST_FORMATTED"],
									"USE_THUMBNAIL_LIST" => "N",
									"PROFILE_URL" => $comment["urlToAuthor"],
									"PROFILE_URL_LIST" => $comment["urlToBlog"],
									"PATH_TO_SONET_MESSAGES_CHAT" => $arParams["~PATH_TO_MESSAGES_CHAT"],
									"PATH_TO_VIDEO_CALL" => $arParams["~PATH_TO_VIDEO_CALL"],
									"DATE_TIME_FORMAT" => $arParams["DATE_TIME_FORMAT"],
									"SHOW_YEAR" => $arParams["SHOW_YEAR"],
									"CACHE_TYPE" => $arParams["CACHE_TYPE"],
									"CACHE_TIME" => $arParams["CACHE_TIME"],
									"NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"],
									"SHOW_LOGIN" => $arParams["SHOW_LOGIN"],
									"PATH_TO_CONPANY_DEPARTMENT" => $arParams["~PATH_TO_CONPANY_DEPARTMENT"],
									"PATH_TO_SONET_USER_PROFILE" => ($arParams["USE_SOCNET"] == "Y" ? $comment["urlToAuthor"] : $arParams["~PATH_TO_SONET_USER_PROFILE"]),
									"INLINE" => "Y",
									"SEO_USER" => $arParams["SEO_USER"],
								),
								false,
								array("HIDE_ICONS" => "Y")
							);
							?>
							</div>
							<?
						}
						elseif(strlen($comment["urlToAuthor"])>0)
						{
							?><div class="blog-author">
							<?if($arParams["SEO_USER"] == "Y"):?>
								<noindex>
							<?endif;?>
							<?
							$GLOBALS["APPLICATION"]->IncludeComponent("freetrix:main.user.link",
								'',
								array(
									"ID" => $comment["arUser"]["ID"],
									"HTML_ID" => "blog_post_comment_".$comment["arUser"]["ID"],
									"NAME" => $arTmpUser["NAME"],
									"LAST_NAME" => $arTmpUser["LAST_NAME"],
									"SECOND_NAME" => $arTmpUser["SECOND_NAME"],
									"LOGIN" => $arTmpUser["LOGIN"],
									"NAME_LIST_FORMATTED" => $arTmpUser["NAME_LIST_FORMATTED"],
									"USE_THUMBNAIL_LIST" => "N",
									"PROFILE_URL" => $comment["urlToAuthor"],
									"PATH_TO_SONET_MESSAGES_CHAT" => $arParams["~PATH_TO_MESSAGES_CHAT"],
									"PATH_TO_VIDEO_CALL" => $arParams["~PATH_TO_VIDEO_CALL"],
									"DATE_TIME_FORMAT" => $arParams["DATE_TIME_FORMAT"],
									"SHOW_YEAR" => $arParams["SHOW_YEAR"],
									"CACHE_TYPE" => $arParams["CACHE_TYPE"],
									"CACHE_TIME" => $arParams["CACHE_TIME"],
									"NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"],
									"SHOW_LOGIN" => $arParams["SHOW_LOGIN"],
									"PATH_TO_CONPANY_DEPARTMENT" => $arParams["~PATH_TO_CONPANY_DEPARTMENT"],
									"PATH_TO_SONET_USER_PROFILE" => ($arParams["USE_SOCNET"] == "Y" ? $comment["urlToAuthor"] : $arParams["~PATH_TO_SONET_USER_PROFILE"]),
									"INLINE" => "Y",
									"SEO_USER" => $arParams["SEO_USER"],
								),
								false,
								array("HIDE_ICONS" => "Y")
							);
							?>
							<?if($arParams["SEO_USER"] == "Y"):?>
								</noindex>
							<?endif;?>
							</div>
							<?
						}
						else
						{
							?>
							<div class="blog-author"><?php 
echo $comment["AuthorName"];
?>
</div>
							<?
						}

						if(strlen($comment["urlToDelete"])>0 && strlen($comment["AuthorEmail"])>0)
						{
							?>
							(<a href="mailto:<?php 
echo $comment["AuthorEmail"];
?>
"><?php 
echo $comment["AuthorEmail"];
?>
</a>)
							<?
						}

						?>
						<div class="blog-comment-date"><?php 
echo $comment["DateFormated"];
?>
</div>
					</div>
					<div class="blog-clear-float"></div>
					<div class="blog-comment-content">
						<?if(strlen($comment["TitleFormated"])>0)
						{
							?>
							<b><?php 
echo $comment["TitleFormated"];
?>
</b><br />
							<?
						}
						?>
						<?php 
echo $comment["TextFormated"];
?>
						<?
						if(!empty($arParams["arImages"][$comment["ID"]]))
						{
							?>
							<div class="feed-com-files">
								<div class="feed-com-files-title"><?php 
echo GetMessage("BLOG_PHOTO");
?>
</div>
								<div class="feed-com-files-cont">
									<?
									foreach($arParams["arImages"][$comment["ID"]] as $val)
									{
										?><span class="feed-com-files-photo"><img src="<?php 
echo $val["small"];
?>
" alt="" border="0" data-bx-image="<?php 
echo $val["full"];
?>
"></span><?
									}
									?>
								</div>
							</div>
							<?
						}

						if($comment["COMMENT_PROPERTIES"]["SHOW"] == "Y")
						{
							$eventHandlerID = false;
							$eventHandlerID = AddEventHandler('main', 'system.field.view.file', Array('CBlogTools', 'blogUFfileShow'));
							?><div><?
							foreach ($comment["COMMENT_PROPERTIES"]["DATA"] as $FIELD_NAME => $arPostField)
							{
								if(!empty($arPostField["VALUE"]))
								{
									$GLOBALS["APPLICATION"]->IncludeComponent(
										"freetrix:system.field.view",
										$arPostField["USER_TYPE"]["USER_TYPE_ID"],
										array("arUserField" => $arPostField), null, array("HIDE_ICONS"=>"Y"));
								}
							}
							?></div><?
							if ($eventHandlerID !== false && ( intval($eventHandlerID) > 0 ))
								RemoveEventHandler('main', 'system.field.view.file', $eventHandlerID);
						}
						?>
						<div class="blog-comment-meta">
						<?
						if($bCanUserComment===true)
						{
							?>
							<span class="blog-comment-answer"><a href="javascript:void(0)" onclick="return showComment('<?php 
echo $comment["ID"];
?>
')"><?php 
echo GetMessage("B_B_MS_REPLY");
?>
</a></span>
							<span class="blog-vert-separator"></span>
							<?
						}

						if(IntVal($comment["PARENT_ID"])>0)
						{
							?>
							<span class="blog-comment-parent"><a href="#<?php 
echo $comment["PARENT_ID"];
?>
"><?php 
echo GetMessage("B_B_MS_PARENT");
?>
</a></span>
							<span class="blog-vert-separator"></span>
							<?
						}
						?>
						<span class="blog-comment-link"><a href="#<?php 
echo $comment["ID"];
?>
"><?php 
echo GetMessage("B_B_MS_LINK");
?>
</a></span>
						<?
						if($comment["CAN_EDIT"] == "Y")
						{
							?>
							<script>
								top.text<?php 
echo $comment["ID"];
?>
 = text<?php 
echo $comment["ID"];
?>
 = '<?php 
echo CUtil::JSEscape($comment["~POST_TEXT"]);
?>
';
								top.title<?php 
echo $comment["ID"];
?>
 = title<?php 
echo $comment["ID"];
?>
 = '<?php 
echo CUtil::JSEscape($comment["TITLE"]);
?>
';
							</script>
							<span class="blog-vert-separator"></span>
							<span class="blog-comment-edit"><a href="javascript:void(0)" onclick="return editComment('<?php 
echo $comment["ID"];
?>
')"><?php 
echo GetMessage("BPC_MES_EDIT");
?>
</a></span>
							<?
						}
						if(strlen($comment["urlToShow"])>0)
						{
							?>
							<span class="blog-vert-separator"></span>
							<span class="blog-comment-show">
								<?if($arParams["AJAX_POST"] == "Y"):?>
									<a href="javascript:void(0)" onclick="return hideShowComment('<?php 
echo $comment["urlToShow"] . "&" . freetrix_sessid_get();
?>
', '<?php 
echo $comment["ID"];
?>
');" title="<?php 
echo GetMessage("BPC_MES_SHOW");
?>
">
								<?else:?>
									<a href="<?php 
echo $comment["urlToShow"] . "&" . freetrix_sessid_get();
?>
" title="<?php 
echo GetMessage("BPC_MES_SHOW");
?>
">
								<?endif;?>
								<?php 
echo GetMessage("BPC_MES_SHOW");
?>
</a></span>
							<?
						}
						if(strlen($comment["urlToHide"])>0)
						{
							?>
							<span class="blog-vert-separator"></span>
							<span class="blog-comment-show">
								<?if($arParams["AJAX_POST"] == "Y"):?>
									<a href="javascript:void(0)" onclick="return hideShowComment('<?php 
echo $comment["urlToHide"] . "&" . freetrix_sessid_get();
?>
', '<?php 
echo $comment["ID"];
?>
');" title="<?php 
echo GetMessage("BPC_MES_HIDE");
?>
">
								<?else:?>
									<a href="<?php 
echo $comment["urlToHide"] . "&" . freetrix_sessid_get();
?>
" title="<?php 
echo GetMessage("BPC_MES_HIDE");
?>
">
								<?endif;?>
								<?php 
echo GetMessage("BPC_MES_HIDE");
?>
</a></span>
							<?
						}
						if(strlen($comment["urlToDelete"])>0)
						{
							?>
							<span class="blog-vert-separator"></span>
							<span class="blog-comment-delete">
								<?if($arParams["AJAX_POST"] == "Y"):?>
									<a href="javascript:void(0)" onclick="if(confirm('<?php 
echo GetMessage("BPC_MES_DELETE_POST_CONFIRM");
?>
')) deleteComment('<?php 
echo $comment["urlToDelete"] . "&" . freetrix_sessid_get();
?>
', '<?php 
echo $comment["ID"];
?>
');" title="<?php 
echo GetMessage("BPC_MES_DELETE");
?>
">
								<?else:?>
									<a href="javascript:if(confirm('<?php 
echo GetMessage("BPC_MES_DELETE_POST_CONFIRM");
?>
')) window.location='<?php 
echo $comment["urlToDelete"] . "&" . freetrix_sessid_get();
?>
&IBLOCK_ID=<?php 
echo $_REQUEST["IBLOCK_ID"];
?>
&ELEMENT_ID=<?php 
echo $_REQUEST["ELEMENT_ID"];
?>
' title="<?php 
echo GetMessage("BPC_MES_DELETE");
?>
">
								<?endif;?>
								<?php 
echo GetMessage("BPC_MES_DELETE");
?>
</a></span>
							<?
						}
						if(strlen($comment["urlToSpam"])>0)
						{
							?>
							<span class="blog-vert-separator"></span>
							<span class="blog-comment-delete blog-comment-spam"><a href="<?php 
echo $comment["urlToSpam"];
?>
" title="<?php 
echo GetMessage("BPC_MES_SPAM_TITLE");
?>
"><?php 
echo GetMessage("BPC_MES_SPAM");
?>
</a></span>
							<?
						}
						if ($arParams["SHOW_RATING"] == "Y")
						{
							?>
							<span class="rating_vote_text">
							<span class="blog-vert-separator"></span>
							<?$GLOBALS["APPLICATION"]->IncludeComponent(
								"freetrix:rating.vote", $arParams["RATING_TYPE"],
								Array(
									"ENTITY_TYPE_ID" => "BLOG_COMMENT",
									"ENTITY_ID" => $comment["ID"],
									"OWNER_ID" => $comment["arUser"]["ID"],
									"USER_VOTE" => $arParams["RATING"][$comment["ID"]]["USER_VOTE"],
									"USER_HAS_VOTED" => $arParams["RATING"][$comment["ID"]]["USER_HAS_VOTED"],
									"TOTAL_VOTES" => $arParams["RATING"][$comment["ID"]]["TOTAL_VOTES"],
									"TOTAL_POSITIVE_VOTES" => $arParams["RATING"][$comment["ID"]]["TOTAL_POSITIVE_VOTES"],
									"TOTAL_NEGATIVE_VOTES" => $arParams["RATING"][$comment["ID"]]["TOTAL_NEGATIVE_VOTES"],
									"TOTAL_VALUE" => $arParams["RATING"][$comment["ID"]]["TOTAL_VALUE"],
									"PATH_TO_USER_PROFILE" => $arParams["~PATH_TO_USER"],
								),
								$arParams["component"],
								array("HIDE_ICONS" => "Y")
							);?>
							</span>
							<?
						}
						?>
						</div>

					</div>
					</div>
					</div>
						<div class="blog-clear-float"></div>

					<?
					if(strlen($errorComment) <= 0 && (strlen($_POST["preview"]) > 0 && $_POST["show_preview"] != "N") && (IntVal($_POST["parentId"]) > 0 || IntVal($_POST["edit_id"]) > 0)
						&& ( (IntVal($_POST["parentId"])==$comment["ID"] && IntVal($_POST["edit_id"]) <= 0)
							|| (IntVal($_POST["edit_id"]) > 0 && IntVal($_POST["edit_id"]) == $comment["ID"] && $comment["CAN_EDIT"] == "Y")))
					{
						$commentPreview = Array(
								"ID" => "preview",
								"TitleFormated" => htmlspecialcharsEx($_POST["subject"]),
								"TextFormated" => $_POST["commentFormated"],
								"AuthorName" => $User["NAME"],
								"DATE_CREATE" => GetMessage("B_B_MS_PREVIEW_TITLE"),
							);
						ShowComment($commentPreview, (IntVal($_POST["edit_id"]) == $comment["ID"] && $comment["CAN_EDIT"] == "Y") ? $level : ($level+1), 2.5, false, Array(), false, false, false, $arParams);
					}

					if(strlen($errorComment)>0 && $bCanUserComment===true
						&& (IntVal($_POST["parentId"])==$comment["ID"] || IntVal($_POST["edit_id"]) == $comment["ID"]))
					{
						?>
						<div class="blog-errors blog-note-box blog-note-error">
							<div class="blog-error-text">
								<?php 
echo $errorComment;
?>
							</div>
						</div>
						<?
					}
					?>
					</div>
					<div id="err_comment_<?php 
echo $comment['ID'];
?>
"></div>
					<div id="form_comment_<?php 
echo $comment['ID'];
?>
"></div>
					<div id="new_comment_cont_<?php 
echo $comment['ID'];
?>
" style="padding-left:<?php 
echo $paddingSizeNew;
?>
em;"></div>
					<div id="new_comment_<?php 
echo $comment['ID'];
?>
" style="display:none;"></div>

					<?
					if((strlen($errorComment) > 0 || strlen($_POST["preview"]) > 0)
						&& (IntVal($_POST["parentId"])==$comment["ID"] || IntVal($_POST["edit_id"]) == $comment["ID"])
						&& $bCanUserComment===true)
					{
						?>
						<script>
						top.text<?php 
echo $comment["ID"];
?>
 = text<?php 
echo $comment["ID"];
?>
 = '<?php 
echo CUtil::JSEscape($_POST["comment"]);
?>
';
						top.title<?php 
echo $comment["ID"];
?>
 = title<?php 
echo $comment["ID"];
?>
 = '<?php 
echo CUtil::JSEscape($_POST["subject"]);
?>
';
						<?
						if(IntVal($_POST["edit_id"]) == $comment["ID"])
						{
							?>editComment('<?php 
echo $comment["ID"];
?>
');<?
						}
						else
						{
							?>showComment('<?php 
echo $comment["ID"];
?>
', 'Y', '<?php 
echo CUtil::JSEscape($_POST["user_name"]);
?>
', '<?php 
echo CUtil::JSEscape($_POST["user_email"]);
?>
', 'Y');<?
						}
						?>
						</script>
						<?
					}
				}
				elseif($comment["SHOW_AS_HIDDEN"] == "Y")
					echo "<b>".GetMessage("BPC_HIDDEN_COMMENT")."</b>";
				?>
				</div>
				<?
			}
		}
Exemplo n.º 13
0
		"ICON"=>"btn_list",
	)
);
if($ID>0)
{
	$aMenu[] = array("SEPARATOR"=>"Y");
	$aMenu[] = array(
		"TEXT"=>GetMessage("fav_edit_add"),
		"TITLE"=>GetMessage("fav_edit_add_title"),
		"LINK"=>"favorite_edit.php?lang=".LANG,
		"ICON"=>"btn_new",
	);
	$aMenu[] = array(
		"TEXT"=>GetMessage("fav_edit_del"),
		"TITLE"=>GetMessage("fav_edit_del_title"),
		"LINK"=>"javascript:if(confirm('".GetMessage("fav_edit_del_conf")."')) window.location='favorite_list.php?ID=".$ID."&action=delete&lang=".LANG."&".freetrix_sessid_get()."';",
		"ICON"=>"btn_delete",
	);
}
$context = new CAdminContextMenu($aMenu);
$context->Show();

if(is_array($_SESSION["SESS_ADMIN"]["FAVORITES_EDIT_MESSAGE"]))
{
	CAdminMessage::ShowMessage($_SESSION["SESS_ADMIN"]["FAVORITES_EDIT_MESSAGE"]);
	$_SESSION["SESS_ADMIN"]["FAVORITES_EDIT_MESSAGE"]=false;
}

if($message)
	echo $message->Show();
Exemplo n.º 14
0
);

if (StrLen($CONDITION) > 0)
{
	$aMenu[] = array("SEPARATOR" => "Y");

	$aMenu[] = array(
		"TEXT" => GetMessage("MURL_ACT_ADD"),
		"LINK" => "/freetrix/admin/urlrewrite_edit.php?lang=".LANG."&site_id=".UrlEncode($site_id)."&".GetFilterParams("filter_", false),
		"ICON"	=> "btn_new",
		"TITLE" => GetMessage("MURL_ACT_ADD_ALT"),
	);

	$aMenu[] = array(
		"TEXT" => GetMessage("MURL_ACT_DEL"),
		"LINK" => "javascript:if(confirm('".GetMessage("MURL_ACT_DEL_CONF")."')) window.location='/freetrix/admin/urlrewrite_list.php?ID=".urlencode(urlencode($CONDITION))."&filter_site_id=".urlencode(urlencode($site_id))."&action=delete&lang=".LANG."&".freetrix_sessid_get()."';",
		"WARNING" => "Y",
		"ICON"	=> "btn_delete"
	);
}
$context = new CAdminContextMenu($aMenu);
$context->Show();

if($message)
	echo $message->Show();
?>


<form method="POST" action="<?php 
echo $APPLICATION->GetCurPage();
?>
Exemplo n.º 15
0
	function InitJS($Params)
	{
		global $APPLICATION, $USER;
		CUtil::InitJSCore(array('window', 'ajax'));
		$APPLICATION->AddHeadScript('/freetrix/js/fileman/sticker.js', true);
		$APPLICATION->SetAdditionalCSS('/freetrix/js/fileman/sticker.css', true);

		$pageUrl = $APPLICATION->GetCurPage();
		$pageTitle = $APPLICATION->GetTitle();
		if ($pageTitle == '')
			$pageTitle = $pageUrl;

		$listSize = CUtil::GetPopupSize("bx_sticker_list_resize_id", array("width" => 800, "height" => 450));
		$size = explode("_", COption::GetOptionString("fileman", "stickers_start_sizes", "350_200"));
		$min_width = 280;
		$min_height = 160;
		$JSConfig = array(
			"access" => CSticker::CanDoOperation('sticker_edit') ? "W" : "R",
			"sessid_get" => freetrix_sessid_get(),
			"start_width" => $size[0] > $min_width ? $size[0] : $min_width,
			"start_height" => $size[1] > $min_height ? $size[1] : $min_height,
			"min_width" => $min_width,
			"min_height" => $min_height,
			"start_color" => CUserOptions::GetOption('fileman', "stickers_last_color", 0),
			"zIndex" => 5000,
			"curUserName" => CSticker::GetUserName(),
			"curUserId" => $USER->GetId(),
			"pageUrl" => $pageUrl,
			"pageTitle" => $pageTitle,
			"bShowStickers" => $Params['bInit'],
			"listWidth" => $listSize['width'],
			"listHeight" => $listSize['height'],
			"listNaviSize" => CUserOptions::GetOption('fileman', "stickers_navi_size", 5),
			"useHotkeys" => COption::GetOptionString('fileman', "stickers_use_hotkeys", "Y") == "Y",
			"filterParams" => CSticker::GetFilterParams(),
			"bHideBottom" => COption::GetOptionString("fileman", "stickers_hide_bottom", "Y") == "Y",
			"focusOnSticker" => isset($_GET['show_sticker'])? intVal($_GET['show_sticker']): 0,
			"strDate" => FormatDate("j F", time()+CTimeZone::GetOffset()),
			"curPageCount" => $Params['curPageCount'],
			"site_id" => SITE_ID
		);

		if (!is_array($Params['stickers']))
			$Params['stickers'] = array();

		self::$Params = array("JSCONFIG" => $JSConfig, "STICKERS" => $Params['stickers']);
	}
Exemplo n.º 16
0
		"ICON"=>"btn_list",
	)
);
if($ID>0)
{
	$aMenu[] = array("SEPARATOR"=>"Y");
	$aMenu[] = array(
		"TEXT"=>GetMessage("RATING_RULE_EDIT_ADD"),
		"TITLE"=>GetMessage("RATING_RULE_EDIT_ADD_TITLE"),
		"LINK"=>"rating_rule_edit.php?lang=".LANG,
		"ICON"=>"btn_new",
	);
	$aMenu[] = array(
		"TEXT"=>GetMessage("RATING_RULE_EDIT_DEL"),
		"TITLE"=>GetMessage("RATING_RULE_EDIT_DEL_TITLE"),
		"LINK"=>"javascript:if(confirm('".GetMessage("RATING_RULE_EDIT_DEL_CONF")."')) window.location='rating_rule_list.php?ID=".$ID."&action=delete&lang=".LANG."&".freetrix_sessid_get()."';",
		"ICON"=>"btn_delete",
	);
}
$context = new CAdminContextMenu($aMenu);
$context->Show();

if(is_array($_SESSION["SESS_ADMIN"]["RATING_RULE_EDIT_MESSAGE"]))
{
	CAdminMessage::ShowMessage($_SESSION["SESS_ADMIN"]["RATING_RULE_EDIT_MESSAGE"]);
	$_SESSION["SESS_ADMIN"]["RATING_RULE_EDIT_MESSAGE"]=false;
}

if($message)
	echo $message->Show();
Exemplo n.º 17
0
if ($bEdit && !$only_edit)
{
	if ($USER->CanDoOperation('edit_php'))
	{
		$aMenu[] = array("SEPARATOR"=>"Y");

		$aMenu[] = array(
			"TEXT" => GetMessage("FILEMAN_MENU_EDIT_AS_TEXT"),
			"LINK" => "fileman_file_edit.php?path=".UrlEncode($path."/.".$name.".menu.php")."&site=".$site."&full_src=Y&".$addUrl
		);
	}

	$aMenu[] = array("SEPARATOR"=>"Y");
	$aMenu[] = array(
		"TEXT" => GetMessage("FILEMAN_MENU_EDIT_DELETE"),
		"LINK" => "javascript:if(confirm('".GetMessage("FILEMAN_DEL_CONF")."')) window.location='fileman_admin.php?path=".UrlEncode($path)."&action=delete&ID[]=".UrlEncode(".".$name.".menu.php")."&".$addUrl."&".freetrix_sessid_get()."#tb';",
		"WARNING" => "Y"
	);
}

$context = new CAdminContextMenu($aMenu);
$context->Show();

$number_new_params = COption::GetOptionInt("fileman", "num_menu_param", 1, $site);
?>
<?endif;?>
<?CAdminMessage::ShowMessage($strWarning);?>

<?if(strlen($strWarning)<=0):?>
<?if($USER->CanDoFileOperation('fm_edit_existent_file',$arPath_m)):?>
Exemplo n.º 18
0
	function ShowUploadForm($Params)
	{
		?>
<HTML>
<HEAD>
<style>
	body {margin:0px !important; overflow: hidden;}
	body *{font-family:Verdana,Arial,Helvetica,sans-serif; font-size: 13px; color: #000;}
	form {margin:0px !important;}
	table.mlsd-ifrm-tbl {width: 400px; height: 265px; margin: 3px;}
	a.mlsd-up-link{text-decoration: none; color: #6E8C9B; font-size: 11px;}
	table.mlsd-ifrm-tbl input{width: 220px;}
	div.mlsd-col-cont{height: 70px;}
	div.mlsd-col-label, div.mlsd-col-sel{font-weight: bold; float: left; padding: 2px; margin: 2px;}
	div.mlsd-col-sel select{width: 90px; display: block; margin-top: -2px;}
	div.mlsd-ch-col{float: left; border: 1px solid #6E8C9B; width: 80px; height: 20px; padding: 0px; overflow: hidden; margin: 2px; position: relative; background: url(/freetrix/images/fileman/medialib/group_bg.gif) repeat-x scroll left top;}
	div.mlsd-ch-col span{white-space: nowrap; font-size: 12px !important; display: block; margin: 2px 0 0 2px;}
	div.mlsd-ch-col img.ml-col-del{width: 17px; height: 18px; background-image: url(/freetrix/images/fileman/medialib/iconkit.gif); position: absolute; display: none; background-position: 0px -60px; top: 1px; right: 1px; cursor: pointer;}
	div.col-over img.ml-col-del{display: block !important;}
	div.mlsd-prev-cont{width: 150px; height: 140px; border: 1px solid #6E8C9B; text-align: center;}
	div.mlsd-prev-cont img{margin: 2px;}
	div.mlsd-prev-cont span{color: #6E8C9B; font-size: 11px; display: block; padding: 2px;}
	select option.opt-checked{color: #808080; font-weight: bold; background-color: #F2F6F8;}
	div.mlsd-size-cont{text-align: center; color: #808080;}
</style>
</HEAD>
<BODY style="margin:0px !important;">
<form name="ml_item_form" action="/freetrix/admin/fileman_medialib.php?action=edit_item&<?php 
echo freetrix_sessid_get();
?>
" onsubmit="return parent.oBXMediaLib.EditItemDialogOnsubmit();" method="post" enctype="multipart/form-data"><table class="mlsd-ifrm-tbl">
		<tr><td colSpan="2">
			<div id="mlsd_fname_cont">
				<b><?php 
echo GetMessage('ML_FILE');
?>
:</b><span style="padding: 0px 15px" id="ml_file_name"></span>
			</div>
			<div id="mlsd_load_cont">
				<b><label for="ml_load_file"><?php 
echo GetMessage('ML_FILE');
?>
:</label></b>
				<input id="ml_load_file" type="file" name="load_file" style="margin-left: 15px; width:180px;">
			</div>
			<div id="mlsd_select_cont" style="display: none;">
				<b><label for="mlsd_item_path"><?php 
echo GetMessage('ML_FILE');
?>
:</label></b>
				<input type="text" size="25" value="" id="mlsd_item_path" style="margin-left: 15px;  width: 280px;" name="item_path">
				<input type="button" id="mlsd_open_fd" value="..." style="width: 30px;">
			</div>
			<div style="text-align: right; padding-right: 20px;">
			<div style="float: left; text-align: left; margin-top: -2px;">
			<a id="mlsd_fname_change" href="javascript:void(0)" class="mlsd-up-link" title="<?php 
echo GetMessage('ML_CHANGE_FILE_TITLE');
?>
">(<?php 
echo GetMessage('ML_CHANGE');
?>
)</a>
			<a id="mlsd_fname_change_back" href="javascript:void(0)" class="mlsd-up-link" title="<?php 
echo GetMessage('ML_CHANGE_UNDO_TITLE');
?>
">(<?php 
echo GetMessage('ML_CHANGE_UNDO');
?>
)</a>
			</div>
			<a id="mlsd_select_fd" href="javascript:void(0)" class="mlsd-up-link" title="<?php 
echo GetMessage('ML_SELECT_FILE_TITLE');
?>
"><?php 
echo GetMessage('ML_SELECT_FILE');
?>
</a>
			<a id="mlsd_select_pc" href="javascript:void(0)" class="mlsd-up-link" title="<?php 
echo GetMessage('ML_LOAD_FILE_TITLE');
?>
" style="display: none;"><?php 
echo GetMessage('ML_LOAD_FILE');
?>
</a>
			</div>
		</td></tr>
		<tr><td><b><label for="mlsd_item_name"><?php 
echo GetMessage('ML_NAME');
?>
:</label></b><br /><input type="text" id="mlsd_item_name" name="item_name"/></td>
			<td rowSpan="3" style="padding-top: 10px;">
			<div class="mlsd-prev-cont"><span id="mlsd_no_preview"><?php 
echo GetMessage('ML_NO_PREVIEW');
?>
</span><img id="mlsd_item_thumb" src="/freetrix/images/1.gif" /></div>
			<div class="mlsd-size-cont" id="mlsd_item_size"  title="<?php 
echo GetMessage('ML_SIZE_IN_PX');
?>
"></div>
			</td></tr>
		<tr>
			<td style="vertical-align: top;"><label for="mlsd_item_desc"><?php 
echo GetMessage('ML_DESC');
?>
:</label><br />
			<textarea id="mlsd_item_desc" rows="2" cols="26" name="item_desc"></textarea></td>
		</tr>
		<tr><td><label for="mlsd_item_keywords"><?php 
echo GetMessage('ML_KEYWORDS');
?>
:<br /></label><input type="text" id="mlsd_item_keywords" name="item_keywords"/></td></tr>
		<tr><td colSpan="2">
		<div class="mlsd-col-cont">
			<div class="mlsd-col-label"><label for="mlsd_coll_sel"><?php 
echo GetMessage('ML_COLLECTIONS');
?>
:</label></div>
			<div class="mlsd-col-sel"><select title="<?php 
echo GetMessage('ML_ADD_COL2ITEM');
?>
" id="mlsd_coll_sel"><option value="0"><?php 
echo GetMessage('ML_COL_SELECT');
?>
</option></select></div>
		</div>
		</td></tr>
	</table>

	<? /* <input type="hidden" name="MAX_FILE_SIZE" value="1000000000">*/?>
	<input id="mlsd_item_collections" type="hidden" name="item_collections" value="">
	<input id="mlsd_item_id" type="hidden" name="id" value="">
	<input id="mlsd_source_type" type="hidden" name="source_type" value="PC">
</form>
</BODY>
</HTML>
<?
	}
Exemplo n.º 19
0
			"TITLE"	=> GetMessage("FORM_CREATE_QUESTION"),
			"LINK"	=> "form_field_edit.php?lang=".LANGUAGE_ID."&WEB_FORM_ID=".$WEB_FORM_ID
			);

		$aMenu[] = array(
			"ICON"	=> "btn_copy",
			"TEXT"	=> GetMessage("FORM_CP"),
			"TITLE"	=> GetMessage("FORM_COPY_QUESTION"),
			"LINK"	=> "form_field_edit.php?ID=".$ID."&amp;copy_id=".$ID."&lang=".LANGUAGE_ID. "&WEB_FORM_ID=".$WEB_FORM_ID."&".freetrix_sessid_get()
			);

		$aMenu[] = array(
			"ICON"	=> "btn_delete",
			"TEXT"	=> GetMessage("FORM_DELETE_QUESTION"),
			"TITLE"	=> GetMessage("FORM_DELETE_QUESTION"),
			"LINK"	=> "javascript:if(confirm('".GetMessage("FORM_CONFIRM_DELETE_QUESTION")."'))window.location='form_field_list.php?action=delete&ID=".$ID."&WEB_FORM_ID=".$WEB_FORM_ID."&".freetrix_sessid_get()."&lang=".LANGUAGE_ID."';",
			"WARNING"=>"Y"
			);
	}

	$context = new CAdminContextMenu($aMenu);
	$context->Show();
}

/*
echo '<pre>'; print_r($arForm); echo '</pre>';

$aMenu[] = array("NEWBAR"=>"Y");

$aMenu[] = array(
	"TEXT"			=> GetMessage("FORM_STATUSES")." [".$arForm["STATUSES"]."]",
Exemplo n.º 20
0
	stop=false;
	document.getElementById('reindex_result_div').innerHTML='';
	document.getElementById('stop_button').disabled=false;
	document.getElementById('start_button').disabled=true;
	document.getElementById('continue_button').disabled=true;
	DoNext();
}
function DoNext(NS)
{
	var queryString = 'Reindex=Y'
		+ '&lang=<?echo htmlspecialcharsbx(LANG)?>';

	if(!NS)
	{
		interval = document.getElementById('max_execution_time').value;
		queryString += '&<?echo freetrix_sessid_get()?>'
		queryString += '&max_execution_time='+interval;
	}

	if(document.getElementById('Full').checked)
	{
		queryString += '&Full=N';

		if(!NS)
		{
			site_id = document.getElementById('LID').value;
			if(site_id != 'NOT_REF')
				queryString += '&site_id=' + site_id;

			module_id = document.getElementById('MODULE_ID').value;
			if(module_id != 'NOT_REF')
Exemplo n.º 21
0
		<td><?echo GetMessage("user_sett_common_set")?></td>
		<td><input type="checkbox" name="default" value="Y"></td>
	</tr>
<?endif;?>
<?
$tabControl->BeginNextTab();
?>
	<tr>
		<td colspan="2"><a href="javascript:if(confirm('<?echo CUtil::addslashes(GetMessage("user_sett_del_pers_conf"))?>'))window.location='user_settings.php?action=clear&lang=<?echo LANG?>&<?echo freetrix_sessid_get()?>&tabControl_active_tab=edit2';"><?echo GetMessage("user_sett_del_pers1")?></a></td>
	</tr>
<?if($USER->CanDoOperation('edit_other_settings')):?>
	<tr>
		<td colspan="2"><a href="javascript:if(confirm('<?echo CUtil::addslashes(GetMessage("user_sett_del_common_conf"))?>'))window.location='user_settings.php?action=clear_all&lang=<?echo LANG?>&<?echo freetrix_sessid_get()?>&tabControl_active_tab=edit2';"><?echo GetMessage("user_sett_del_common1")?></a></td>
	</tr>
	<tr>
		<td colspan="2"><a href="javascript:if(confirm('<?echo CUtil::addslashes(GetMessage("user_sett_del_user_conf"))?>'))window.location='user_settings.php?action=clear_all_user&lang=<?echo LANG?>&<?echo freetrix_sessid_get()?>&tabControl_active_tab=edit2';"><?echo GetMessage("user_sett_del_user1")?></a></td>
	</tr>
<?endif;?>

<?
$tabControl->Buttons();
?>
<input<?if(!$editable) echo " disabled"?> type="submit" name="apply" value="<?echo GetMessage("admin_lib_edit_apply")?>" title="<?echo GetMessage("admin_lib_edit_apply_title")?>" class="adm-btn-save">
<?
$tabControl->End();
$tabControl->ShowWarnings("form1", $message);
?>
</form>

<?
require_once ($_SERVER["DOCUMENT_ROOT"].FX_ROOT."/modules/main/include/epilog_admin.php");
Exemplo n.º 22
0
		//*****************************************************************//

	}
	//*****************************************************************//

}
/////////////////////////////////////////////////////////////////////
$APPLICATION->SetTitle(GetMessage("IBLOCK_ADM_IMP_PAGE_TITLE").$STEP);
require ($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_after.php");
/*********************************************************************/
/********************  BODY  *****************************************/
/*********************************************************************/
CAdminMessage::ShowMessage($strError);
if (!$bAllLinesLoaded)
{
	$strParams = freetrix_sessid_get()."&CUR_FILE_POS=".$curFilePos."&CUR_LOAD_SESS_ID=".urlencode($CUR_LOAD_SESS_ID)."&STEP=4&URL_DATA_FILE=".urlencode($DATA_FILE_NAME)."&IBLOCK_ID=".$IBLOCK_ID."&fields_type=".urlencode($fields_type)."&max_execution_time=".IntVal($max_execution_time);
	if ($fields_type == "R")
		$strParams.= "&delimiter_r=".urlencode($delimiter_r)."&delimiter_other_r=".urlencode($delimiter_other_r)."&first_names_r=".urlencode($first_names_r);
	else
		$strParams.= "&metki_f=".urlencode($metki_f)."&first_names_f=".urlencode($first_names_f);
?>

	<?echo GetMessage("IBLOCK_ADM_IMP_AUTO_REFRESH"); ?>
	<a href="<?echo $APPLICATION->GetCurPage(); ?>?lang=<?echo LANG ?>&<?echo $strParams ?>"><?echo GetMessage("IBLOCK_ADM_IMP_AUTO_REFRESH_STEP"); ?></a><br>

	<script language="JavaScript" type="text/javascript">
	<!--
	function DoNext()
	{
		window.location="<?echo $APPLICATION->GetCurPage(); ?>?lang=<?echo LANG ?>&<?echo $strParams ?>";
	}
Exemplo n.º 23
0
		"TITLE"=>GetMessage("FORM_EDIT_ALT"),
		"ACTION"=>$lAdmin->ActionRedirect("form_status_edit.php?lang=".LANGUAGE_ID."&ID=$f_ID&WEB_FORM_ID=$WEB_FORM_ID"),
		"TEXT"=>GetMessage("FORM_EDIT")
	);
	if ($F_RIGHT>=30)
	{
		$arActions[] = array(
			"ICON"=>"copy",
			"TITLE"=>GetMessage("FORM_COPY"),
			"ACTION"=>$lAdmin->ActionRedirect("form_status_list.php?lang=".LANGUAGE_ID."&cp_id=$f_ID&WEB_FORM_ID=$WEB_FORM_ID&".freetrix_sessid_get()),
			"TEXT"=>GetMessage("FORM_CP")
		);
		$arActions[] = array(
			"ICON"=>"delete",
			"TITLE"=>GetMessage("FORM_STATUS_DELETE_ALT"),
			"ACTION"=>"javascript:if(confirm('".GetMessage("FORM_DELETE_STATUS_CONFIRM")."')) ".$lAdmin->ActionRedirect("?lang=".LANGUAGE_ID."&action=delete&ID=$f_ID&WEB_FORM_ID=$WEB_FORM_ID&".freetrix_sessid_get()),
			"TEXT"=>GetMessage("FORM_STATUS_DELETE")
		);
	}
	$row->AddActions($arActions);
}




// list "footer"
$lAdmin->AddFooter(
	array(
		array("title"=>GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value"=>$rsData->SelectedRowsCount()),
		array("counter"=>true, "title"=>GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value"=>"0"),
	)
Exemplo n.º 24
0
	if(($USER->CanDoFileOperation('fm_download_file', $arPath) && !(HasScriptExtension($path) || substr(CFileman::GetFileName($path), 0, 1)==".")) || $USER->CanDoOperation('edit_php'))
	{
		$aMenu[] = array(
			"TEXT"=>GetMessage("FILEMAN_FILEEDIT_DOWNLOAD"),
			"LINK"=>"fileman_file_download.php?".$addUrl."&amp;site=".Urlencode($site)."&amp;path=".UrlEncode($path)
		);
	}

	if($USER->CanDoFileOperation('fm_delete_file', $arPath))
	{
		$folder_path = substr($path, 0, strrpos($path, "/"));
		$id = GetFileName($path);
		$aMenu[] = array(
			"TEXT" => GetMessage("FILEMAN_FILE_DELETE"),
			"LINK" => "javascript:if(confirm('".GetMessage("FILEMAN_FILE_DELETE_CONFIRM")."')) window.location='/freetrix/admin/fileman_admin.php?ID=".urlencode($id)."&action=delete&".$addUrl."&site=".urlencode($site)."&path=".urlencode($folder_path)."&".freetrix_sessid_get()."';",
			"TITLE"	=> GetMessage("FILEMAN_FILE_DELETE")
		);
	}
}

$context = new CAdminContextMenu($aMenu);
$context->Show();

global $__fd_path;

$__fd_path = $bEdit ? $arParsedPath["PREV"] : $path;

$arContextTemplates = Array();

$arTemplates = CFileman::GetFileTemplates(LANGUAGE_ID, array($site_template));
Exemplo n.º 25
0
require($_SERVER["DOCUMENT_ROOT"].FX_ROOT."/modules/main/include/prolog_admin_after.php");
?>
<style>
.no-select {-moz-user-select: none; -khtml-user-select: none; user-select: none;}
</style>
<script>
function DoAction(oEvent, action, module_id)
{
	if (oEvent.ctrlKey || BX.browser.IsMac() && oEvent.altKey)
	{
		BX('version_for_' + module_id).className = 'no-select';
		if(action == 'version_down')
		{
			ShowWaitWindow();
			BX.ajax.post(
				'module_admin.php?lang=<?echo LANGUAGE_ID?>&id='+module_id+'&<?echo freetrix_sessid_get()?>&action='+action,
				null,
				function(result){
					CloseWaitWindow();
					BX('version_for_' + module_id).className = '';
					if(result.length > 0)
						BX('version_for_' + module_id).innerHTML = result;
				}
			);
		}
	}
}
</script>
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="list-table">
	<tr class="heading">
		<td width="60%"><b><?echo GetMessage("MOD_NAME")?></b></td>
Exemplo n.º 26
0
	public static function GetPanelButtons($IBLOCK_ID=0, $ELEMENT_ID=0, $SECTION_ID=0, $arOptions=array())
	{
		/** @global CMain $APPLICATION */
		global $APPLICATION;

		$arButtons = array(
			"view" => array(),
			"edit" => array(),
			"configure" => array(),
			"submenu" => array(),
		);

		if(array_key_exists("SECTION_BUTTONS", $arOptions) && $arOptions["SECTION_BUTTONS"] === false)
			$bSectionButtons = false;
		else
			$bSectionButtons = true;

		if(array_key_exists("SESSID", $arOptions) && $arOptions["SESSID"] === false)
			$bSessID = false;
		else
			$bSessID = true;

		$IBLOCK_ID = intval($IBLOCK_ID);
		$ELEMENT_ID = intval($ELEMENT_ID);
		$SECTION_ID = intval($SECTION_ID);

		if(($ELEMENT_ID > 0) && (($IBLOCK_ID <= 0) || ($bSectionButtons && $SECTION_ID == 0)))
		{
			$rsIBlockElement = CIBlockElement::GetList(array(), array(
				"ID" => $ELEMENT_ID,
				"ACTIVE_DATE" => "Y",
				"ACTIVE" => "Y",
				"CHECK_PERMISSIONS" => "Y",
			), false, false, array("ID", "IBLOCK_ID", "IBLOCK_SECTION_ID"));
			if($arIBlockElement = $rsIBlockElement->Fetch())
			{
				$IBLOCK_ID = $arIBlockElement["IBLOCK_ID"];
				$SECTION_ID = $arIBlockElement["IBLOCK_SECTION_ID"];
			}
		}

		if($IBLOCK_ID <= 0)
			return $arButtons;

		$bCatalog = false;
		if(isset($arOptions["CATALOG"]) && $arOptions["CATALOG"] == true)
		{
			if(CModule::IncludeModule('catalog'))
				$bCatalog = true;
		}

		$return_url = array(
			"add_element" => "",
			"edit_element" => "",
			"edit_iblock" => "",
			"history_element" => "",
			"edit_section" => "",
			"add_section" => "",
			"delete_section" => "",
			"delete_element" => "",
			"element_list" => "",
			"section_list" => "",
		);

		if(array_key_exists("RETURN_URL", $arOptions))
		{
			if(is_array($arOptions["RETURN_URL"]))
			{
				foreach($arOptions["RETURN_URL"] as $key => $url)
					if(!empty($url) && array_key_exists($key, $return_url))
						$return_url[$key] = $url;
			}
			elseif(!empty($arOptions["RETURN_URL"]))
			{
				foreach($return_url as $key => $url)
					$return_url[$key] = $arOptions["RETURN_URL"];
			}
		}

		$str = "";
		foreach($return_url as $key => $url)
		{
			if(empty($url))
			{
				if(empty($str))
				{
					if(defined("FX_AJAX_PARAM_ID"))
						$str = $APPLICATION->GetCurPageParam("", array(FX_AJAX_PARAM_ID));
					else
						$str = $APPLICATION->GetCurPageParam();
				}

				$return_url[$key] = $str;
			}
		}

		$arIBlock = CIBlock::GetArrayByID($IBLOCK_ID);
		$bWorkflow = CModule::IncludeModule("workflow") && ($arIBlock["WORKFLOW"] !== "N");
		$s = $bWorkflow? "&WF=Y": "";

		$arLabels = $arOptions["LABELS"];

		if($ELEMENT_ID > 0 && CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $ELEMENT_ID, "element_edit"))
		{
			$url = "/freetrix/admin/".CIBlock::GetAdminElementEditLink($IBLOCK_ID, $ELEMENT_ID, array(
				"force_catalog" => $bCatalog,
				"filter_section" => $SECTION_ID,
				"bxpublic" => "Y",
				"from_module" => "iblock",
				"return_url" => $return_url["edit_element"],
			)).$s;

			$action = $APPLICATION->GetPopupLink(
				array(
					"URL" => $url,
					"PARAMS" => array(
						"width" => 700, 'height' => 400, 'resize' => false,
					),
				)
			);

			$arButton = array(
				"TEXT" => (strlen($arLabels["ELEMENT_EDIT_TEXT"])? $arLabels["ELEMENT_EDIT_TEXT"]: $arIBlock["ELEMENT_EDIT"]),
				"TITLE" => (strlen($arLabels["ELEMENT_EDIT_TITLE"])? $arLabels["ELEMENT_EDIT_TITLE"]: $arIBlock["ELEMENT_EDIT"]),
				"ACTION" => 'javascript:'.$action,
				"ACTION_URL" => $url,
				"ONCLICK" => $action,
				"DEFAULT" => ($APPLICATION->GetPublicShowMode() != 'configure'? true: false),
				"ICON" => "bx-context-toolbar-edit-icon",
				"ID" => "bx-context-toolbar-edit-element"
			);
			$arButtons["edit"]["edit_element"] = $arButton;
			$arButtons["configure"]["edit_element"] = $arButton;

			$url = str_replace("&bxpublic=Y&from_module=iblock", "", $url);
			$arButton["ACTION"] = "javascript:jsUtils.Redirect([], '".CUtil::JSEscape($url)."')";
			unset($arButton["ONCLICK"]);
			$arButtons["submenu"]["edit_element"] = $arButton;

			if($bWorkflow)
			{
				$url = "/freetrix/admin/iblock_history_list.php?type=".$arIBlock["IBLOCK_TYPE_ID"]."&lang=".LANGUAGE_ID."&IBLOCK_ID=".$IBLOCK_ID."&ELEMENT_ID=".$ELEMENT_ID."&filter_section=".$SECTION_ID."&return_url=".UrlEncode($return_url["history_element"]);
				$arButton = array(
					"TEXT" => GetMessage("IBLOCK_PANEL_HISTORY_BUTTON"),
					"TITLE" => GetMessage("IBLOCK_PANEL_HISTORY_BUTTON"),
					"ACTION" => "javascript:jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
					"ONCLICK" => "jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
					"ID" => "bx-context-toolbar-history-element"
				);
				$arButtons["submenu"]["history_element"] = $arButton;
			}
		}

		if(CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, $SECTION_ID, "section_element_bind"))
		{
			$url = "/freetrix/admin/".CIBlock::GetAdminElementEditLink($IBLOCK_ID, null, array(
				"force_catalog" => $bCatalog,
				"filter_section" => $SECTION_ID,
				"IBLOCK_SECTION_ID" => $SECTION_ID,
				"bxpublic" => "Y",
				"from_module" => "iblock",
				"return_url" => $return_url["add_element"],
			));

			$action = $APPLICATION->GetPopupLink(
				array(
					"URL" => $url,
					"PARAMS" => array(
						"width" => 700,
						'height' => 400,
						'resize' => false,
					),
				)
			);
			$arButton = array(
				"TEXT" => (strlen($arLabels["ELEMENT_ADD_TEXT"])? $arLabels["ELEMENT_ADD_TEXT"]: $arIBlock["ELEMENT_ADD"]),
				"TITLE" => (strlen($arLabels["ELEMENT_ADD_TITLE"])? $arLabels["ELEMENT_ADD_TITLE"]: $arIBlock["ELEMENT_ADD"]),
				"ACTION" => 'javascript:'.$action,
				"ACTION_URL" => $url,
				"ONCLICK" => $action,
				"ICON" => "bx-context-toolbar-create-icon",
				"ID" => "bx-context-toolbar-add-element",
			);
			$arButtons["edit"]["add_element"] = $arButton;
			$arButtons["configure"]["add_element"] = $arButton;
			$arButtons["intranet"][] = array(
				'TEXT' => $arButton["TEXT"],
				'TITLE' => $arButton["TITLE"],
				'ICON'	=> 'add',
				'ONCLICK' => $arButton["ACTION"],
				'SORT' => 1000,
			);

			$url = str_replace("&bxpublic=Y&from_module=iblock", "", $url);
			$arButton["ACTION"] = "javascript:jsUtils.Redirect([], '".CUtil::JSEscape($url)."')";
			unset($arButton["ONCLICK"]);
			$arButtons["submenu"]["add_element"] = $arButton;
		}

		if($ELEMENT_ID > 0 && CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $ELEMENT_ID, "element_delete"))
		{
			//Delete Element
			if(!empty($arButtons["edit"]))
				$arButtons["edit"][] = array("SEPARATOR" => "Y", "HREF" => "");
			if(!empty($arButtons["configure"]))
				$arButtons["configure"][] = array("SEPARATOR" => "Y", "HREF" => "");
			if(!empty($arButtons["submenu"]))
				$arButtons["submenu"][] = array("SEPARATOR" => "Y", "HREF" => "");

			$url = CIBlock::GetAdminElementListLink($IBLOCK_ID, array('action'=>'delete'));
			if($bSessID)
				$url .= '&'.freetrix_sessid_get();
			$url .= '&ID='.(preg_match('/^iblock_list_admin\.php/', $url)? "E": "").$ELEMENT_ID."&return_url=".UrlEncode($return_url["delete_element"]);
			$url = "/freetrix/admin/".$url;
			$arButton = array(
				"TEXT" => (strlen($arLabels["ELEMENT_DELETE_TEXT"])? $arLabels["ELEMENT_DELETE_TEXT"]: $arIBlock["ELEMENT_DELETE"]),
				"TITLE" => (strlen($arLabels["ELEMENT_DELETE_TITLE"])? $arLabels["ELEMENT_DELETE_TITLE"]: $arIBlock["ELEMENT_DELETE"]),
				"ACTION"=>"javascript:if(confirm('".GetMessageJS("IBLOCK_PANEL_ELEMENT_DEL_CONF")."'))jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
				"ACTION_URL" => $url,
				"ONCLICK"=>"if(confirm('".GetMessageJS("IBLOCK_PANEL_ELEMENT_DEL_CONF")."'))jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
				"ICON" => "bx-context-toolbar-delete-icon",
				"ID" => "bx-context-toolbar-delete-element"
			);
			$arButtons["edit"]["delete_element"] = $arButton;
			$arButtons["configure"]["delete_element"] = $arButton;
			$arButtons["submenu"]["delete_element"] = $arButton;
		}

		if($ELEMENT_ID <= 0 && $bSectionButtons)
		{
			$rsIBTYPE = CIBlockType::GetByID($arIBlock["IBLOCK_TYPE_ID"]);
			if(($arIBTYPE = $rsIBTYPE->Fetch()) && ($arIBTYPE["SECTIONS"] == "Y"))
			{
				if($SECTION_ID > 0 && CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, $SECTION_ID, "section_edit"))
				{
					if(!empty($arButtons["edit"]))
						$arButtons["edit"][] = array("SEPARATOR" => "Y", "HREF" => "");
					if(!empty($arButtons["configure"]))
						$arButtons["configure"][] = array("SEPARATOR" => "Y", "HREF" => "");
					if(!empty($arButtons["submenu"]))
						$arButtons["submenu"][] = array("SEPARATOR" => "Y", "HREF" => "");

					$url = "/freetrix/admin/".CIBlock::GetAdminSectionEditLink($IBLOCK_ID, $SECTION_ID, array(
						"force_catalog" => $bCatalog,
						"filter_section" => $SECTION_ID,
						"bxpublic" => "Y",
						"from_module" => "iblock",
						"return_url" => $return_url["edit_section"],
					));

					$action = $APPLICATION->GetPopupLink(
						array(
							"URL" => $url,
							"PARAMS" => array(
								"width" => 700, 'height' => 400, 'resize' => false,
							),
						)
					);

					$arButton = array(
						"TEXT" => (strlen($arLabels["SECTION_EDIT_TEXT"])? $arLabels["SECTION_EDIT_TEXT"]: $arIBlock["SECTION_EDIT"]),
						"TITLE" => (strlen($arLabels["SECTION_EDIT_TITLE"])? $arLabels["SECTION_EDIT_TITLE"]: $arIBlock["SECTION_EDIT"]),
						"ACTION" => 'javascript:'.$action,
						"ACTION_URL" => $url,
						"ICON" => "bx-context-toolbar-edit-icon",
						"ONCLICK" => $action,
						"DEFAULT" => ($APPLICATION->GetPublicShowMode() != 'configure'? true: false),
						"ID" => "bx-context-toolbar-edit-section"
					);
					$arButtons["edit"]["edit_section"] = $arButton;
					$arButtons["configure"]["edit_section"] = $arButton;

					$url = str_replace("&bxpublic=Y&from_module=iblock", "", $url);
					$arButton["ACTION"] = "javascript:jsUtils.Redirect([], '".CUtil::JSEscape($url)."')";
					unset($arButton["ONCLICK"]);
					$arButtons["submenu"]["edit_section"] = $arButton;
				}

				if(CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, $SECTION_ID, "section_section_bind"))
				{
					$url = "/freetrix/admin/".CIBlock::GetAdminSectionEditLink($IBLOCK_ID, null, array(
						"force_catalog" => $bCatalog,
						"IBLOCK_SECTION_ID" => $SECTION_ID,
						"filter_section" => $SECTION_ID,
						"bxpublic" => "Y",
						"from_module" => "iblock",
						"return_url" => $return_url["add_section"],
					));

					$action = $APPLICATION->GetPopupLink(
						array(
							"URL" => $url,
							"PARAMS" => array(
								"width" => 700, 'height' => 400, 'resize' => false,
							),
						)
					);

					$arButton = array(
						"TEXT" => (strlen($arLabels["SECTION_ADD_TEXT"])? $arLabels["SECTION_ADD_TEXT"]: $arIBlock["SECTION_ADD"]),
						"TITLE" => (strlen($arLabels["SECTION_ADD_TITLE"])? $arLabels["SECTION_ADD_TITLE"]: $arIBlock["SECTION_ADD"]),
						"ACTION" => 'javascript:'.$action,
						"ACTION_URL" => $url,
						"ICON" => "bx-context-toolbar-create-icon",
						"ID" => "bx-context-toolbar-add-section",
						"ONCLICK" => $action
					);

					$arButtons["edit"]["add_section"] = $arButton;
					$arButtons["configure"]["add_section"] = $arButton;

					$url = str_replace("&bxpublic=Y&from_module=iblock", "", $url);
					$arButton["ACTION"] = "javascript:jsUtils.Redirect([], '".CUtil::JSEscape($url)."')";
					unset($arButton["ONCLICK"]);
					$arButtons["submenu"]["add_section"] = $arButton;
				}

				//Delete section
				if($SECTION_ID > 0 && CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, $SECTION_ID, "section_delete"))
				{
					$url = CIBlock::GetAdminSectionListLink($IBLOCK_ID, Array('action'=>'delete'));
					if($bSessID)
						$url .= '&'.freetrix_sessid_get();
					$url .= '&ID[]='.(preg_match('/^iblock_list_admin\.php/', $url)? "S": "").$SECTION_ID."&return_url=".UrlEncode($return_url["delete_section"]);
					$url = "/freetrix/admin/".$url;

					$arButton = array(
						"TEXT" => (strlen($arLabels["SECTION_DELETE_TEXT"])? $arLabels["SECTION_DELETE_TEXT"]: $arIBlock["SECTION_DELETE"]),
						"TITLE" => (strlen($arLabels["SECTION_DELETE_TITLE"])? $arLabels["SECTION_DELETE_TITLE"]: $arIBlock["SECTION_DELETE"]),
						"ACTION" => "javascript:if(confirm('".GetMessageJS("IBLOCK_PANEL_SECTION_DEL_CONF")."'))jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
						"ACTION_URL" => $url,
						"ONCLICK" => "if(confirm('".GetMessageJS("IBLOCK_PANEL_SECTION_DEL_CONF")."'))jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
						"ICON" => "bx-context-toolbar-delete-icon",
						"ID" => "bx-context-toolbar-delete-section"
					);
					$arButtons["edit"]["delete_section"] = $arButton;
					$arButtons["configure"]["delete_section"] = $arButton;
					$arButtons["submenu"]["delete_section"] = $arButton;
				}
			}
		}

		if( ($IBLOCK_ID > 0) && CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_admin_display") )
		{
			if(!empty($arButtons["submenu"]))
				$arButtons["submenu"][] = array("SEPARATOR" => "Y", "HREF" => "");

			if($SECTION_ID > 0)
				$url = "/freetrix/admin/".CIBlock::GetAdminElementListLink($IBLOCK_ID , array('find_section_section'=>$SECTION_ID));
			else
				$url = "/freetrix/admin/".CIBlock::GetAdminElementListLink($IBLOCK_ID , array('find_el_y'=>'Y'));

			$arButton = array(
				"TEXT" => (strlen($arLabels["ELEMENTS_NAME_TEXT"])? $arLabels["ELEMENTS_NAME_TEXT"]: $arIBlock["ELEMENTS_NAME"]),
				"TITLE" => (strlen($arLabels["ELEMENTS_NAME_TITLE"])? $arLabels["ELEMENTS_NAME_TITLE"]: $arIBlock["ELEMENTS_NAME"]),
				"ACTION" => "javascript:jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
				"ACTION_URL" => $url,
				"ONCLICK" => "jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
				"ID" => "bx-context-toolbar-elements-list"
			);
			$arButtons["submenu"]["element_list"] = $arButton;

			$arButtons["intranet"]["element_list"] = array(
				'TEXT' => $arButton["TEXT"],
				'TITLE' => $arButton["TITLE"],
				'ICON' => 'settings',
				'ONCLICK' => $arButton["ACTION"],
				'SORT' => 1010,
			);

			$url = "/freetrix/admin/".CIBlock::GetAdminSectionListLink($IBLOCK_ID, array('find_section_section'=>$SECTION_ID));
			$arButton = array(
				"TEXT" => (strlen($arLabels["SECTIONS_NAME_TEXT"])? $arLabels["SECTIONS_NAME_TEXT"]: $arIBlock["SECTIONS_NAME"]),
				"TITLE" => (strlen($arLabels["SECTIONS_NAME_TITLE"])? $arLabels["SECTIONS_NAME_TITLE"]: $arIBlock["SECTIONS_NAME"]),
				"ACTION" => "javascript:jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
				"ACTION_URL" => $url,
				"ONCLICK" => "jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
				"ID" => "bx-context-toolbar-sections-list"
			);
			$arButtons["submenu"]["section_list"] = $arButton;

			if(CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_edit"))
			{
				$url = "/freetrix/admin/iblock_edit.php?type=".$arIBlock["IBLOCK_TYPE_ID"]."&lang=".LANGUAGE_ID."&ID=".$IBLOCK_ID."&return_url=".UrlEncode($return_url["edit_iblock"]);
				$arButton = array(
					"TEXT" => GetMessage("IBLOCK_PANEL_EDIT_IBLOCK_BUTTON", array("#IBLOCK_NAME#"=>$arIBlock["NAME"])),
					"TITLE" => GetMessage("IBLOCK_PANEL_EDIT_IBLOCK_BUTTON", array("#IBLOCK_NAME#"=>$arIBlock["NAME"])),
					"ACTION" => "javascript:jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
					"ACTION_URL" => $url,
					"ONCLICK" => "jsUtils.Redirect([], '".CUtil::JSEscape($url)."')",
					"ID" => "bx-context-toolbar-edit-iblock"
				);
				$arButtons["submenu"]["edit_iblock"] = $arButton;
			}
		}

		return $arButtons;
	}
Exemplo n.º 27
0
 public function GetIcons()
 {
     /** @global CMain $APPLICATION */
     global $USER, $APPLICATION;
     $arIcons = array();
     $arPanelParams = array();
     $arComponentDescription = CComponentUtil::GetComponentDescr($this->componentName);
     $bComponentAccess = $USER->CanDoOperation('edit_php') || $this->bSrcFound && $USER->CanDoFileOperation('fm_lpa', array(SITE_ID, $this->sSrcFile));
     if ($bComponentAccess && !$this->parentComponent && $this->bSrcFound) {
         $url = $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/component_props.php?" . "component_name=" . urlencode(CUtil::addslashes($this->componentName)) . "&component_template=" . urlencode(CUtil::addslashes($this->componentTemplate)) . "&template_id=" . urlencode(CUtil::addslashes(SITE_TEMPLATE_ID)) . "&lang=" . urlencode(CUtil::addslashes(LANGUAGE_ID)) . "&src_path=" . urlencode(CUtil::addslashes($this->sSrcFile)) . "&src_line=" . $this->iSrcLine . "&src_page=" . urlencode(CUtil::addslashes($APPLICATION->GetCurPage())) . "&src_site=" . urlencode(CUtil::addslashes(SITE_ID)), "PARAMS" => array("min_width" => 450)));
         $arIcons[] = array('URL' => 'javascript:' . $url, 'TYPE' => 'components2_props', 'ICON' => "bx-context-toolbar-settings-icon", 'TITLE' => GetMessage("main_incl_file_comp_param"), 'DEFAULT' => true);
         $aMenuItem = array("TEXT" => $arComponentDescription["NAME"], "TITLE" => GetMessage("main_comp_button_menu_title") . ' ' . $this->componentName, "ICON" => "parameters-2", "ACTION" => $url);
         $APPLICATION->AddPanelButtonMenu("components", $aMenuItem);
     }
     if ($bComponentAccess) {
         $template = $this->component->GetTemplate();
         if (is_null($template)) {
             if ($this->component->InitComponentTemplate()) {
                 $template = $this->component->GetTemplate();
             }
         }
         if (!is_null($template)) {
             $urlCopy = '';
             if ($this->bSrcFound && $template->IsInTheme() == false) {
                 //copy template dialog
                 $urlCopy = "/freetrix/admin/template_copy.php?" . "lang=" . urlencode(CUtil::addslashes(LANGUAGE_ID)) . "&component_name=" . urlencode(CUtil::addslashes($this->componentName)) . "&component_template=" . urlencode(CUtil::addslashes($this->componentTemplate)) . "&template_id=" . urlencode(CUtil::addslashes(SITE_TEMPLATE_ID)) . "&template_site_template=" . urlencode(CUtil::addslashes($template->GetSiteTemplate())) . "&src_path=" . urlencode(CUtil::addslashes($this->sSrcFile)) . "&src_line=" . $this->iSrcLine . "&src_site=" . urlencode(CUtil::addslashes(SITE_ID)) . "&edit_file=" . urlencode($template->GetPageName()) . "&back_path=" . urlencode($_SERVER["REQUEST_URI"]);
                 $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => $urlCopy, "PARAMS" => array("min_width" => 450))), 'ICON' => "copy-2", 'TITLE' => GetMessage("main_comp_copy_templ"), 'IN_MENU' => true);
             }
             if ($USER->CanDoOperation('edit_php') && strlen($template->GetSiteTemplate()) > 0) {
                 //edit template copied to site template
                 $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/public_file_edit_src.php?site=" . SITE_ID . "&" . 'path=' . urlencode($template->GetFile()) . "&back_url=" . urlencode($_SERVER["REQUEST_URI"]) . "&lang=" . LANGUAGE_ID, 'PARAMS' => array('width' => 770, 'height' => 470, 'resize' => true, "dialog_type" => 'EDITOR'))), 'ICON' => 'edit-2', 'TITLE' => GetMessage("main_comp_edit_templ"), 'IN_MENU' => true);
                 if (strlen($template->GetFolder()) > 0) {
                     if (file_exists($_SERVER["DOCUMENT_ROOT"] . $template->GetFolder() . "/style.css")) {
                         //edit template CSS copied to site template
                         $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/public_file_edit_src.php?site=" . SITE_ID . "&" . 'path=' . urlencode($template->GetFolder() . "/style.css") . "&back_url=" . urlencode($_SERVER["REQUEST_URI"]) . "&lang=" . LANGUAGE_ID, 'PARAMS' => array('width' => 770, 'height' => 470, 'resize' => true, "dialog_type" => 'EDITOR'))), 'ICON' => 'edit-css', 'TITLE' => GetMessage("main_comp_edit_css"), 'IN_MENU' => true);
                     }
                     $bWasSep = false;
                     if (file_exists($_SERVER["DOCUMENT_ROOT"] . $template->GetFolder() . "/result_modifier.php")) {
                         $bWasSep = true;
                         $arIcons[] = array('SEPARATOR' => true);
                         $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/public_file_edit_src.php?site=" . SITE_ID . "&" . 'path=' . urlencode($template->GetFolder() . "/result_modifier.php") . "&back_url=" . urlencode($_SERVER["REQUEST_URI"]) . "&lang=" . LANGUAGE_ID, 'PARAMS' => array('width' => 770, 'height' => 470, 'resize' => true, "dialog_type" => 'EDITOR'))), 'TITLE' => GetMessage("main_comp_edit_res_mod"), 'IN_MENU' => true);
                     }
                     if (file_exists($_SERVER["DOCUMENT_ROOT"] . $template->GetFolder() . "/component_epilog.php")) {
                         if (!$bWasSep) {
                             $arIcons[] = array('SEPARATOR' => true);
                         }
                         $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/public_file_edit_src.php?site=" . SITE_ID . "&" . 'path=' . urlencode($template->GetFolder() . "/component_epilog.php") . "&back_url=" . urlencode($_SERVER["REQUEST_URI"]) . "&lang=" . LANGUAGE_ID, 'PARAMS' => array('width' => 770, 'height' => 470, 'resize' => true, "dialog_type" => 'EDITOR'))), 'TITLE' => GetMessage("main_comp_edit_epilog"), 'IN_MENU' => true);
                     }
                 }
             } elseif ($urlCopy != '') {
                 //copy template for future editing
                 $urlCopy .= '&system_template=Y';
                 $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => $urlCopy, "PARAMS" => array("min_width" => 450))), 'ICON' => "edit-2", 'TITLE' => GetMessage("main_comp_edit_templ"), 'ALT' => GetMessage("main_comp_copy_title"), 'IN_MENU' => true);
             }
         }
     }
     $aAddIcons = array();
     $arPanelParams['COMPONENT'] = $this->componentName;
     if ($arComponentDescription && is_array($arComponentDescription)) {
         $arPanelParams['COMPONENT_DESCRIPTION'] = $arComponentDescription;
         //component bar tooltip
         $arPanelParams['TOOLTIP'] = array('TITLE' => $arComponentDescription["NAME"], 'TEXT' => '(' . GetMessage('main_incl_comp_component') . ' ' . $this->componentName . ')' . (isset($arComponentDescription["DESCRIPTION"]) && $arComponentDescription["DESCRIPTION"] != "" ? '<br />' . $arComponentDescription["DESCRIPTION"] : ''));
         //clear cache
         if (array_key_exists("CACHE_PATH", $arComponentDescription) && $USER->CanDoOperation('cache_control')) {
             if (strlen($arComponentDescription["CACHE_PATH"]) > 0) {
                 $arIcons[] = array("URL" => "javascript:jsComponentUtils.ClearCache('component_name=" . urlencode(CUtil::addslashes($this->componentName)) . "&site_id=" . SITE_ID . "&" . freetrix_sessid_get() . "');", "ICON" => "del-cache", "TITLE" => GetMessage("MAIN_FX_COMPONENT_CACHE_CLEAR"), 'IN_MENU' => true);
                 $APPLICATION->aCachedComponents[] = $this->componentName;
             }
         }
         //additional buttons from component description
         if (array_key_exists("AREA_BUTTONS", $arComponentDescription)) {
             $componentRelativePath = CComponentEngine::MakeComponentPath($this->componentName);
             $localPath = getLocalPath("components" . $componentRelativePath);
             foreach ($arComponentDescription["AREA_BUTTONS"] as $value) {
                 if (array_key_exists("SRC", $value)) {
                     $value["SRC"] = $localPath . $value["SRC"];
                 }
                 $aAddIcons[] = $value;
             }
         }
     }
     if (!empty($arIcons) && !empty($aAddIcons)) {
         $arIcons[] = array("SEPARATOR" => true);
     }
     $arIcons = array_merge($arIcons, $aAddIcons);
     $aAddIcons = $this->component->GetIncludeAreaIcons();
     if (!empty($arIcons) && !empty($aAddIcons)) {
         $arIcons[] = array("SEPARATOR" => true);
     }
     $arIcons = array_merge($arIcons, $aAddIcons);
     // enable/disable menu item
     if ($bComponentAccess && !$this->parentComponent && $this->bSrcFound) {
         if (!empty($arIcons)) {
             $arIcons[] = array("SEPARATOR" => true);
         }
         $arIcons[] = array("URL" => "javascript:jsComponentUtils.EnableComponent('component_name=" . urlencode(CUtil::addslashes($this->componentName)) . "&lang=" . urlencode(CUtil::addslashes(LANGUAGE_ID)) . "&src_path=" . urlencode(CUtil::addslashes($this->sSrcFile)) . "&src_line=" . $this->iSrcLine . "&src_site=" . urlencode(CUtil::addslashes(SITE_ID)) . '&active=' . ($this->bComponentEnabled ? 'N' : 'Y') . '&' . freetrix_sessid_get() . "');", "TITLE" => $this->bComponentEnabled ? GetMessage("main_comp_disable") : GetMessage("main_comp_enable"), "ALT" => $this->bComponentEnabled ? GetMessage("main_comp_disable_title") : GetMessage("main_comp_enable_title"), 'IN_MENU' => true);
     }
     if ($this->bSrcFound) {
         $arPanelParams['COMPONENT_ID'] = md5($arPanelParams['COMPONENT'] . '|' . $this->sSrcFile . ':' . $this->iSrcLine);
     }
     return array("icons" => $arIcons, "parameters" => $arPanelParams);
 }
Exemplo n.º 28
0
	$arActions = Array();

	if ($F_RIGHT>=25)
		$arActions[] = array("DEFAULT"=>"Y", "ICON"=>"edit", "TITLE"=>GetMessage("FORM_EDIT_ALT"), "ACTION"=>$lAdmin->ActionRedirect("form_edit.php?lang=".LANGUAGE_ID."&ID=$f_ID"), "TEXT"=>GetMessage("FORM_EDIT"));
	if (CForm::IsAdmin())
		$arActions[] = array("ICON"=>"copy", "TITLE"=>GetMessage("FORM_COPY_ALT"),"ACTION"=>$lAdmin->ActionRedirect("form_list.php?lang=".LANGUAGE_ID."&amp;makecopy_id=$f_ID&".freetrix_sessid_get()),"TEXT"=>GetMessage("FORM_COPY"));
	if ($old_module_version=="Y" && $F_RIGHT>=10)
		$arActions[] = array("TITLE"=>GetMessage("FORM_PREVIEW_ALT"),"ACTION"=>$lAdmin->ActionRedirect("form_view.php?lang=".LANGUAGE_ID."&WEB_FORM_ID=$f_ID"),"TEXT"=>GetMessage("FORM_PREVIEW"));
	if ($F_RIGHT>=30)
	{
		$arActions[] = array("SEPARATOR"=>true);
		$arActions[] = array("TITLE"=>GetMessage("FORM_DELETE_RESULTS_ALT"),"ACTION"=>"javascript:if(confirm('".GetMessage("FORM_CONFIRM_DELETE_RESULTS")."')) window.location='?lang=".LANGUAGE_ID."&reset_id=".$f_ID."&".freetrix_sessid_get()."'", "TEXT"=>GetMessage("FORM_DELETE_RESULTS"));
	}
	if (CForm::IsAdmin())
		$arActions[] = array("ICON"=>"delete", "TITLE"=>GetMessage("FORM_DELETE_ALT"),"ACTION"=>"javascript:if(confirm('".GetMessage("FORM_CONFIRM_DELETE")."')) window.location='?lang=".LANGUAGE_ID."&action=delete&ID=$f_ID&".freetrix_sessid_get()."'","TEXT"=>GetMessage("FORM_DELETE"));

	$row->AddActions($arActions);


}

// list footer
$lAdmin->AddFooter(
	array(
		array("title"=>GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value"=>$rsData->SelectedRowsCount()),
		array("counter"=>true, "title"=>GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value"=>"0"),
	)
);

if ($FORM_RIGHT=="W")
Exemplo n.º 29
0
	function ActionDoGroup($id, $action_id, $add_params='')
	{
		/** @global CMain $APPLICATION */
		global $APPLICATION;
		return $this->table_id.".GetAdminList('".CUtil::AddSlashes($APPLICATION->GetCurPage())."?ID=".CUtil::AddSlashes($id)."&action_button=".CUtil::AddSlashes($action_id)."&lang=".LANGUAGE_ID."&".freetrix_sessid_get().($add_params<>""?"&".CUtil::AddSlashes($add_params):"")."');";
	}
Exemplo n.º 30
0
			"ACTION" => $lAdmin->ActionRedirect($APPLICATION->GetCurPage()."?id=".htmlspecialcharsbx($info["MODULE_ID"])."&lang=".LANG."&uninstall=Y&".freetrix_sessid_get()),
		);
	}
	else
	{
		$arActions[] = array(
			"ICON" => "add",
			"DEFAULT" => false,
			"TEXT" => GetMessage("MOD_INSTALL_BUTTON"),
			"ACTION" => $lAdmin->ActionRedirect($APPLICATION->GetCurPage()."?id=".htmlspecialcharsbx($info["MODULE_ID"])."&lang=".LANG."&install=Y&".freetrix_sessid_get()),
		);
		$arActions[] = array(
			"ICON" => "delete",
			"DEFAULT" => false,
			"TEXT" => GetMessage("MOD_SMP_DELETE"),
			"ACTION" => "if(confirm('".GetMessageJS('MOD_CLEAR_CONFIRM', Array("#NAME#" => htmlspecialcharsbx($info["MODULE_NAME"])))."')) ".$lAdmin->ActionRedirect($APPLICATION->GetCurPage()."?id=".htmlspecialcharsbx($info["MODULE_ID"])."&lang=".LANG."&clear=Y&".freetrix_sessid_get()),
		);
	}
	$row->AddActions($arActions);
}

$lAdmin->CheckListMode();


$lAdmin1->BeginPrologContent();
echo "<h2>".GetMessage("MOD_SMP_BUY_MOD")."</h2><p>".GetMessage("MOD_SMP_BUY_MOD_TEXT1")."<br />".GetMessage("MOD_SMP_BUY_MOD_TEXT2")."</p>";
$lAdmin1->EndPrologContent();

$arHeaders1 = Array(
	array(
		"id" => "NAME",