1<?php 2/** 3 * Module admin functions 4 * 5 * @copyright (c) 2000-2016 XOOPS Project (www.xoops.org) 6 * @license GNU GPL 2 (http://www.gnu.org/licenses/gpl-2.0.html) 7 * @author Taiwen Jiang <phppp@users.sourceforge.net> 8 * @since 1.00 9 * @package Frameworks 10 * @subpackage art 11 */ 12 13if (!defined('FRAMEWORKS_ART_FUNCTIONS_ADMIN')): 14 define('FRAMEWORKS_ART_FUNCTIONS_ADMIN', true); 15 16 defined('FRAMEWORKS_ART_FUNCTIONS_INI') || include_once __DIR__ . '/functions.ini.php'; 17 18 /** 19 * @param $currentoption 20 * @param string $breadcrumb 21 * 22 * @return bool 23 */ 24 function loadModuleAdminMenu($currentoption = -1, $breadcrumb = '') 25 { 26 if (!$adminmenu = $GLOBALS['xoopsModule']->getAdminMenu()) { 27 return false; 28 } 29 30 $breadcrumb = empty($breadcrumb) ? $adminmenu[$currentoption]['title'] : $breadcrumb; 31 $module_link = XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/'; 32 $image_link = XOOPS_URL . '/Frameworks/compat/include'; 33 34 $adminmenu_text = ' 35 <style type="text/css"> 36 <!-- 37 #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;} 38 #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;} 39 #buttonbar ul { margin: 0; margin-top: 15px; padding: 10px 10px 0; list-style: none; } 40 #buttonbar li { display: inline; margin: 0; padding: 0; } 41 #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; } 42 #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; } 43 /* Commented Backslash Hack hides rule from IE5-Mac \*/ 44 #buttonbar a span {float: none;} 45 /* End IE5-Mac hack */ 46 #buttonbar a:hover span { color:#333; } 47 #buttonbar .current a { background-position: 0 -150px; border-width: 0; } 48 #buttonbar .current a span { background-position: 100% -150px; padding-bottom: 5px; color: #333; } 49 #buttonbar a:hover { background-position: 0 -150px; } 50 #buttonbar a:hover span { background-position: 100% -150px; } 51 //--> 52 </style> 53 <div id="buttontop"> 54 <table style="width: 100%; padding: 0; " cellspacing="0"> 55 <tr> 56 <td style="width: 70%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;"> 57 <a href="../index.php">' . $GLOBALS['xoopsModule']->getVar('name') . '</a> 58 </td> 59 <td style="width: 30%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;"> 60 <strong>' . $GLOBALS['xoopsModule']->getVar('name') . '</strong> ' . $breadcrumb . ' 61 </td> 62 </tr> 63 </table> 64 </div> 65 <div id="buttonbar"> 66 <ul> 67 '; 68 foreach (array_keys($adminmenu) as $key) { 69 $adminmenu_text .= (($currentoption == $key) ? '<li class="current">' : '<li>') . '<a href="' . $module_link . $adminmenu[$key]['link'] . '"><span>' . $adminmenu[$key]['title'] . '</span></a></li>'; 70 } 71 if ($GLOBALS['xoopsModule']->getVar('hasconfig') || $GLOBALS['xoopsModule']->getVar('hascomments') || $GLOBALS['xoopsModule']->getVar('hasnotification')) { 72 $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>'; 73 } 74 $adminmenu_text .= ' 75 </ul> 76 </div> 77 <br style="clear:both;" />'; 78 79 echo $adminmenu_text; 80 return null; 81 } 82endif; 83