@@ -2,29 +2,29 @@ |
||
2 | 2 | |
3 | 3 | // render admin in theme.html |
4 | 4 | if (is_object($xoopsUser)) { |
5 | - $xoops_subpath = substr($_SERVER['REQUEST_URI'], strpos(strrev(XOOPS_URL), strrev($_SERVER['HTTP_HOST']))) ; |
|
5 | + $xoops_subpath = substr($_SERVER['REQUEST_URI'], strpos(strrev(XOOPS_URL), strrev($_SERVER['HTTP_HOST']))); |
|
6 | 6 | if (preg_match('#(^/admin.php|^/modules/system/|^/modules/[a-zA-Z0-9_.-]+/admin/)#', $xoops_subpath)) { |
7 | 7 | // The request looks like admin |
8 | - require_once dirname(__FILE__).'/altsys_functions.php' ; |
|
9 | - if (! empty($GLOBALS['altsysModuleConfig']['admin_in_theme']) && file_exists(XOOPS_THEME_PATH.'/'.$GLOBALS['altsysModuleConfig']['admin_in_theme'].'/theme.html')) { |
|
8 | + require_once dirname(__FILE__).'/altsys_functions.php'; |
|
9 | + if (!empty($GLOBALS['altsysModuleConfig']['admin_in_theme']) && file_exists(XOOPS_THEME_PATH.'/'.$GLOBALS['altsysModuleConfig']['admin_in_theme'].'/theme.html')) { |
|
10 | 10 | // configs OK |
11 | - require_once dirname(__FILE__).'/admin_in_theme_functions.php' ; |
|
11 | + require_once dirname(__FILE__).'/admin_in_theme_functions.php'; |
|
12 | 12 | |
13 | 13 | // for security with register_globals=1 |
14 | - unset($GLOBALS['altsysAdminPageTitle'], /* $GLOBALS['altsysXoopsBreadcrumbs'] ,*/ $GLOBALS['xoops_admin_contents']) ; |
|
14 | + unset($GLOBALS['altsysAdminPageTitle'], /* $GLOBALS['altsysXoopsBreadcrumbs'] ,*/ $GLOBALS['xoops_admin_contents']); |
|
15 | 15 | |
16 | 16 | // disable error handler without XOOPS 2.0.14/15/16 |
17 | - if (! (is_object(@$xoopsLogger) && method_exists($xoopsLogger, 'render') && in_array($xoopsConfig['debug_mode'], array( 1, 2 )))) { |
|
18 | - restore_error_handler() ; |
|
17 | + if (!(is_object(@$xoopsLogger) && method_exists($xoopsLogger, 'render') && in_array($xoopsConfig['debug_mode'], array(1, 2)))) { |
|
18 | + restore_error_handler(); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | // to prepend Notice with 2.0.14/15/16 with PHP4 |
22 | - if (! defined('E_STRICT')) { |
|
23 | - define('E_STRICT', 2048) ; |
|
22 | + if (!defined('E_STRICT')) { |
|
23 | + define('E_STRICT', 2048); |
|
24 | 24 | } |
25 | 25 | |
26 | - register_shutdown_function('altsys_admin_in_theme_in_last') ; |
|
27 | - ob_start('altsys_admin_in_theme') ; |
|
26 | + register_shutdown_function('altsys_admin_in_theme_in_last'); |
|
27 | + ob_start('altsys_admin_in_theme'); |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 | } |
@@ -24,10 +24,10 @@ discard block |
||
24 | 24 | public function _blockHeader($xbeg, $xlen, $ybeg, $ylen) |
25 | 25 | { |
26 | 26 | if ($xlen != 1) { |
27 | - $xbeg .= ',' . $xlen; |
|
27 | + $xbeg .= ','.$xlen; |
|
28 | 28 | } |
29 | 29 | if ($ylen != 1) { |
30 | - $ybeg .= ',' . $ylen; |
|
30 | + $ybeg .= ','.$ylen; |
|
31 | 31 | } |
32 | 32 | return "@@ -$xbeg +$ybeg @@"; |
33 | 33 | } |
@@ -44,6 +44,6 @@ discard block |
||
44 | 44 | |
45 | 45 | public function _changed($orig, $final) |
46 | 46 | { |
47 | - return $this->_deleted($orig) . $this->_added($final); |
|
47 | + return $this->_deleted($orig).$this->_added($final); |
|
48 | 48 | } |
49 | 49 | } |
@@ -65,17 +65,17 @@ |
||
65 | 65 | * @param bool $include_anon Include group "anonymous"? |
66 | 66 | * @param mixed $value Pre-selected value (or array of them). |
67 | 67 | */ |
68 | - public function AltsysFormCheckboxGroup($caption, $name, $include_anon=false, $value=null) |
|
68 | + public function AltsysFormCheckboxGroup($caption, $name, $include_anon = false, $value = null) |
|
69 | 69 | { |
70 | 70 | $this->XoopsFormCheckbox($caption, $name, $value); |
71 | - $member_handler =& xoops_gethandler('member'); |
|
71 | + $member_handler = & xoops_gethandler('member'); |
|
72 | 72 | if (!$include_anon) { |
73 | 73 | $options = $member_handler->getGroupList(new Criteria('groupid', XOOPS_GROUP_ANONYMOUS, '!=')); |
74 | 74 | } else { |
75 | 75 | $options = $member_handler->getGroupList(); |
76 | 76 | } |
77 | 77 | foreach ($options as $k => $v) { |
78 | - $options[$k] = $v . '<br />'; |
|
78 | + $options[$k] = $v.'<br />'; |
|
79 | 79 | } |
80 | 80 | $this->addOptionArray($options); |
81 | 81 | } |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once XOOPS_ROOT_PATH.'/modules/legacyRender/kernel/Legacy_AdminRenderSystem.class.php' ; |
|
4 | -require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php' ; |
|
5 | -require_once XOOPS_TRUST_PATH.'/libs/altsys/include/admin_in_theme_functions.php' ; |
|
3 | +require_once XOOPS_ROOT_PATH.'/modules/legacyRender/kernel/Legacy_AdminRenderSystem.class.php'; |
|
4 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php'; |
|
5 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/include/admin_in_theme_functions.php'; |
|
6 | 6 | |
7 | 7 | class Legacy_AltsysAdminRenderSystem extends Legacy_AdminRenderSystem |
8 | 8 | { |
9 | 9 | public function renderTheme(&$target) |
10 | 10 | { |
11 | - global $altsysModuleConfig ; |
|
11 | + global $altsysModuleConfig; |
|
12 | 12 | |
13 | 13 | if (empty($altsysModuleConfig['admin_in_theme'])) { |
14 | - parent::renderTheme($target) ; |
|
14 | + parent::renderTheme($target); |
|
15 | 15 | } else { |
16 | - $attributes = $target->getAttributes() ; |
|
17 | - altsys_admin_in_theme_in_last($attributes['xoops_contents']) ; |
|
18 | - exit ; |
|
16 | + $attributes = $target->getAttributes(); |
|
17 | + altsys_admin_in_theme_in_last($attributes['xoops_contents']); |
|
18 | + exit; |
|
19 | 19 | } |
20 | 20 | } |
21 | 21 | } |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! $xoopsConfig['theme_fromfile']) { |
|
4 | - return ; |
|
3 | +if (!$xoopsConfig['theme_fromfile']) { |
|
4 | + return; |
|
5 | 5 | } |
6 | 6 | |
7 | 7 | // templates/ under the theme |
8 | -$tplsadmin_autoupdate_path = XOOPS_THEME_PATH . '/' . $xoopsConfig['theme_set'] . '/templates' ; |
|
8 | +$tplsadmin_autoupdate_path = XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/templates'; |
|
9 | 9 | |
10 | -if ($handler = @opendir($tplsadmin_autoupdate_path . '/')) { |
|
10 | +if ($handler = @opendir($tplsadmin_autoupdate_path.'/')) { |
|
11 | 11 | while (($file = readdir($handler)) !== false) { |
12 | - $file_path = $tplsadmin_autoupdate_path . '/' . $file ; |
|
12 | + $file_path = $tplsadmin_autoupdate_path.'/'.$file; |
|
13 | 13 | if (is_file($file_path) && substr($file, -5) == '.html') { |
14 | - $mtime = intval(@filemtime($file_path)) ; |
|
15 | - list($count) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("tplfile")." WHERE tpl_tplset='".addslashes($xoopsConfig['template_set'])."' AND tpl_file='".addslashes($file)."' AND tpl_lastmodified >= $mtime")) ; |
|
14 | + $mtime = intval(@filemtime($file_path)); |
|
15 | + list($count) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("tplfile")." WHERE tpl_tplset='".addslashes($xoopsConfig['template_set'])."' AND tpl_file='".addslashes($file)."' AND tpl_lastmodified >= $mtime")); |
|
16 | 16 | if ($count <= 0) { |
17 | - include_once XOOPS_TRUST_PATH.'/libs/altsys/include/tpls_functions.php' ; |
|
18 | - tplsadmin_import_data($xoopsConfig['template_set'], $file, implode('', file($file_path)), $mtime) ; |
|
17 | + include_once XOOPS_TRUST_PATH.'/libs/altsys/include/tpls_functions.php'; |
|
18 | + tplsadmin_import_data($xoopsConfig['template_set'], $file, implode('', file($file_path)), $mtime); |
|
19 | 19 | } |
20 | 20 | } |
21 | 21 | } |
@@ -2,94 +2,94 @@ discard block |
||
2 | 2 | |
3 | 3 | function altsys_admin_in_theme($s) |
4 | 4 | { |
5 | - global $xoops_admin_contents ; |
|
5 | + global $xoops_admin_contents; |
|
6 | 6 | |
7 | - $xoops_admin_contents = '' ; |
|
7 | + $xoops_admin_contents = ''; |
|
8 | 8 | |
9 | 9 | if (defined('ALTSYS_DONT_USE_ADMIN_IN_THEME')) { |
10 | - return $s ; |
|
10 | + return $s; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | // check whether cp_functions.php is loaded |
14 | - if (! defined('XOOPS_CPFUNC_LOADED')) { |
|
15 | - define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1) ; |
|
16 | - return $s ; |
|
14 | + if (!defined('XOOPS_CPFUNC_LOADED')) { |
|
15 | + define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1); |
|
16 | + return $s; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | // redirect |
20 | 20 | if (strstr($s, '<meta http-equiv="Refresh" ')) { |
21 | - define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1) ; |
|
22 | - return $s ; |
|
21 | + define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1); |
|
22 | + return $s; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | // outputs before cp_header() |
26 | - @list($former_outputs, $tmp_s) = explode("<!DOCTYPE", $s, 2) ; |
|
26 | + @list($former_outputs, $tmp_s) = explode("<!DOCTYPE", $s, 2); |
|
27 | 27 | if (empty($tmp_s)) { |
28 | - $tmp_s = $s ; |
|
28 | + $tmp_s = $s; |
|
29 | 29 | } |
30 | 30 | |
31 | - @list(, $tmp_s) = explode("<div class='content'>", $tmp_s, 2) ; |
|
31 | + @list(, $tmp_s) = explode("<div class='content'>", $tmp_s, 2); |
|
32 | 32 | if (empty($tmp_s)) { |
33 | - define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1) ; |
|
34 | - return $s ; |
|
33 | + define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1); |
|
34 | + return $s; |
|
35 | 35 | } |
36 | 36 | |
37 | - list($tmp_s, $tmp_after) = explode("<td width='1%' background='".XOOPS_URL."/modules/system/images/bg_content.gif'>", $tmp_s) ; |
|
37 | + list($tmp_s, $tmp_after) = explode("<td width='1%' background='".XOOPS_URL."/modules/system/images/bg_content.gif'>", $tmp_s); |
|
38 | 38 | if (empty($tmp_after)) { |
39 | - define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1) ; |
|
40 | - return $s ; |
|
39 | + define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1); |
|
40 | + return $s; |
|
41 | 41 | } |
42 | 42 | |
43 | - $xoops_admin_contents = $former_outputs . substr(strrev(strstr(strrev($tmp_s), strrev('</div>'))), 0, -6) ; |
|
43 | + $xoops_admin_contents = $former_outputs.substr(strrev(strstr(strrev($tmp_s), strrev('</div>'))), 0, -6); |
|
44 | 44 | |
45 | - return '' ; |
|
45 | + return ''; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | |
49 | 49 | function altsys_admin_in_theme_in_last($contents = null) |
50 | 50 | { |
51 | - global $xoops_admin_contents , $xoopsConfig , $xoopsModule , $xoopsUser , $xoopsUserIsAdmin , $xoopsLogger , $altsysModuleConfig , $altsysModuleId ; |
|
51 | + global $xoops_admin_contents, $xoopsConfig, $xoopsModule, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger, $altsysModuleConfig, $altsysModuleId; |
|
52 | 52 | |
53 | - if (! isset($contents)) { |
|
53 | + if (!isset($contents)) { |
|
54 | 54 | while (ob_get_level()) { |
55 | - ob_end_flush() ; |
|
55 | + ob_end_flush(); |
|
56 | 56 | } |
57 | 57 | } else { |
58 | - $xoops_admin_contents = $contents ; |
|
58 | + $xoops_admin_contents = $contents; |
|
59 | 59 | } |
60 | 60 | |
61 | - if (! isset($xoops_admin_contents)) { |
|
62 | - return ; |
|
61 | + if (!isset($xoops_admin_contents)) { |
|
62 | + return; |
|
63 | 63 | } |
64 | 64 | if (defined('ALTSYS_DONT_USE_ADMIN_IN_THEME')) { |
65 | - return ; |
|
65 | + return; |
|
66 | 66 | } |
67 | 67 | |
68 | - if (! is_object($xoopsUser)) { |
|
69 | - exit ; |
|
68 | + if (!is_object($xoopsUser)) { |
|
69 | + exit; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | // language files |
73 | 73 | if (file_exists(dirname(dirname(__FILE__)).'/language/'.$xoopsConfig['language'].'/admin_in_theme.php')) { |
74 | - include_once dirname(dirname(__FILE__)).'/language/'.$xoopsConfig['language'].'/admin_in_theme.php' ; |
|
74 | + include_once dirname(dirname(__FILE__)).'/language/'.$xoopsConfig['language'].'/admin_in_theme.php'; |
|
75 | 75 | } else { |
76 | - include_once dirname(dirname(__FILE__)).'/language/english/admin_in_theme.php' ; |
|
76 | + include_once dirname(dirname(__FILE__)).'/language/english/admin_in_theme.php'; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | // set the theme |
80 | - $xoopsConfig['theme_set'] = $altsysModuleConfig['admin_in_theme'] ; |
|
80 | + $xoopsConfig['theme_set'] = $altsysModuleConfig['admin_in_theme']; |
|
81 | 81 | |
82 | 82 | // language files under the theme |
83 | - $original_error_level = error_reporting() ; |
|
84 | - error_reporting($original_error_level & ~ E_NOTICE) ; |
|
83 | + $original_error_level = error_reporting(); |
|
84 | + error_reporting($original_error_level & ~ E_NOTICE); |
|
85 | 85 | if (file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/'.$xoopsConfig['language'].'.php')) { |
86 | - include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/'.$xoopsConfig['language'].'.php' ; |
|
86 | + include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/'.$xoopsConfig['language'].'.php'; |
|
87 | 87 | } elseif (file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/english.php')) { |
88 | - include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/english.php' ; |
|
88 | + include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/english.php'; |
|
89 | 89 | } |
90 | - error_reporting($original_error_level) ; |
|
90 | + error_reporting($original_error_level); |
|
91 | 91 | |
92 | - include dirname(__FILE__).'/admin_in_theme_header.inc.php' ; |
|
92 | + include dirname(__FILE__).'/admin_in_theme_header.inc.php'; |
|
93 | 93 | |
94 | 94 | /* // include adminmenu |
95 | 95 | include XOOPS_CACHE_PATH.'/adminmenu.php' ; |
@@ -125,11 +125,11 @@ discard block |
||
125 | 125 | function shutdown() {'.implode("\n",$xoops_admin_menu_sd).'}' ; */ |
126 | 126 | |
127 | 127 | // appendix (core specific css etc) |
128 | - $xoops_module_header = '' ; |
|
128 | + $xoops_module_header = ''; |
|
129 | 129 | if (altsys_get_core_type() == ALTSYS_CORE_TYPE_XCL21) { |
130 | - $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=style.css" />'."\n" ; |
|
130 | + $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=style.css" />'."\n"; |
|
131 | 131 | if (is_object(@$xoopsModule)) { |
132 | - $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=module.css&dirname='.$xoopsModule->getVar('dirname').'" />'."\n" ; |
|
132 | + $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=module.css&dirname='.$xoopsModule->getVar('dirname').'" />'."\n"; |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 | |
@@ -148,14 +148,14 @@ discard block |
||
148 | 148 | 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES), |
149 | 149 | 'xoops_contents' => $xoops_admin_contents, //. '<div id="adminmenu_layers">' . $xoops_admin_menu_dv . '</div>' , |
150 | 150 | 'xoops_module_header' => $xoops_module_header, |
151 | - )) ; |
|
151 | + )); |
|
152 | 152 | |
153 | 153 | // rendering |
154 | - $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html') ; |
|
154 | + $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html'); |
|
155 | 155 | |
156 | 156 | // for XOOPS 2.0.14/15/16 from xoops.org |
157 | - if (is_object(@$xoopsLogger) && method_exists($xoopsLogger, 'render') && in_array($xoopsConfig['debug_mode'], array( 1, 2 ))) { |
|
158 | - $xoopsLogger->activated = true ; |
|
159 | - echo $xoopsLogger->render('') ; |
|
157 | + if (is_object(@$xoopsLogger) && method_exists($xoopsLogger, 'render') && in_array($xoopsConfig['debug_mode'], array(1, 2))) { |
|
158 | + $xoopsLogger->activated = true; |
|
159 | + echo $xoopsLogger->render(''); |
|
160 | 160 | } |
161 | 161 | } |
@@ -1,51 +1,51 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_MODULE_PATH')) { |
|
4 | - define('XOOPS_MODULE_PATH', XOOPS_ROOT_PATH . '/modules'); |
|
3 | +if (!defined('XOOPS_MODULE_PATH')) { |
|
4 | + define('XOOPS_MODULE_PATH', XOOPS_ROOT_PATH.'/modules'); |
|
5 | 5 | } |
6 | -if (! defined('XOOPS_MODULE_URL')) { |
|
7 | - define('XOOPS_MODULE_URL', XOOPS_URL . '/modules'); |
|
6 | +if (!defined('XOOPS_MODULE_URL')) { |
|
7 | + define('XOOPS_MODULE_URL', XOOPS_URL.'/modules'); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | |
11 | -require_once dirname(__FILE__).'/class/AltsysBreadcrumbs.class.php' ; |
|
12 | -require_once dirname(__FILE__).'/include/altsys_functions.php' ; |
|
11 | +require_once dirname(__FILE__).'/class/AltsysBreadcrumbs.class.php'; |
|
12 | +require_once dirname(__FILE__).'/include/altsys_functions.php'; |
|
13 | 13 | |
14 | 14 | |
15 | 15 | if (empty($xoopsModule)) { |
16 | - $moduleperm_handler =& xoops_gethandler('module') ; |
|
17 | - $xoopsModule =& $moduleperm_handler->getByDirname('altsys') ; |
|
16 | + $moduleperm_handler = & xoops_gethandler('module'); |
|
17 | + $xoopsModule = & $moduleperm_handler->getByDirname('altsys'); |
|
18 | 18 | } |
19 | 19 | |
20 | -require XOOPS_ROOT_PATH.'/include/cp_functions.php' ; |
|
20 | +require XOOPS_ROOT_PATH.'/include/cp_functions.php'; |
|
21 | 21 | |
22 | 22 | // breadcrumbs |
23 | -$breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
24 | -$breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php', $GLOBALS['xoopsModule']->getVar('name')) ; |
|
23 | +$breadcrumbsObj = & AltsysBreadcrumbs::getInstance(); |
|
24 | +$breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php', $GLOBALS['xoopsModule']->getVar('name')); |
|
25 | 25 | |
26 | 26 | // get page |
27 | -$page = preg_replace('/[^a-zA-Z0-9_-]/', '', @$_GET['page']) ; |
|
28 | -require dirname(__FILE__).'/controllers.php' ; |
|
29 | -if (! in_array($page, $controllers)) { |
|
30 | - $_GET['page'] = $page = 'myblocksadmin' ; |
|
31 | - $_SERVER['REQUEST_URI'] = '/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' ; |
|
27 | +$page = preg_replace('/[^a-zA-Z0-9_-]/', '', @$_GET['page']); |
|
28 | +require dirname(__FILE__).'/controllers.php'; |
|
29 | +if (!in_array($page, $controllers)) { |
|
30 | + $_GET['page'] = $page = 'myblocksadmin'; |
|
31 | + $_SERVER['REQUEST_URI'] = '/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin'; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
35 | 35 | // half measure ... (TODO) |
36 | 36 | if (empty($_GET['dirname'])) { |
37 | - $module_handler =& xoops_gethandler('module') ; |
|
38 | - list($top_module) = $module_handler->getObjects(new Criteria('isactive', 1)) ; |
|
39 | - $_GET['dirname'] = $top_module->getVar('dirname') ; |
|
37 | + $module_handler = & xoops_gethandler('module'); |
|
38 | + list($top_module) = $module_handler->getObjects(new Criteria('isactive', 1)); |
|
39 | + $_GET['dirname'] = $top_module->getVar('dirname'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | // language file |
43 | -altsys_include_language_file($page) ; |
|
43 | +altsys_include_language_file($page); |
|
44 | 44 | |
45 | 45 | // branch to each pages |
46 | -$mytrustdirpath = dirname(__FILE__) ; |
|
46 | +$mytrustdirpath = dirname(__FILE__); |
|
47 | 47 | if (file_exists(XOOPS_TRUST_PATH.'/libs/altsys/'.$page.'.php')) { |
48 | - include XOOPS_TRUST_PATH.'/libs/altsys/'.$page.'.php' ; |
|
48 | + include XOOPS_TRUST_PATH.'/libs/altsys/'.$page.'.php'; |
|
49 | 49 | } else { |
50 | - die('wrong request') ; |
|
50 | + die('wrong request'); |
|
51 | 51 | } |
@@ -6,9 +6,9 @@ |
||
6 | 6 | //admin page |
7 | 7 | if ($root->mController->_mStrategy) { |
8 | 8 | if (strtolower(get_class($root->mController->_mStrategy)) == strtolower('Legacy_AdminControllerStrategy')) { |
9 | - include_once dirname(__FILE__).'/include/altsys_functions.php' ; |
|
9 | + include_once dirname(__FILE__).'/include/altsys_functions.php'; |
|
10 | 10 | // language file (modinfo.php) |
11 | - altsys_include_language_file('modinfo') ; |
|
11 | + altsys_include_language_file('modinfo'); |
|
12 | 12 | } |
13 | 13 | } |
14 | 14 | // load altsys newly gticket class for other modules |
@@ -2,30 +2,30 @@ discard block |
||
2 | 2 | |
3 | 3 | /********* mymenu only for ALTSYS ********/ |
4 | 4 | |
5 | -if (! defined('XOOPS_ROOT_PATH')) { |
|
6 | - exit ; |
|
5 | +if (!defined('XOOPS_ROOT_PATH')) { |
|
6 | + exit; |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | // Skip for ORETEKI XOOPS |
10 | 10 | if (defined('XOOPS_ORETEKI')) { |
11 | - return ; |
|
11 | + return; |
|
12 | 12 | } |
13 | 13 | |
14 | -if (! isset($module) || ! is_object($module)) { |
|
15 | - $module = $xoopsModule ; |
|
16 | -} elseif (! is_object($xoopsModule)) { |
|
17 | - die('$xoopsModule is not set') ; |
|
14 | +if (!isset($module) || !is_object($module)) { |
|
15 | + $module = $xoopsModule; |
|
16 | +} elseif (!is_object($xoopsModule)) { |
|
17 | + die('$xoopsModule is not set'); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | // language files (modinfo.php) |
21 | -altsys_include_language_file('modinfo') ; |
|
21 | +altsys_include_language_file('modinfo'); |
|
22 | 22 | |
23 | -include dirname(__FILE__).'/admin_menu.php' ; |
|
23 | +include dirname(__FILE__).'/admin_menu.php'; |
|
24 | 24 | |
25 | -$adminmenu = array_merge($adminmenu, $adminmenu4altsys) ; |
|
25 | +$adminmenu = array_merge($adminmenu, $adminmenu4altsys); |
|
26 | 26 | |
27 | -$mymenu_uri = empty($mymenu_fake_uri) ? $_SERVER['REQUEST_URI'] : $mymenu_fake_uri ; |
|
28 | -$mymenu_link = substr(strstr($mymenu_uri, '/admin/'), 1) ; |
|
27 | +$mymenu_uri = empty($mymenu_fake_uri) ? $_SERVER['REQUEST_URI'] : $mymenu_fake_uri; |
|
28 | +$mymenu_link = substr(strstr($mymenu_uri, '/admin/'), 1); |
|
29 | 29 | |
30 | 30 | // xoops_breadcrumbs |
31 | 31 | // $GLOBALS['altsysXoopsBreadcrumbs'] = array( array( 'url' => XOOPS_URL.'/modules/altsys/admin/index.php' , 'name' => $xoopsModule->getVar('name') ) ) ; |
@@ -33,19 +33,19 @@ discard block |
||
33 | 33 | // highlight |
34 | 34 | foreach (array_keys($adminmenu) as $i) { |
35 | 35 | if ($mymenu_link == $adminmenu[$i]['link']) { |
36 | - $adminmenu[$i]['selected'] = true ; |
|
37 | - $adminmenu_hilighted = true ; |
|
36 | + $adminmenu[$i]['selected'] = true; |
|
37 | + $adminmenu_hilighted = true; |
|
38 | 38 | // $GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'url' => XOOPS_URL."/modules/altsys/".htmlspecialchars($adminmenu[$i]['link'],ENT_QUOTES) , 'name' => htmlspecialchars( $adminmenu[$i]['title'] , ENT_QUOTES ) ) ; |
39 | 39 | } else { |
40 | - $adminmenu[$i]['selected'] = false ; |
|
40 | + $adminmenu[$i]['selected'] = false; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | if (empty($adminmenu_hilighted)) { |
44 | 44 | foreach (array_keys($adminmenu) as $i) { |
45 | 45 | if (stristr($mymenu_uri, $adminmenu[$i]['link'])) { |
46 | - $adminmenu[$i]['selected'] = true ; |
|
46 | + $adminmenu[$i]['selected'] = true; |
|
47 | 47 | // $GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'url' => XOOPS_URL."/modules/altsys/".htmlspecialchars($adminmenu[$i]['link'],ENT_QUOTES) , 'name' => htmlspecialchars( $adminmenu[$i]['title'] , ENT_QUOTES ) ) ; |
48 | - break ; |
|
48 | + break; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | } |
@@ -53,20 +53,20 @@ discard block |
||
53 | 53 | // link conversion from relative to absolute |
54 | 54 | foreach (array_keys($adminmenu) as $i) { |
55 | 55 | if (stristr($adminmenu[$i]['link'], XOOPS_URL) === false) { |
56 | - $adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/" . $adminmenu[$i]['link'] ; |
|
56 | + $adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/".$adminmenu[$i]['link']; |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | 60 | // display |
61 | -require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ; |
|
62 | -$tpl = new D3Tpl() ; |
|
61 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
62 | +$tpl = new D3Tpl(); |
|
63 | 63 | $tpl->assign(array( |
64 | 64 | 'adminmenu' => $adminmenu, |
65 | -)) ; |
|
66 | -$tpl->display('db:altsys_inc_mymenu.html') ; |
|
65 | +)); |
|
66 | +$tpl->display('db:altsys_inc_mymenu.html'); |
|
67 | 67 | |
68 | 68 | // submenu |
69 | -$page = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['page']) ; |
|
69 | +$page = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['page']); |
|
70 | 70 | if (file_exists(dirname(__FILE__).'/mymenusub/'.$page.'.php')) { |
71 | - include dirname(__FILE__).'/mymenusub/'.$page.'.php' ; |
|
71 | + include dirname(__FILE__).'/mymenusub/'.$page.'.php'; |
|
72 | 72 | } |