本文整理汇总了PHP中CAdminNotify::GetHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminNotify::GetHtml方法的具体用法?PHP CAdminNotify::GetHtml怎么用?PHP CAdminNotify::GetHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminNotify
的用法示例。
在下文中一共展示了CAdminNotify::GetHtml方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetPanelHtml
//.........这里部分代码省略.........
$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']) . ' <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']) . ' <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;
}
示例2: GetMessage
?>
</a><?php
$Execs = $hkInstance->GetCodeByClassName("bx-panel-logout", GetMessage('admin_panel_logout'));
echo $hkInstance->PrintJSExecs($Execs);
}
_showTopPanelButtonsSection($arPanelButtons, $hkInstance, 1);
if ($USER->IsAuthorized()) {
if ($hkInstance->IsActive()) {
?>
<a hidefocus="true" id="bx-panel-hotkeys" href="javascript:void(0)" onclick="BXHotKeys.ShowSettings();" class="header-keyboard" title="<?php
echo GetMessage('admin_panel_hotkeys_title');
?>
"></a><?php
}
$aUserOpt = CUserOptions::GetOption("admin_panel", "settings");
?>
<a hidefocus="true" href="javascript:void(0)" id="bx-panel-pin" class="adm-header-pin" onclick="BX.adminPanel.Fix(this)" title="<?php
echo GetMessage('top_panel_pin_' . ($aUserOpt['fix'] == 'on' ? 'off' : 'on'));
?>
"></a><?php
$Execs = $hkInstance->GetCodeByClassName("bx-panel-pin", GetMessage('top_panel_pin'));
echo $hkInstance->PrintJSExecs($Execs);
}
?>
</div></div><div class="adm-header-bottom"></div><?php
if ($USER->IsAdmin()) {
echo CAdminNotify::GetHtml();
}
?>
</div><?php
echo $GLOBALS["adminPage"]->ShowSound();