XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
functions.admin.php
Go to the documentation of this file.
1 <?php
14 if(!defined("FRAMEWORKS_ART_FUNCTIONS_ADMIN")):
15 define("FRAMEWORKS_ART_FUNCTIONS_ADMIN", true);
16 
17 defined("FRAMEWORKS_ART_FUNCTIONS_INI") || include_once dirname(__FILE__) . "/functions.ini.php";
18 
19 function loadModuleAdminMenu ($currentoption = -1, $breadcrumb = "")
20 {
21  if (!$adminmenu = $GLOBALS["xoopsModule"]->getAdminMenu()) {
22  return false;
23  }
24 
25  $breadcrumb = empty($breadcrumb) ? $adminmenu[$currentoption]["title"] : $breadcrumb;
26  $module_link = XOOPS_URL . "/modules/" . $GLOBALS["xoopsModule"]->getVar("dirname") . "/";
27  $image_link = XOOPS_URL . "/Frameworks/compat/include";
28 
29  $adminmenu_text ='
30  <style type="text/css">
31  <!--
32  #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;}
33  #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;}
34  #buttonbar ul { margin: 0; margin-top: 15px; padding: 10px 10px 0; list-style: none; }
35  #buttonbar li { display: inline; margin: 0; padding: 0; }
36  #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; }
37  #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; }
38  /* Commented Backslash Hack hides rule from IE5-Mac \*/
39  #buttonbar a span {float: none;}
40  /* End IE5-Mac hack */
41  #buttonbar a:hover span { color:#333; }
42  #buttonbar .current a { background-position: 0 -150px; border-width: 0; }
43  #buttonbar .current a span { background-position: 100% -150px; padding-bottom: 5px; color: #333; }
44  #buttonbar a:hover { background-position: 0% -150px; }
45  #buttonbar a:hover span { background-position: 100% -150px; }
46  //-->
47  </style>
48  <div id="buttontop">
49  <table style="width: 100%; padding: 0; " cellspacing="0">
50  <tr>
51  <td style="width: 70%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;">
52  <a href="../index.php">' . $GLOBALS["xoopsModule"]->getVar("name") . '</a>
53  </td>
54  <td style="width: 30%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;">
55  <strong>' . $GLOBALS["xoopsModule"]->getVar("name") . '</strong>&nbsp;' . $breadcrumb . '
56  </td>
57  </tr>
58  </table>
59  </div>
60  <div id="buttonbar">
61  <ul>
62  ';
63  foreach (array_keys($adminmenu) as $key) {
64  $adminmenu_text .= (($currentoption == $key) ? '<li class="current">' : '<li>') . '<a href="' . $module_link . $adminmenu[$key]["link"] . '"><span>' . $adminmenu[$key]["title"] . '</span></a></li>';
65  }
66  if ( $GLOBALS["xoopsModule"]->getVar("hasconfig") || $GLOBALS["xoopsModule"]->getVar("hascomments") || $GLOBALS["xoopsModule"]->getVar("hasnotification") ) {
67  $adminmenu_text .= '<li><a href="' . XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $GLOBALS["xoopsModule"]->getVar("mid") . '"><span>' . _PREFERENCES . '</span></a></li>';
68  }
69  $adminmenu_text .= '
70  </ul>
71  </div>
72  <br style="clear:both;" />';
73 
74  echo $adminmenu_text;
75 }
77 ?>