1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: if (!defined("FRAMEWORKS_ART_FUNCTIONS_ADMIN")):
15: define("FRAMEWORKS_ART_FUNCTIONS_ADMIN", true);
16:
17: defined("FRAMEWORKS_ART_FUNCTIONS_INI") || include_once __DIR__ . "/functions.ini.php";
18:
19: 20: 21: 22: 23:
24: function loadModuleAdminMenu($currentoption = -1, $breadcrumb = "")
25: {
26: $xoops = Xoops::getInstance();
27: if (!$adminmenu = $xoops->module->getAdminMenu()) {
28: return false;
29: }
30:
31: $breadcrumb = empty($breadcrumb) ? $adminmenu[$currentoption]["title"] : $breadcrumb;
32: $xoops_url = \XoopsBaseConfig::get('url');
33: $module_link = $xoops_url . "/modules/" . $xoops->module->getVar("dirname") . "/";
34: $image_link = $xoops_url . "/Frameworks/compat/include";
35:
36: $adminmenu_text = '
37: <style type="text/css">
38: <!--
39: #buttontop { float: left; width: 100%; background: #e7e7e7; font-size: 93%; line-height: normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0;}
40: #buttonbar { float: left; width: 100%; background: #e7e7e7 url("' . $image_link . '/modadminbg.gif") repeat-x left bottom; font-size: 93%; line-height: normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px;}
41: #buttonbar ul { margin: 0; margin-top: 15px; padding: 10px 10px 0; list-style: none; }
42: #buttonbar li { display: inline; margin: 0; padding: 0; }
43: #buttonbar a { float: left; background: url("' . $image_link . '/left_both.gif") no-repeat left top; margin: 0; padding: 0 0 0 9px; border-bottom: 1px solid #000; text-decoration: none; }
44: #buttonbar a span { float: left; display: block; background: url("' . $image_link . '/right_both.gif") no-repeat right top; padding: 5px 15px 4px 6px; font-weight: bold; color: #765; }
45: /* Commented Backslash Hack hides rule from IE5-Mac \*/
46: #buttonbar a span {float: none;}
47: /* End IE5-Mac hack */
48: #buttonbar a:hover span { color:#333; }
49: #buttonbar .current a { background-position: 0 -150px; border-width: 0; }
50: #buttonbar .current a span { background-position: 100% -150px; padding-bottom: 5px; color: #333; }
51: #buttonbar a:hover { background-position: 0% -150px; }
52: #buttonbar a:hover span { background-position: 100% -150px; }
53: //-->
54: </style>
55: <div id="buttontop">
56: <table style="width: 100%; padding: 0; " cellspacing="0">
57: <tr>
58: <td style="width: 70%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;">
59: <a href="../index.php">' . $xoops->module->getVar("name") . '</a>
60: </td>
61: <td style="width: 30%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;">
62: <strong>' . $xoops->module->getVar("name") . '</strong> ' . $breadcrumb . '
63: </td>
64: </tr>
65: </table>
66: </div>
67: <div id="buttonbar">
68: <ul>
69: ';
70: foreach (array_keys($adminmenu) as $key) {
71: $adminmenu_text .= (($currentoption == $key) ? '<li class="current">' : '<li>')
72: . '<a href="' . $module_link . $adminmenu[$key]["link"] . '"><span>' . $adminmenu[$key]["title"] . '</span></a></li>';
73: }
74:
75: if ($xoops->module->getVar("hasconfig") || $xoops->module->getVar("hascomments") || $xoops->module->getVar("hasnotification")) {
76: $adminmenu_text .= '<li><a href="' . $xoops_url . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $xoops->module->getVar("mid") . '"><span>' . XoopsLocale::PREFERENCES . '</span></a></li>';
77: }
78: $adminmenu_text .= '
79: </ul>
80: </div>
81: <br style="clear:both;" />';
82:
83: echo $adminmenu_text;
84: return true;
85: }
86: endif;
87: