|
15 | 15 | * @package Mymenus
|
16 | 16 | * @since 1.0
|
17 | 17 | * @author trabis <lusopoemas@gmail.com>
|
18 |
| - * @version $Id: admin_header.php 0 2010-07-21 18:47:04Z trabis $ |
| 18 | + * @version $Id: admin_header.php |
19 | 19 | */
|
20 | 20 |
|
21 | 21 | include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
|
22 |
| -include_once dirname(__DIR__) . '/include/common.php'; |
23 |
| - |
| 22 | +include_once $GLOBALS['xoops']->path('www/include/cp_functions.php'); |
24 | 23 | // Include xoops admin header
|
25 |
| -include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; |
| 24 | +include_once $GLOBALS['xoops']->path('www/include/cp_header.php'); |
| 25 | +include_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); |
26 | 26 |
|
27 |
| -$pathIcon16 = XOOPS_URL . '/' . $mymenus->getModule()->getInfo('icons16'); |
28 |
| -$pathIcon32 = XOOPS_URL . '/' . $mymenus->getModule()->getInfo('icons32'); |
29 |
| -$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $mymenus->getModule()->getInfo('dirmoduleadmin'); |
30 |
| -require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php'; |
| 27 | +xoops_load('XoopsRequest'); |
31 | 28 |
|
32 |
| -// Load language files |
33 |
| -xoops_loadLanguage('admin', $mymenus->getModule()->dirname()); |
34 |
| -xoops_loadLanguage('modinfo', $mymenus->getModule()->dirname()); |
35 |
| -xoops_loadLanguage('main', $mymenus->getModule()->dirname()); |
| 29 | +//$moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname'); |
| 30 | +include_once dirname(__DIR__) . '/include/common.php'; |
| 31 | +//$mymenus = MymenusMymenus::getInstance($debug); |
36 | 32 |
|
37 |
| -if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { |
38 |
| - include_once(XOOPS_ROOT_PATH . '/class/template.php'); |
| 33 | +$pathIcon16 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('systemIcons16')); |
| 34 | +$pathIcon32 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('systemIcons32')); |
| 35 | +$xoopsModuleAdminPath = $GLOBALS['xoops']->path('www/' . $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin')); |
| 36 | +require_once "{$xoopsModuleAdminPath}/moduleadmin/moduleadmin.php"; |
| 37 | + |
| 38 | + |
| 39 | +$myts =& MyTextSanitizer::getInstance(); |
| 40 | +if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) { |
| 41 | + include_once $GLOBALS['xoops']->path("/class/template.php"); |
39 | 42 | $xoopsTpl = new XoopsTpl();
|
40 | 43 | }
|
41 | 44 |
|
| 45 | +$GLOBALS['xoopsTpl']->assign('pathIcon16', $pathIcon16); |
| 46 | +$GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32); |
| 47 | + |
| 48 | +// Load language files |
| 49 | +xoops_loadLanguage('admin', $mymenus->dirname); |
| 50 | +xoops_loadLanguage('modinfo', $mymenus->dirname); |
| 51 | +xoops_loadLanguage('main', $mymenus->dirname); |
| 52 | + |
42 | 53 | include_once $GLOBALS['xoops']->path('class/template.php');
|
43 |
| -include_once $GLOBALS['xoops']->path('modules/mymenus/include/functions.php'); |
44 |
| -include_once $GLOBALS['xoops']->path('modules/mymenus/class/registry.php'); |
45 |
| -include_once $GLOBALS['xoops']->path('modules/mymenus/class/plugin.php'); |
| 54 | +include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/include/functions.php"); |
| 55 | +include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/class/registry.php"); |
| 56 | +include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/class/plugin.php"); |
| 57 | + |
| 58 | + |
| 59 | +//Module specific elements |
| 60 | +//include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/include/functions.php"); |
| 61 | +//include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/include/config.php"); |
| 62 | + |
| 63 | +//Handlers |
| 64 | +//$XXXHandler =& xoops_getModuleHandler('XXX', $mymenus->dirname); |
46 | 65 |
|
47 | 66 | //$mymenusTpl = new XoopsTpl();
|
48 | 67 |
|
|
57 | 76 | $indexAdmin = new ModuleAdmin();
|
58 | 77 |
|
59 | 78 | include_once $GLOBALS['xoops']->path('class/template.php');
|
60 |
| -include_once $GLOBALS['xoops']->path('modules/mymenus/include/functions.php'); |
61 |
| -include_once $GLOBALS['xoops']->path('modules/mymenus/class/registry.php'); |
62 |
| -include_once $GLOBALS['xoops']->path('modules/mymenus/class/plugin.php'); |
| 79 | +include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/include/functions.php"); |
| 80 | +include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/class/registry.php"); |
| 81 | +include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/class/plugin.php"); |
63 | 82 |
|
64 | 83 | $mymenusTpl = new XoopsTpl();
|
65 | 84 | if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
|
|
0 commit comments