本文整理汇总了PHP中admin_tools::GetAddonSubLinks方法的典型用法代码示例。如果您正苦于以下问题:PHP admin_tools::GetAddonSubLinks方法的具体用法?PHP admin_tools::GetAddonSubLinks怎么用?PHP admin_tools::GetAddonSubLinks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin_tools
的用法示例。
在下文中一共展示了admin_tools::GetAddonSubLinks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetAddonLinks
/**
* Return the addon section of the admin panel
*
*/
static function GetAddonLinks($in_panel)
{
global $langmessage, $config;
$expand_class = 'expand_child';
if (!$in_panel) {
$expand_class = 'expand_child_click';
}
ob_start();
$addon_permissions = admin_tools::HasPermission('Admin_Addons');
if ($addon_permissions) {
echo '<li>';
echo common::Link('Admin_Addons', $langmessage['manage']);
echo '</li>';
if (gp_remote_plugins) {
echo '<li class="separator">';
echo common::Link('Admin_Addons/Remote', $langmessage['Download Plugins']);
echo '</li>';
}
}
$show =& $config['addons'];
if (is_array($show)) {
foreach ($show as $addon => $info) {
//backwards compat
if (is_string($info)) {
$addonName = $info;
} elseif (isset($info['name'])) {
$addonName = $info['name'];
} else {
$addonName = $addon;
}
$sublinks = admin_tools::GetAddonSubLinks($addon);
if (!empty($sublinks)) {
echo '<li class="' . $expand_class . '">';
if ($in_panel) {
$sublinks = '<ul class="in_window">' . $sublinks . '</ul>';
} else {
$sublinks = '<ul>' . $sublinks . '</ul>';
}
} else {
echo '<li>';
}
if ($addon_permissions) {
echo common::Link('Admin_Addons/' . self::encode64($addon), $addonName);
} else {
echo '<a>' . $addonName . '</a>';
}
echo $sublinks;
echo '</li>';
}
}
return ob_get_clean();
}
示例2: GetAddonLinks
/**
* Return the addon section of the admin panel
*
*/
function GetAddonLinks($in_panel)
{
global $langmessage, $config;
ob_start();
$addon_permissions = admin_tools::HasPermission('Admin_Addons');
if ($addon_permissions) {
echo '<li>';
echo common::Link('Admin_Addons', $langmessage['manage']);
echo '</li>';
echo '<li class="seperator">';
echo common::Link('Admin_Addons', $langmessage['Download Plugins'], 'cmd=remote');
echo '</li>';
}
$show =& $config['addons'];
if (is_array($show)) {
foreach ($show as $addon => $info) {
//backwards compat
if (is_string($info)) {
$addonName = $info;
} elseif (isset($info['name'])) {
$addonName = $info['name'];
} else {
$addonName = $addon;
}
$sublinks = admin_tools::GetAddonSubLinks($addon);
if (!empty($sublinks)) {
echo '<li class="expand_child">';
if ($in_panel) {
$sublinks = '<ul class="in_window">' . $sublinks . '</ul>';
} else {
$sublinks = '<ul>' . $sublinks . '</ul>';
}
} else {
echo '<li>';
}
if ($addon_permissions) {
echo common::Link('Admin_Addons', $addonName, 'cmd=show&addon=' . $addon);
} else {
echo '<a href="#">' . $addonName . '</a>';
}
echo $sublinks;
echo '</li>';
}
}
return ob_get_clean();
}