本文整理汇总了PHP中admin_tools::GetAdminGroup方法的典型用法代码示例。如果您正苦于以下问题:PHP admin_tools::GetAdminGroup方法的具体用法?PHP admin_tools::GetAdminGroup怎么用?PHP admin_tools::GetAdminGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin_tools
的用法示例。
在下文中一共展示了admin_tools::GetAdminGroup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AdminPanelLinks
/**
* Output the link areas that are displayed in the main admin toolbar and admin_main
* @param bool $in_panel Whether or not the links will be displayed in the toolbar
* @static
*/
static function AdminPanelLinks($in_panel = true)
{
global $langmessage, $page, $gpAdmin;
$expand_class = 'expand_child';
$id_piece = '';
if (!$in_panel) {
$expand_class = 'expand_child_click';
$id_piece = '_click';
}
//current page
if ($in_panel && !isset($GLOBALS['GP_ARRANGE_CONTENT']) && $page->pagetype != 'admin_display') {
echo '<div class="panelgroup" id="current_page_panel">';
self::PanelHeading($in_panel, $langmessage['Current Page'], 'icon_page_gear', 'cur');
echo '<ul class="submenu">';
echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Current Page'] . '</a></li>';
foreach ($page->admin_links as $label => $link) {
echo '<li>';
if (is_array($link)) {
echo call_user_func_array(array('common', 'Link'), $link);
/* preferred */
} elseif (is_numeric($label)) {
echo $link;
//just a text label
} elseif (empty($link)) {
echo '<span>';
echo $label;
echo '</span>';
} else {
echo '<a href="' . $link . '">';
echo $label;
echo '</a>';
}
echo '</li>';
}
echo '<li class="' . $expand_class . '" id="editable_areas_list"><a>' . $langmessage['Editable Areas'] . '</a>';
echo '<ul class="in_window">';
if ($page->pagetype == 'display') {
echo '<li class="separator">';
echo common::Link($page->title, $langmessage['Manage Sections'] . '...', 'cmd=ManageSections', array('data-cmd' => 'inline_edit_generic', 'data-arg' => 'manage_sections'));
echo '</li>';
}
echo '<li style="display:none"></li>';
//for valid html
echo '</ul>';
echo '</li>';
echo '</ul>';
echo '</div>';
echo '</div>';
}
//content
if ($links = admin_tools::GetAdminGroup('content')) {
echo '<div class="panelgroup" id="panelgroup_content' . $id_piece . '">';
self::PanelHeading($in_panel, $langmessage['Content'], 'icon_page', 'con');
echo '<ul class="submenu">';
echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Content'] . '</a></li>';
echo $links;
echo '</ul>';
echo '</div>';
echo '</div>';
}
//appearance
if ($links = self::GetAppearanceGroup($in_panel)) {
echo '<div class="panelgroup" id="panelgroup_appearance' . $id_piece . '">';
self::PanelHeading($in_panel, $langmessage['Appearance'], 'icon_app', 'app');
echo '<ul class="submenu">';
echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Appearance'] . '</a></li>';
echo $links;
echo '</ul>';
echo '</div>';
echo '</div>';
}
//add-ons
$links = admin_tools::GetAddonLinks($in_panel);
if (!empty($links)) {
echo '<div class="panelgroup" id="panelgroup_addons' . $id_piece . '">';
self::PanelHeading($in_panel, $langmessage['plugins'], 'icon_plug', 'add');
echo '<ul class="submenu">';
echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['plugins'] . '</a></li>';
echo $links;
echo '</ul>';
echo '</div>';
echo '</div>';
}
//settings
if ($links = admin_tools::GetAdminGroup('settings')) {
echo '<div class="panelgroup" id="panelgroup_settings' . $id_piece . '">';
self::PanelHeading($in_panel, $langmessage['Settings'], 'icon_edapp', 'set');
echo '<ul class="submenu">';
echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Settings'] . '</a></li>';
echo $links;
echo '</ul>';
echo '</div>';
echo '</div>';
}
//updates
//.........这里部分代码省略.........
示例2: GetAppearanceGroup
static function GetAppearanceGroup($in_panel)
{
global $page, $langmessage, $gpLayouts, $config;
if (!admin_tools::HasPermission('Admin_Theme_Content')) {
return false;
}
ob_start();
echo admin_tools::GetAdminGroup('appearance');
if (!empty($page->gpLayout)) {
echo '<li>';
echo common::Link('Admin_Theme_Content/' . urlencode($page->gpLayout), $langmessage['edit_this_layout']);
echo '</li>';
}
echo '<li>';
echo common::Link('Admin_Theme_Content/Available', $langmessage['available_themes']);
echo '</li>';
if (gp_remote_themes) {
echo '<li>';
echo common::Link('Admin_Theme_Content/Remote', $langmessage['Download Themes']);
echo '</li>';
}
//list of layouts
$expand_class = 'expand_child';
if (!$in_panel) {
$expand_class = 'expand_child_click';
}
echo '<li class="' . $expand_class . '">';
echo '<a>' . $langmessage['layouts'] . '</a>';
if ($in_panel) {
echo '<ul class="in_window">';
} else {
echo '<ul>';
}
if (!empty($page->gpLayout)) {
$to_hightlight = $page->gpLayout;
} else {
$to_hightlight = $config['gpLayout'];
}
foreach ($gpLayouts as $layout => $info) {
if ($to_hightlight == $layout) {
echo '<li class="selected">';
} else {
echo '<li>';
}
$display = '<span class="layout_color_id" style="background-color:' . $info['color'] . ';"></span> ' . $info['label'];
echo common::Link('Admin_Theme_Content/' . rawurlencode($layout), $display);
echo '</li>';
}
echo '</ul>';
echo '</li>';
return ob_get_clean();
}
示例3: AdminPanelLinks
/**
* Output the link areas that are displayed in the main admin toolbar and admin_main
* @param bool $in_panel Whether or not the links will be displayed in the toolbar
* @param array $new_versions Data about newly available versions of gpEasy and addons
* @static
*/
function AdminPanelLinks($in_panel = true, $new_versions = array())
{
global $langmessage, $page, $gpAdmin, $config;
$group2 = '<div class="panelgroup2 in_window" %s>';
//current page
if ($in_panel && !isset($GLOBALS['GP_ARRANGE_CONTENT'])) {
echo '<div class="panelgroup" id="current_page_panel">';
if (!$in_panel) {
echo '<span>' . $langmessage['Current Page'] . '</span>';
echo '<div class="panelgroup2">';
} else {
echo '<a class="toplink icon_page_gear" name="toplink" rel="cur">';
echo '<span>' . $langmessage['Current Page'] . '</span>';
echo '</a>';
if ($gpAdmin['gpui_vis'] == 'cur') {
echo '<div class="panelgroup2 in_window">';
} else {
echo '<div class="panelgroup2 in_window nodisplay">';
}
}
echo '<ul class="submenu">';
echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Current Page'] . '</a></li>';
foreach ($page->admin_links as $label => $link) {
echo '<li>';
if (is_array($link)) {
echo call_user_func_array(array('common', 'Link'), $link);
/* preferred */
} elseif (is_numeric($label)) {
echo $link;
//just a text label
} elseif (empty($link)) {
echo '<span>';
echo $label;
echo '</span>';
} else {
echo '<a href="' . $link . '">';
echo $label;
echo '</a>';
}
echo '</li>';
}
echo '<li class="expand_child"><a>' . $langmessage['Editable Areas'] . '</a>';
echo '<ul class="in_window" id="editable_areas_list">';
echo '<li><a>empty</a></li>';
echo '</ul>';
echo '</li>';
echo '</ul>';
echo '</div>';
echo '</div>';
}
//content
if ($links = admin_tools::GetAdminGroup('content')) {
echo '<div class="panelgroup">';
$label = '<span>' . $langmessage['Content'] . '</span>';
if (!$in_panel) {
echo '<span class="icon_page">' . $label . '</span>';
echo '<div class="panelgroup2">';
} else {
echo '<a class="toplink icon_page" name="toplink" rel="con">';
echo $label;
echo '</a>';
if ($gpAdmin['gpui_vis'] == 'con') {
echo '<div class="panelgroup2 in_window">';
} else {
echo '<div class="panelgroup2 in_window nodisplay">';
}
}
echo '<ul class="submenu">';
echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Content'] . '</a></li>';
echo $links;
echo '</ul>';
echo '</div>';
echo '</div>';
}
//appearance
if ($links = admin_tools::GetAdminGroup('appearance')) {
echo '<div class="panelgroup">';
$label = '<span>' . $langmessage['Appearance'] . '</span>';
if (!$in_panel) {
echo '<span class="icon_app">' . $label . '</span>';
echo '<div class="panelgroup2">';
} else {
echo '<a class="toplink icon_app" name="toplink" rel="app">';
echo $label;
echo '</a>';
if ($gpAdmin['gpui_vis'] == 'app') {
echo '<div class="panelgroup2 in_window">';
} else {
echo '<div class="panelgroup2 in_window nodisplay">';
}
}
echo '<ul class="submenu">';
echo '<li class="submenu_top"><a class="submenu_top">' . $langmessage['Appearance'] . '</a></li>';
echo $links;
//.........这里部分代码省略.........