本文整理匯總了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();
}