@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * Parent |
46 | 46 | */ |
47 | -include_once XOOPS_ROOT_PATH . '/class/xoopsform/formcheckbox.php'; |
|
47 | +include_once XOOPS_ROOT_PATH.'/class/xoopsform/formcheckbox.php'; |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * A checkbox field with a choice of available groups |
@@ -65,7 +65,7 @@ discard block |
||
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 __construct($caption, $name, $include_anon=false, $value=null) |
|
68 | + public function __construct($caption, $name, $include_anon = false, $value = null) |
|
69 | 69 | { |
70 | 70 | parent::__construct($caption, $name, $value); |
71 | 71 | $member_handler = xoops_gethandler('member'); |
@@ -75,7 +75,7 @@ discard block |
||
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 | } |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | // Project: The XOOPS Project // |
30 | 30 | // ------------------------------------------------------------------------- // |
31 | 31 | |
32 | -if (! defined('XOOPS_ROOT_PATH')) { |
|
33 | - exit ; |
|
32 | +if (!defined('XOOPS_ROOT_PATH')) { |
|
33 | + exit; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php'; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * Tree structure of items |
61 | 61 | * @var array |
62 | 62 | */ |
63 | - public $_itemTree = array() ; |
|
63 | + public $_itemTree = array(); |
|
64 | 64 | /** |
65 | 65 | * Name of permission |
66 | 66 | * @var string |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * Appendix |
76 | 76 | * @var array ('permname'=>,'itemid'=>,'itemname'=>,'selected'=>) |
77 | 77 | */ |
78 | - public $_appendix = array() ; |
|
78 | + public $_appendix = array(); |
|
79 | 79 | |
80 | 80 | /** |
81 | 81 | * Constructor |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function addAppendix($permName, $itemId, $itemName) |
117 | 117 | { |
118 | - $this->_appendix[] = array('permname'=>$permName,'itemid'=>$itemId,'itemname'=>$itemName,'selected'=>false); |
|
118 | + $this->_appendix[] = array('permname'=>$permName, 'itemid'=>$itemId, 'itemname'=>$itemName, 'selected'=>false); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function render() |
151 | 151 | { |
152 | - global $xoopsGTicket ; |
|
152 | + global $xoopsGTicket; |
|
153 | 153 | |
154 | 154 | // load all child ids for javascript codes |
155 | 155 | foreach (array_keys($this->_itemTree) as $item_id) { |
@@ -166,11 +166,11 @@ discard block |
||
166 | 166 | $ele->setOptionTree($this->_itemTree); |
167 | 167 | |
168 | 168 | // GIJ start |
169 | - $ele->setDescription('<input type="checkbox" onclick="with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].name.match(/^perms\[(module_admin|module_read|block_read)\]\[groups\]\['.$i.'\]/)){elements[i].checked=this.checked;}}};">') ; |
|
169 | + $ele->setDescription('<input type="checkbox" onclick="with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].name.match(/^perms\[(module_admin|module_read|block_read)\]\[groups\]\['.$i.'\]/)){elements[i].checked=this.checked;}}};">'); |
|
170 | 170 | // GIJ_end |
171 | 171 | |
172 | 172 | foreach ($this->_appendix as $key => $append) { |
173 | - $this->_appendix[$key]['selected'] = $gperm_handler->checkRight($append['permname'], $append['itemid'], $i, $this->_modid) ; |
|
173 | + $this->_appendix[$key]['selected'] = $gperm_handler->checkRight($append['permname'], $append['itemid'], $i, $this->_modid); |
|
174 | 174 | } |
175 | 175 | $ele->setAppendix($this->_appendix); |
176 | 176 | $this->addElement($ele); |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | // GIJ start |
181 | 181 | $jstray = new XoopsFormElementTray(' '); |
182 | 182 | $jsuncheckbutton = new XoopsFormButton('', 'none', _NONE, 'button'); |
183 | - $jsuncheckbutton->setExtra("onclick=\"with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].type=='checkbox'){elements[i].checked=false;}}}\"") ; |
|
183 | + $jsuncheckbutton->setExtra("onclick=\"with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].type=='checkbox'){elements[i].checked=false;}}}\""); |
|
184 | 184 | $jscheckbutton = new XoopsFormButton('', 'all', _ALL, 'button'); |
185 | - $jscheckbutton->setExtra("onclick=\"with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].type=='checkbox' && (elements[i].name.indexOf('module_admin')<0 || elements[i].name.indexOf('[groups][1]')>=0)){elements[i].checked=true;}}}\"") ; |
|
186 | - $jstray->addElement($jsuncheckbutton) ; |
|
187 | - $jstray->addElement($jscheckbutton) ; |
|
185 | + $jscheckbutton->setExtra("onclick=\"with(document.groupperm_form){for(i=0;i<length;i++){if(elements[i].type=='checkbox' && (elements[i].name.indexOf('module_admin')<0 || elements[i].name.indexOf('[groups][1]')>=0)){elements[i].checked=true;}}}\""); |
|
186 | + $jstray->addElement($jsuncheckbutton); |
|
187 | + $jstray->addElement($jscheckbutton); |
|
188 | 188 | $this->addElement($jstray); |
189 | 189 | // GIJ end |
190 | 190 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | $ret = '<h4>'.$this->getTitle().'</h4>'.$this->_permDesc.'<br />'; |
197 | 197 | $ret .= "<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
198 | - $elements =& $this->getElements(); |
|
198 | + $elements = & $this->getElements(); |
|
199 | 199 | foreach (array_keys($elements) as $i) { |
200 | 200 | if (!is_object($elements[$i])) { |
201 | 201 | $ret .= $elements[$i]; |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $ret .= $elements[$i]->render(); |
212 | 212 | } |
213 | 213 | } |
214 | - $ret .= '</table>' . $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'myblocksadmin') . '</form>'; |
|
214 | + $ret .= '</table>'.$xoopsGTicket->getTicketHtml(__LINE__, 1800, 'myblocksadmin').'</form>'; |
|
215 | 215 | return $ret; |
216 | 216 | } |
217 | 217 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * Appendix |
248 | 248 | * @var array ('permname'=>,'itemid'=>,'itemname'=>,'selected'=>) |
249 | 249 | */ |
250 | - public $_appendix = array() ; |
|
250 | + public $_appendix = array(); |
|
251 | 251 | |
252 | 252 | /** |
253 | 253 | * Constructor |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | public function setOptionTree(&$optionTree) |
289 | 289 | { |
290 | - $this->_optionTree =& $optionTree; |
|
290 | + $this->_optionTree = & $optionTree; |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | /** |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | */ |
298 | 298 | public function setAppendix($appendix) |
299 | 299 | { |
300 | - $this->_appendix = $appendix ; |
|
300 | + $this->_appendix = $appendix; |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | /** |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | */ |
309 | 309 | public function render() |
310 | 310 | { |
311 | - $ret = '' ; |
|
311 | + $ret = ''; |
|
312 | 312 | |
313 | 313 | if (count($this->_appendix) > 0) { |
314 | 314 | $ret .= '<table class="outer"><tr>'; |
@@ -318,11 +318,11 @@ discard block |
||
318 | 318 | $ret .= '</tr><tr>'; |
319 | 319 | $cols = 1; |
320 | 320 | } |
321 | - $checked = $append['selected'] ? 'checked="checked"' : '' ; |
|
322 | - $name = 'perms['.$append['permname'].']' ; |
|
323 | - $itemid = $append['itemid'] ; |
|
324 | - $itemid = $append['itemid'] ; |
|
325 | - $ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked />{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\" /><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\" /><br /></td>" ; |
|
321 | + $checked = $append['selected'] ? 'checked="checked"' : ''; |
|
322 | + $name = 'perms['.$append['permname'].']'; |
|
323 | + $itemid = $append['itemid']; |
|
324 | + $itemid = $append['itemid']; |
|
325 | + $ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked />{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\" /><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\" /><br /></td>"; |
|
326 | 326 | $cols++; |
327 | 327 | } |
328 | 328 | $ret .= '</tr></table>'; |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | |
331 | 331 | $ret .= '<table class="outer"><tr>'; |
332 | 332 | $cols = 1; |
333 | - if (! empty($this->_optionTree[0]['children'])) { |
|
333 | + if (!empty($this->_optionTree[0]['children'])) { |
|
334 | 334 | foreach ($this->_optionTree[0]['children'] as $topitem) { |
335 | 335 | if ($cols > 4) { |
336 | 336 | $ret .= '</tr><tr>'; |
@@ -358,8 +358,8 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array()) |
360 | 360 | { |
361 | - $tree .= $prefix."<input type=\"checkbox\" name=\"".$this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . "]\" id=\"" . $this->getName() . '[groups][' . $this->_groupId . '][' |
|
362 | - . $option['id'] . "]\" onclick=\""; |
|
361 | + $tree .= $prefix."<input type=\"checkbox\" name=\"".$this->getName().'[groups]['.$this->_groupId.']['.$option['id']."]\" id=\"".$this->getName().'[groups]['.$this->_groupId.'][' |
|
362 | + . $option['id']."]\" onclick=\""; |
|
363 | 363 | // If there are parent elements, add javascript that will |
364 | 364 | // make them selecteded when this element is checked to make |
365 | 365 | // sure permissions to parent items are added as well. |
@@ -379,8 +379,8 @@ discard block |
||
379 | 379 | if (isset($this->_value) && in_array($option['id'], $this->_value)) { |
380 | 380 | $tree .= ' checked="checked"'; |
381 | 381 | } |
382 | - $tree .= ' />' . $option['name'] . "<input type=\"hidden\" name=\"" . $this->getName() . '[parents][' . $option['id'] . "]\" value=\"" . implode(':', $parentIds) . "\" /><input type=\"hidden\" name=\"" . $this->getName() . '[itemname][' |
|
383 | - . $option['id'] . "]\" value=\"" . htmlspecialchars($option['name']) . "\" /><br />\n"; |
|
382 | + $tree .= ' />'.$option['name']."<input type=\"hidden\" name=\"".$this->getName().'[parents]['.$option['id']."]\" value=\"".implode(':', $parentIds)."\" /><input type=\"hidden\" name=\"".$this->getName().'[itemname][' |
|
383 | + . $option['id']."]\" value=\"".htmlspecialchars($option['name'])."\" /><br />\n"; |
|
384 | 384 | if (isset($option['children'])) { |
385 | 385 | foreach ($option['children'] as $child) { |
386 | 386 | array_push($parentIds, $option['id']); |
@@ -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 __DIR__.'/class/AltsysBreadcrumbs.class.php' ; |
|
12 | -require_once __DIR__.'/include/altsys_functions.php' ; |
|
11 | +require_once __DIR__.'/class/AltsysBreadcrumbs.class.php'; |
|
12 | +require_once __DIR__.'/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 __DIR__.'/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 __DIR__.'/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 = __DIR__ ; |
|
46 | +$mytrustdirpath = __DIR__; |
|
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 | } |
@@ -5,33 +5,33 @@ discard block |
||
5 | 5 | // GIJOE <http://www.peak.ne.jp/> // |
6 | 6 | // ------------------------------------------------------------------------- // |
7 | 7 | |
8 | -require_once __DIR__.'/class/AltsysBreadcrumbs.class.php' ; |
|
9 | -include_once __DIR__.'/include/gtickets.php' ; |
|
10 | -include_once __DIR__.'/include/altsys_functions.php' ; |
|
8 | +require_once __DIR__.'/class/AltsysBreadcrumbs.class.php'; |
|
9 | +include_once __DIR__.'/include/gtickets.php'; |
|
10 | +include_once __DIR__.'/include/altsys_functions.php'; |
|
11 | 11 | |
12 | 12 | // check access right (needs module_admin of this module) |
13 | -if (! is_object($xoopsUser) || ! is_object($xoopsModule) || ! $xoopsUser->isAdmin($xoopsModule->mid())) { |
|
14 | - die('Access Denied') ; |
|
13 | +if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { |
|
14 | + die('Access Denied'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | |
18 | 18 | // initials |
19 | 19 | $db = XoopsDatabaseFactory::getDatabaseConnection(); |
20 | -(method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance() ; |
|
20 | +(method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
21 | 21 | |
22 | 22 | // language file |
23 | -altsys_include_language_file('mypreferences') ; |
|
23 | +altsys_include_language_file('mypreferences'); |
|
24 | 24 | |
25 | 25 | |
26 | -$op = empty($_GET['op']) ? 'showmod' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['op']) ; |
|
26 | +$op = empty($_GET['op']) ? 'showmod' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['op']); |
|
27 | 27 | |
28 | 28 | if ($op == 'showmod') { |
29 | 29 | $config_handler = xoops_gethandler('config'); |
30 | - $mod = $xoopsModule->mid() ; |
|
30 | + $mod = $xoopsModule->mid(); |
|
31 | 31 | $config = $config_handler->getConfigs(new Criteria('conf_modid', $mod)); |
32 | 32 | $count = count($config); |
33 | 33 | if ($count < 1) { |
34 | - die('no configs') ; |
|
34 | + die('no configs'); |
|
35 | 35 | } |
36 | 36 | include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
37 | 37 | $form = new XoopsThemeForm(_MD_A_MYPREFERENCES_FORMTITLE, 'pref_form', 'index.php?mode=admin&lib=altsys&page=mypreferences&op=save'); |
@@ -39,30 +39,30 @@ discard block |
||
39 | 39 | $module = $module_handler->get($mod); |
40 | 40 | |
41 | 41 | // language |
42 | - $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'] ; |
|
42 | + $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language']; |
|
43 | 43 | |
44 | 44 | // load modinfo.php if necessary (judged by a specific constant is defined) |
45 | - if (! defined('_MYMENU_CONSTANT_IN_MODINFO') || ! defined(_MYMENU_CONSTANT_IN_MODINFO)) { |
|
45 | + if (!defined('_MYMENU_CONSTANT_IN_MODINFO') || !defined(_MYMENU_CONSTANT_IN_MODINFO)) { |
|
46 | 46 | if (file_exists("$mydirpath/language/$language/modinfo.php")) { |
47 | 47 | // user customized language file |
48 | - include_once "$mydirpath/language/$language/modinfo.php" ; |
|
48 | + include_once "$mydirpath/language/$language/modinfo.php"; |
|
49 | 49 | } elseif (file_exists("$mytrustdirpath/language/$language/modinfo.php")) { |
50 | 50 | // default language file |
51 | - include_once "$mytrustdirpath/language/$language/modinfo.php" ; |
|
51 | + include_once "$mytrustdirpath/language/$language/modinfo.php"; |
|
52 | 52 | } else { |
53 | 53 | // fallback english |
54 | - include_once "$mytrustdirpath/language/english/modinfo.php" ; |
|
54 | + include_once "$mytrustdirpath/language/english/modinfo.php"; |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | 58 | // if has comments feature, need comment lang file |
59 | - if ($module->getVar('hascomments') == 1 && ! defined('_CM_TITLE')) { |
|
59 | + if ($module->getVar('hascomments') == 1 && !defined('_CM_TITLE')) { |
|
60 | 60 | include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php'; |
61 | 61 | } |
62 | 62 | |
63 | 63 | // RMV-NOTIFY |
64 | 64 | // if has notification feature, need notification lang file |
65 | - if ($module->getVar('hasnotification') == 1 && ! defined('_NOT_NOTIFICATIONOPTIONS')) { |
|
65 | + if ($module->getVar('hasnotification') == 1 && !defined('_NOT_NOTIFICATIONOPTIONS')) { |
|
66 | 66 | include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/notification.php'; |
67 | 67 | } |
68 | 68 | |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | // $form->addElement(new XoopsFormHidden('redirect', XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('adminindex'))); |
73 | 73 | // } |
74 | 74 | for ($i = 0; $i < $count; $i++) { |
75 | - $title_icon = ($config[$i]->getVar('conf_valuetype') === 'encrypt')? '<img src="'.XOOPS_MODULE_URL.'/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype' |
|
75 | + $title_icon = ($config[$i]->getVar('conf_valuetype') === 'encrypt') ? '<img src="'.XOOPS_MODULE_URL.'/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype' |
|
76 | 76 | $title4tray = (!defined($config[$i]->getVar('conf_desc')) || constant($config[$i]->getVar('conf_desc')) == '') ? (constant($config[$i]->getVar('conf_title')).$title_icon) : (constant($config[$i]->getVar('conf_title')).$title_icon.'<br /><br /><span style="font-weight:normal;">'.constant($config[$i]->getVar('conf_desc')).'</span>'); // GIJ |
77 | - $title = '' ; // GIJ |
|
77 | + $title = ''; // GIJ |
|
78 | 78 | switch ($config[$i]->getVar('conf_formtype')) { |
79 | 79 | case 'textarea': |
80 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
80 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
81 | 81 | if ($config[$i]->getVar('conf_valuetype') == 'array') { |
82 | 82 | // this is exceptional.. only when value type is arrayneed a smarter way for this |
83 | 83 | $ele = ($config[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50) : new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), '', 5, 50); |
@@ -145,35 +145,35 @@ discard block |
||
145 | 145 | $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true); |
146 | 146 | break; |
147 | 147 | case 'password': |
148 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
148 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
149 | 149 | $ele = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); |
150 | 150 | break; |
151 | 151 | case 'textbox': |
152 | 152 | default: |
153 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
153 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
154 | 154 | $ele = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); |
155 | 155 | break; |
156 | 156 | } |
157 | 157 | $hidden = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id')); |
158 | - $ele_tray = new XoopsFormElementTray($title4tray, '') ; |
|
158 | + $ele_tray = new XoopsFormElementTray($title4tray, ''); |
|
159 | 159 | $ele_tray->addElement($ele); |
160 | 160 | $ele_tray->addElement($hidden); |
161 | - $form->addElement($ele_tray) ; |
|
161 | + $form->addElement($ele_tray); |
|
162 | 162 | unset($ele_tray, $ele, $hidden); |
163 | 163 | } |
164 | 164 | // $button_tray->addElement(new XoopsFormHidden('op', 'save')); |
165 | - $xoopsGTicket->addTicketXoopsFormElement($button_tray, __LINE__, 1800, 'mypreferences') ; |
|
165 | + $xoopsGTicket->addTicketXoopsFormElement($button_tray, __LINE__, 1800, 'mypreferences'); |
|
166 | 166 | $button_tray->addElement(new XoopsFormButton('', 'button', _GO, 'submit')); |
167 | - $form->addElement($button_tray) ; |
|
167 | + $form->addElement($button_tray); |
|
168 | 168 | xoops_cp_header(); |
169 | 169 | |
170 | 170 | // GIJ patch start |
171 | - altsys_include_mymenu() ; |
|
172 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
171 | + altsys_include_mymenu(); |
|
172 | + $breadcrumbsObj = & AltsysBreadcrumbs::getInstance(); |
|
173 | 173 | if ($breadcrumbsObj->hasPaths()) { |
174 | - $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=mypreferences', _PREFERENCES) ; |
|
174 | + $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=mypreferences', _PREFERENCES); |
|
175 | 175 | } |
176 | - echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>".$module->getvar('name').' '._PREFERENCES."</h3>\n" ; |
|
176 | + echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>".$module->getvar('name').' '._PREFERENCES."</h3>\n"; |
|
177 | 177 | // GIJ patch end |
178 | 178 | |
179 | 179 | $form->display(); |
@@ -185,10 +185,10 @@ discard block |
||
185 | 185 | //if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) { |
186 | 186 | // exit('Invalid referer'); |
187 | 187 | //} |
188 | - if (! $xoopsGTicket->check(true, 'mypreferences')) { |
|
188 | + if (!$xoopsGTicket->check(true, 'mypreferences')) { |
|
189 | 189 | redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors()); |
190 | 190 | } |
191 | - require_once XOOPS_ROOT_PATH.'/class/template.php' ; |
|
191 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
192 | 192 | $xoopsTpl = new XoopsTpl(); |
193 | 193 | //HACK by domifara for new XOOPS and XCL etc. |
194 | 194 | //old xoops |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | if ($count > 0) { |
210 | 210 | for ($i = 0; $i < $count; $i++) { |
211 | 211 | $config = $config_handler->getConfig($conf_ids[$i]); |
212 | - $new_value =& $_POST[$config->getVar('conf_name')]; |
|
212 | + $new_value = & $_POST[$config->getVar('conf_name')]; |
|
213 | 213 | if (is_array($new_value) || $new_value != $config->getVar('conf_value')) { |
214 | 214 | // if language has been changed |
215 | 215 | if (!$lang_updated && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'language') { |
@@ -238,13 +238,13 @@ discard block |
||
238 | 238 | // generate compiled files for the new theme |
239 | 239 | // block files only for now.. |
240 | 240 | $tplfile_handler = xoops_gethandler('tplfile'); |
241 | - $dtemplates =& $tplfile_handler->find('default', 'block'); |
|
241 | + $dtemplates = & $tplfile_handler->find('default', 'block'); |
|
242 | 242 | $dcount = count($dtemplates); |
243 | 243 | |
244 | 244 | // need to do this to pass to xoops_template_touch function |
245 | 245 | $GLOBALS['xoopsConfig']['template_set'] = $newtplset; |
246 | 246 | |
247 | - altsys_clear_templates_c() ; |
|
247 | + altsys_clear_templates_c(); |
|
248 | 248 | |
249 | 249 | /* for ($i = 0; $i < $dcount; $i++) { |
250 | 250 | $found =& $tplfile_handler->find($newtplset, 'block', $dtemplates[$i]->getVar('tpl_refid'), null); |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | |
260 | 260 | // generate image cache files from image binary data, save them under cache/ |
261 | 261 | $image_handler = xoops_gethandler('imagesetimg'); |
262 | - $imagefiles =& $image_handler->getObjects(new Criteria('tplset_name', $newtplset), true); |
|
262 | + $imagefiles = & $image_handler->getObjects(new Criteria('tplset_name', $newtplset), true); |
|
263 | 263 | foreach (array_keys($imagefiles) as $i) { |
264 | 264 | if (!$fp = fopen(XOOPS_CACHE_PATH.'/'.$newtplset.'_'.$imagefiles[$i]->getVar('imgsetimg_file'), 'wb')) { |
265 | 265 | } else { |
@@ -272,12 +272,12 @@ discard block |
||
272 | 272 | } |
273 | 273 | |
274 | 274 | // add read permission for the start module to all groups |
275 | - if (!$startmod_updated && $new_value != '--' && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'startpage') { |
|
275 | + if (!$startmod_updated && $new_value != '--' && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'startpage') { |
|
276 | 276 | $member_handler = xoops_gethandler('member'); |
277 | - $groups =& $member_handler->getGroupList(); |
|
277 | + $groups = & $member_handler->getGroupList(); |
|
278 | 278 | $moduleperm_handler = xoops_gethandler('groupperm'); |
279 | 279 | $module_handler = xoops_gethandler('module'); |
280 | - $module =& $module_handler->getByDirname($new_value); |
|
280 | + $module = & $module_handler->getByDirname($new_value); |
|
281 | 281 | foreach ($groups as $groupid => $groupname) { |
282 | 282 | if (!$moduleperm_handler->checkRight('module_read', $module->getVar('mid'), $groupid)) { |
283 | 283 | $moduleperm_handler->addRight('module_read', $module->getVar('mid'), $groupid); |
@@ -293,5 +293,5 @@ discard block |
||
293 | 293 | } |
294 | 294 | } |
295 | 295 | |
296 | - redirect_header('index.php?mode=admin&lib=altsys&page=mypreferences', 2, _MD_A_MYPREFERENCES_UPDATED) ; |
|
296 | + redirect_header('index.php?mode=admin&lib=altsys&page=mypreferences', 2, _MD_A_MYPREFERENCES_UPDATED); |
|
297 | 297 | } |
@@ -1,147 +1,147 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once dirname(__DIR__).'/include/altsys_functions.php' ; |
|
3 | +require_once dirname(__DIR__).'/include/altsys_functions.php'; |
|
4 | 4 | |
5 | 5 | function b_altsys_admin_menu_show($options) |
6 | 6 | { |
7 | - global $xoopsUser ; |
|
7 | + global $xoopsUser; |
|
8 | 8 | |
9 | - $mydirname = empty($options[0]) ? 'altsys' : $options[0] ; |
|
10 | - $this_template = empty($options[1]) ? 'db:'.$mydirname.'_block_admin_menu.html' : trim($options[1]) ; |
|
9 | + $mydirname = empty($options[0]) ? 'altsys' : $options[0]; |
|
10 | + $this_template = empty($options[1]) ? 'db:'.$mydirname.'_block_admin_menu.html' : trim($options[1]); |
|
11 | 11 | |
12 | 12 | if (preg_match('/[^0-9a-zA-Z_-]/', $mydirname)) { |
13 | - die('Invalid mydirname') ; |
|
13 | + die('Invalid mydirname'); |
|
14 | 14 | } |
15 | - if (! is_object(@$xoopsUser)) { |
|
16 | - return array() ; |
|
15 | + if (!is_object(@$xoopsUser)) { |
|
16 | + return array(); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | // coretype |
20 | - $coretype = altsys_get_core_type() ; |
|
20 | + $coretype = altsys_get_core_type(); |
|
21 | 21 | |
22 | 22 | // mid_selected |
23 | 23 | if (is_object(@$GLOBALS['xoopsModule'])) { |
24 | - $mid_selected = $GLOBALS['xoopsModule']->getVar('mid') ; |
|
24 | + $mid_selected = $GLOBALS['xoopsModule']->getVar('mid'); |
|
25 | 25 | // for system->preferences |
26 | - if ($mid_selected == 1 && @$_GET['fct'] == 'preferences' && @$_GET['op'] == 'showmod' && ! empty($_GET['mod'])) { |
|
26 | + if ($mid_selected == 1 && @$_GET['fct'] == 'preferences' && @$_GET['op'] == 'showmod' && !empty($_GET['mod'])) { |
|
27 | 27 | $mid_selected = (int)$_GET['mod']; |
28 | 28 | } |
29 | 29 | } else { |
30 | - $mid_selected = 0 ; |
|
30 | + $mid_selected = 0; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | $db = XoopsDatabaseFactory::getDatabaseConnection(); |
34 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
34 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = & MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
35 | 35 | |
36 | 36 | $module_handler = xoops_gethandler('module'); |
37 | - $current_module =& $module_handler->getByDirname($mydirname); |
|
37 | + $current_module = & $module_handler->getByDirname($mydirname); |
|
38 | 38 | $config_handler = xoops_gethandler('config'); |
39 | - $current_configs = $config_handler->getConfigList($current_module->mid()) ; |
|
39 | + $current_configs = $config_handler->getConfigList($current_module->mid()); |
|
40 | 40 | $moduleperm_handler = xoops_gethandler('groupperm'); |
41 | 41 | $admin_mids = $moduleperm_handler->getItemIds('module_admin', $xoopsUser->getGroups()); |
42 | - $modules = $module_handler->getObjects(new Criteria('mid', '('.implode(',', $admin_mids) . ')', 'IN'), true) ; |
|
42 | + $modules = $module_handler->getObjects(new Criteria('mid', '('.implode(',', $admin_mids).')', 'IN'), true); |
|
43 | 43 | |
44 | 44 | $block = array( |
45 | - 'mydirname' => $mydirname , |
|
46 | - 'mod_url' => XOOPS_URL.'/modules/'.$mydirname , |
|
47 | - 'mod_imageurl' => XOOPS_URL.'/modules/'.$mydirname.'/'.$current_configs['images_dir'] , |
|
45 | + 'mydirname' => $mydirname, |
|
46 | + 'mod_url' => XOOPS_URL.'/modules/'.$mydirname, |
|
47 | + 'mod_imageurl' => XOOPS_URL.'/modules/'.$mydirname.'/'.$current_configs['images_dir'], |
|
48 | 48 | 'mod_config' => $current_configs |
49 | - ) ; |
|
49 | + ); |
|
50 | 50 | |
51 | 51 | foreach ($modules as $mod) { |
52 | 52 | $mid = (int)$mod->getVar('mid'); |
53 | - $dirname = $mod->getVar('dirname') ; |
|
54 | - $modinfo = $mod->getInfo() ; |
|
55 | - $submenus4assign = array() ; |
|
56 | - $adminmenu = array() ; |
|
57 | - $adminmenu4altsys = array() ; |
|
58 | - unset($adminmenu_use_altsys) ; |
|
59 | - @include XOOPS_ROOT_PATH.'/modules/'.$dirname.'/'.@$modinfo['adminmenu'] ; |
|
53 | + $dirname = $mod->getVar('dirname'); |
|
54 | + $modinfo = $mod->getInfo(); |
|
55 | + $submenus4assign = array(); |
|
56 | + $adminmenu = array(); |
|
57 | + $adminmenu4altsys = array(); |
|
58 | + unset($adminmenu_use_altsys); |
|
59 | + @include XOOPS_ROOT_PATH.'/modules/'.$dirname.'/'.@$modinfo['adminmenu']; |
|
60 | 60 | // from admin_menu.php etc. |
61 | - $adminmenu = array_merge($adminmenu, $adminmenu4altsys) ; |
|
61 | + $adminmenu = array_merge($adminmenu, $adminmenu4altsys); |
|
62 | 62 | foreach ($adminmenu as $sub) { |
63 | - $link = empty($sub['altsys_link']) ? $sub['link'] : $sub['altsys_link'] ; |
|
63 | + $link = empty($sub['altsys_link']) ? $sub['link'] : $sub['altsys_link']; |
|
64 | 64 | if (isset($sub['show']) && $sub['show'] === false) { |
65 | - continue ; |
|
65 | + continue; |
|
66 | 66 | } |
67 | 67 | $submenus4assign[] = array( |
68 | - 'title' => $myts->makeTboxData4Show($sub['title']) , |
|
68 | + 'title' => $myts->makeTboxData4Show($sub['title']), |
|
69 | 69 | 'url' => XOOPS_URL.'/modules/'.$dirname.'/'.htmlspecialchars($link, ENT_QUOTES) |
70 | - ) ; |
|
70 | + ); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | // for modules overriding Module.class.php (eg. Analyzer for XC) |
74 | - if (empty($submenus4assign) && defined('XOOPS_CUBE_LEGACY') && ! empty($modinfo['cube_style'])) { |
|
74 | + if (empty($submenus4assign) && defined('XOOPS_CUBE_LEGACY') && !empty($modinfo['cube_style'])) { |
|
75 | 75 | $module_handler = xoops_gethandler('module'); |
76 | 76 | $module = $module_handler->get($mid); |
77 | - $moduleObj =& Legacy_Utils::createModule($module); |
|
78 | - $modinfo['adminindex'] = $moduleObj->getAdminIndex() ; |
|
79 | - $modinfo['adminindex_absolute'] = true ; |
|
77 | + $moduleObj = & Legacy_Utils::createModule($module); |
|
78 | + $modinfo['adminindex'] = $moduleObj->getAdminIndex(); |
|
79 | + $modinfo['adminindex_absolute'] = true; |
|
80 | 80 | foreach ($moduleObj->getAdminMenu() as $sub) { |
81 | 81 | if (@$sub['show'] === false) { |
82 | - continue ; |
|
82 | + continue; |
|
83 | 83 | } |
84 | 84 | $submenus4assign[] = array( |
85 | - 'title' => $myts->makeTboxData4Show($sub['title']) , |
|
85 | + 'title' => $myts->makeTboxData4Show($sub['title']), |
|
86 | 86 | 'url' => strncmp($sub['link'], 'http', 4) === 0 ? htmlspecialchars($sub['link'], ENT_QUOTES) : XOOPS_URL.'/modules/'.$dirname.'/'.htmlspecialchars($sub['link'], ENT_QUOTES) |
87 | - ) ; |
|
87 | + ); |
|
88 | 88 | } |
89 | 89 | } elseif (empty($adminmenu4altsys)) { |
90 | 90 | |
91 | 91 | // add preferences |
92 | - if ($mod->getVar('hasconfig') && ! in_array($mod->getVar('dirname'), array( 'system', 'legacy' ))) { |
|
92 | + if ($mod->getVar('hasconfig') && !in_array($mod->getVar('dirname'), array('system', 'legacy'))) { |
|
93 | 93 | $submenus4assign[] = array( |
94 | - 'title' => _PREFERENCES , |
|
94 | + 'title' => _PREFERENCES, |
|
95 | 95 | 'url' => htmlspecialchars(altsys_get_link2modpreferences($mid, $coretype), ENT_QUOTES) |
96 | - ) ; |
|
96 | + ); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | // add help |
100 | - if (defined('XOOPS_CUBE_LEGACY') && ! empty($modinfo['help'])) { |
|
100 | + if (defined('XOOPS_CUBE_LEGACY') && !empty($modinfo['help'])) { |
|
101 | 101 | $submenus4assign[] = array( |
102 | - 'title' => _HELP , |
|
102 | + 'title' => _HELP, |
|
103 | 103 | 'url' => XOOPS_URL.'/modules/legacy/admin/index.php?action=Help&dirname='.$dirname |
104 | - ) ; |
|
104 | + ); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | |
108 | 108 | $module4assign = array( |
109 | - 'mid' => $mid , |
|
110 | - 'dirname' => $dirname , |
|
111 | - 'name' => $mod->getVar('name') , |
|
112 | - 'version_in_db' => sprintf('%.2f', $mod->getVar('version') / 100.0) , |
|
113 | - 'version_in_file' => sprintf('%.2f', $modinfo['version']) , |
|
114 | - 'description' => htmlspecialchars(@$modinfo['description'], ENT_QUOTES) , |
|
115 | - 'image' => htmlspecialchars($modinfo['image'], ENT_QUOTES) , |
|
116 | - 'isactive' => $mod->getVar('isactive') , |
|
117 | - 'hasmain' => $mod->getVar('hasmain') , |
|
118 | - 'hasadmin' => $mod->getVar('hasadmin') , |
|
119 | - 'hasconfig' => $mod->getVar('hasconfig') , |
|
120 | - 'weight' => $mod->getVar('weight') , |
|
121 | - 'adminindex' => htmlspecialchars(@$modinfo['adminindex'], ENT_QUOTES) , |
|
122 | - 'adminindex_absolute' => @$modinfo['adminindex_absolute'] , |
|
123 | - 'submenu' => $submenus4assign , |
|
124 | - 'selected' => $mid == $mid_selected ? true : false , |
|
109 | + 'mid' => $mid, |
|
110 | + 'dirname' => $dirname, |
|
111 | + 'name' => $mod->getVar('name'), |
|
112 | + 'version_in_db' => sprintf('%.2f', $mod->getVar('version') / 100.0), |
|
113 | + 'version_in_file' => sprintf('%.2f', $modinfo['version']), |
|
114 | + 'description' => htmlspecialchars(@$modinfo['description'], ENT_QUOTES), |
|
115 | + 'image' => htmlspecialchars($modinfo['image'], ENT_QUOTES), |
|
116 | + 'isactive' => $mod->getVar('isactive'), |
|
117 | + 'hasmain' => $mod->getVar('hasmain'), |
|
118 | + 'hasadmin' => $mod->getVar('hasadmin'), |
|
119 | + 'hasconfig' => $mod->getVar('hasconfig'), |
|
120 | + 'weight' => $mod->getVar('weight'), |
|
121 | + 'adminindex' => htmlspecialchars(@$modinfo['adminindex'], ENT_QUOTES), |
|
122 | + 'adminindex_absolute' => @$modinfo['adminindex_absolute'], |
|
123 | + 'submenu' => $submenus4assign, |
|
124 | + 'selected' => $mid == $mid_selected ? true : false, |
|
125 | 125 | 'dot_suffix' => $mid == $mid_selected ? 'selected_opened' : 'closed' |
126 | - ) ; |
|
127 | - $block['modules'][] = $module4assign ; |
|
126 | + ); |
|
127 | + $block['modules'][] = $module4assign; |
|
128 | 128 | } |
129 | 129 | |
130 | - require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ; |
|
131 | - $tpl = new D3Tpl() ; |
|
132 | - $tpl->assign('block', $block) ; |
|
133 | - $ret['content'] = $tpl->fetch($this_template) ; |
|
134 | - return $ret ; |
|
130 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
131 | + $tpl = new D3Tpl(); |
|
132 | + $tpl->assign('block', $block); |
|
133 | + $ret['content'] = $tpl->fetch($this_template); |
|
134 | + return $ret; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | |
138 | 138 | function b_altsys_admin_menu_edit($options) |
139 | 139 | { |
140 | - $mydirname = empty($options[0]) ? 'd3forum' : $options[0] ; |
|
141 | - $this_template = empty($options[1]) ? 'db:'.$mydirname.'_block_admin_menu.html' : trim($options[1]) ; |
|
140 | + $mydirname = empty($options[0]) ? 'd3forum' : $options[0]; |
|
141 | + $this_template = empty($options[1]) ? 'db:'.$mydirname.'_block_admin_menu.html' : trim($options[1]); |
|
142 | 142 | |
143 | 143 | if (preg_match('/[^0-9a-zA-Z_-]/', $mydirname)) { |
144 | - die('Invalid mydirname') ; |
|
144 | + die('Invalid mydirname'); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | $form = " |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__.'/include/altsys_functions.php' ; |
|
3 | +include_once __DIR__.'/include/altsys_functions.php'; |
|
4 | 4 | |
5 | 5 | // language file (modinfo.php) |
6 | -altsys_include_language_file('modinfo') ; |
|
6 | +altsys_include_language_file('modinfo'); |
|
7 | 7 | |
8 | -$modversion['name'] = _MI_ALTSYS_MODULENAME ; |
|
9 | -$modversion['version'] = '0.83' ; |
|
10 | -$modversion['detailed_version'] = '0.83.0' ; |
|
11 | -$modversion['description'] = _MI_ALTSYS_MODULEDESC ; |
|
8 | +$modversion['name'] = _MI_ALTSYS_MODULENAME; |
|
9 | +$modversion['version'] = '0.83'; |
|
10 | +$modversion['detailed_version'] = '0.83.0'; |
|
11 | +$modversion['description'] = _MI_ALTSYS_MODULEDESC; |
|
12 | 12 | $modversion['credits'] = 'PEAK Corp.'; |
13 | 13 | $modversion['author'] = 'GIJ=CHECKMATE<br />PEAK Corp.(http://www.peak.ne.jp/), XOOPS X Distribution(https://github.com/XoopsX)'; |
14 | 14 | $modversion['license'] = 'GPL see LICENSE'; |
@@ -26,18 +26,18 @@ discard block |
||
26 | 26 | $modversion['adminmenu'] = 'admin/admin_menu.php'; |
27 | 27 | |
28 | 28 | // All Templates can't be touched by modulesadmin. |
29 | -$modversion['templates'] = array() ; |
|
29 | +$modversion['templates'] = array(); |
|
30 | 30 | |
31 | 31 | // Blocks |
32 | 32 | $modversion['blocks'][1] = array( |
33 | - 'file' => 'blocks.php' , |
|
34 | - 'name' => _MI_ALTSYS_BNAME_ADMIN_MENU , |
|
35 | - 'description' => '' , |
|
36 | - 'show_func' => 'b_altsys_admin_menu_show' , |
|
37 | - 'edit_func' => 'b_altsys_admin_menu_edit' , |
|
38 | - 'options' => "$mydirname" , |
|
39 | - 'template' => '' , // use "module" template instead |
|
40 | -) ; |
|
33 | + 'file' => 'blocks.php', |
|
34 | + 'name' => _MI_ALTSYS_BNAME_ADMIN_MENU, |
|
35 | + 'description' => '', |
|
36 | + 'show_func' => 'b_altsys_admin_menu_show', |
|
37 | + 'edit_func' => 'b_altsys_admin_menu_edit', |
|
38 | + 'options' => "$mydirname", |
|
39 | + 'template' => '', // use "module" template instead |
|
40 | +); |
|
41 | 41 | |
42 | 42 | // Menu |
43 | 43 | $modversion['hasMain'] = 1; |
@@ -50,64 +50,64 @@ discard block |
||
50 | 50 | |
51 | 51 | // Configurations |
52 | 52 | $modversion['config'][1] = array( |
53 | - 'name' => 'adminmenu_hack_ft' , |
|
54 | - 'title' => '_MI_ALTSYS_ADMINMENU_HFT' , |
|
55 | - 'description' => '_MI_ALTSYS_ADMINMENU_HFTDSC' , |
|
56 | - 'formtype' => 'select' , |
|
57 | - 'valuetype' => 'int' , |
|
58 | - 'default' => 0 , |
|
59 | - 'options' => array( '_NONE' => 0 , '_MI_ALTSYS_AMHFT_OPT_2COL' => 1 , '_MI_ALTSYS_AMHFT_OPT_NOIMG' => 2 , '_MI_ALTSYS_AMHFT_OPT_XCSTY' => 3 ) |
|
60 | -) ; |
|
53 | + 'name' => 'adminmenu_hack_ft', |
|
54 | + 'title' => '_MI_ALTSYS_ADMINMENU_HFT', |
|
55 | + 'description' => '_MI_ALTSYS_ADMINMENU_HFTDSC', |
|
56 | + 'formtype' => 'select', |
|
57 | + 'valuetype' => 'int', |
|
58 | + 'default' => 0, |
|
59 | + 'options' => array('_NONE' => 0, '_MI_ALTSYS_AMHFT_OPT_2COL' => 1, '_MI_ALTSYS_AMHFT_OPT_NOIMG' => 2, '_MI_ALTSYS_AMHFT_OPT_XCSTY' => 3) |
|
60 | +); |
|
61 | 61 | |
62 | 62 | $modversion['config'][] = array( |
63 | - 'name' => 'adminmenu_insert_mymenu' , |
|
64 | - 'title' => '_MI_ALTSYS_ADMINMENU_IM' , |
|
65 | - 'description' => '_MI_ALTSYS_ADMINMENU_IMDSC' , |
|
66 | - 'formtype' => 'yesno' , |
|
67 | - 'valuetype' => 'int' , |
|
68 | - 'default' => 0 , |
|
63 | + 'name' => 'adminmenu_insert_mymenu', |
|
64 | + 'title' => '_MI_ALTSYS_ADMINMENU_IM', |
|
65 | + 'description' => '_MI_ALTSYS_ADMINMENU_IMDSC', |
|
66 | + 'formtype' => 'yesno', |
|
67 | + 'valuetype' => 'int', |
|
68 | + 'default' => 0, |
|
69 | 69 | 'options' => array() |
70 | -) ; |
|
70 | +); |
|
71 | 71 | |
72 | 72 | $modversion['config'][] = array( |
73 | - 'name' => 'admin_in_theme' , |
|
74 | - 'title' => '_MI_ALTSYS_ADMIN_IN_THEME' , |
|
75 | - 'description' => '_MI_ALTSYS_ADMIN_IN_THEMEDSC' , |
|
76 | - 'formtype' => 'textbox' , |
|
77 | - 'valuetype' => 'text' , |
|
78 | - 'default' => 'default' , |
|
73 | + 'name' => 'admin_in_theme', |
|
74 | + 'title' => '_MI_ALTSYS_ADMIN_IN_THEME', |
|
75 | + 'description' => '_MI_ALTSYS_ADMIN_IN_THEMEDSC', |
|
76 | + 'formtype' => 'textbox', |
|
77 | + 'valuetype' => 'text', |
|
78 | + 'default' => 'default', |
|
79 | 79 | 'options' => array() |
80 | -) ; |
|
80 | +); |
|
81 | 81 | |
82 | 82 | $modversion['config'][] = array( |
83 | - 'name' => 'enable_force_clone' , |
|
84 | - 'title' => '_MI_ALTSYS_ENABLEFORCECLONE' , |
|
85 | - 'description' => '_MI_ALTSYS_ENABLEFORCECLONEDSC' , |
|
86 | - 'formtype' => 'yesno' , |
|
87 | - 'valuetype' => 'int' , |
|
88 | - 'default' => 1 , |
|
83 | + 'name' => 'enable_force_clone', |
|
84 | + 'title' => '_MI_ALTSYS_ENABLEFORCECLONE', |
|
85 | + 'description' => '_MI_ALTSYS_ENABLEFORCECLONEDSC', |
|
86 | + 'formtype' => 'yesno', |
|
87 | + 'valuetype' => 'int', |
|
88 | + 'default' => 1, |
|
89 | 89 | 'options' => array() |
90 | -) ; |
|
90 | +); |
|
91 | 91 | |
92 | 92 | $modversion['config'][] = array( |
93 | - 'name' => 'images_dir' , |
|
94 | - 'title' => '_MI_ALTSYS_IMAGES_DIR' , |
|
95 | - 'description' => '_MI_ALTSYS_IMAGES_DIRDSC' , |
|
96 | - 'formtype' => 'textbox' , |
|
97 | - 'valuetype' => 'text' , |
|
98 | - 'default' => 'images' , |
|
93 | + 'name' => 'images_dir', |
|
94 | + 'title' => '_MI_ALTSYS_IMAGES_DIR', |
|
95 | + 'description' => '_MI_ALTSYS_IMAGES_DIRDSC', |
|
96 | + 'formtype' => 'textbox', |
|
97 | + 'valuetype' => 'text', |
|
98 | + 'default' => 'images', |
|
99 | 99 | 'options' => array() |
100 | -) ; |
|
100 | +); |
|
101 | 101 | |
102 | 102 | // Notification |
103 | 103 | |
104 | 104 | $modversion['hasNotification'] = 0; |
105 | 105 | |
106 | -$modversion['onInstall'] = 'include/oninstall.php' ; |
|
107 | -$modversion['onUpdate'] = 'include/onupdate.php' ; |
|
108 | -$modversion['onUninstall'] = 'include/onuninstall.php' ; |
|
106 | +$modversion['onInstall'] = 'include/oninstall.php'; |
|
107 | +$modversion['onUpdate'] = 'include/onupdate.php'; |
|
108 | +$modversion['onUninstall'] = 'include/onuninstall.php'; |
|
109 | 109 | |
110 | 110 | // keep block's options |
111 | -if (! defined('XOOPS_CUBE_LEGACY') && substr(XOOPS_VERSION, 6, 3) < 2.1 && ! empty($_POST['fct']) && ! empty($_POST['op']) && $_POST['fct'] == 'modulesadmin' && $_POST['op'] == 'update_ok' && $_POST['dirname'] == $modversion['dirname']) { |
|
112 | - include __DIR__.'/include/x20_keepblockoptions.inc.php' ; |
|
111 | +if (!defined('XOOPS_CUBE_LEGACY') && substr(XOOPS_VERSION, 6, 3) < 2.1 && !empty($_POST['fct']) && !empty($_POST['op']) && $_POST['fct'] == 'modulesadmin' && $_POST['op'] == 'update_ok' && $_POST['dirname'] == $modversion['dirname']) { |
|
112 | + include __DIR__.'/include/x20_keepblockoptions.inc.php'; |
|
113 | 113 | } |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_ROOT_PATH')) { |
|
4 | - exit ; |
|
3 | +if (!defined('XOOPS_ROOT_PATH')) { |
|
4 | + exit; |
|
5 | 5 | } |
6 | 6 | |
7 | -$core_type = altsys_get_core_type() ; |
|
8 | -$db = XoopsDatabaseFactory::getDatabaseConnection() ; |
|
7 | +$core_type = altsys_get_core_type(); |
|
8 | +$db = XoopsDatabaseFactory::getDatabaseConnection(); |
|
9 | 9 | |
10 | -$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']) ; |
|
10 | +$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']); |
|
11 | 11 | if ($current_dirname == '__CustomBlocks__') { |
12 | - return ; |
|
12 | + return; |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | $module_handler4menu = xoops_gethandler('module'); |
@@ -17,45 +17,45 @@ discard block |
||
17 | 17 | //$criteria4menu->add(new Criteria('hasmain', 1)); |
18 | 18 | $criteria4menu->add(new Criteria('mid', '1', '>')); |
19 | 19 | $modules4menu = $module_handler4menu->getObjects($criteria4menu, true); |
20 | - $system_module = $module_handler4menu->get(1) ; |
|
20 | + $system_module = $module_handler4menu->get(1); |
|
21 | 21 | if (is_object($system_module)) { |
22 | - array_unshift($modules4menu, $system_module) ; |
|
22 | + array_unshift($modules4menu, $system_module); |
|
23 | 23 | } |
24 | 24 | |
25 | -$adminmenu = array() ; |
|
25 | +$adminmenu = array(); |
|
26 | 26 | foreach ($modules4menu as $m4menu) { |
27 | 27 | // get block info |
28 | 28 | if ($core_type != ALTSYS_CORE_TYPE_X22) { |
29 | - list($block_count_all) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $m4menu->getVar('mid'))) ; |
|
30 | - list($block_count_visible) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $m4menu->getVar('mid') . ' AND visible>0')) ; |
|
29 | + list($block_count_all) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('newblocks').' WHERE mid='.$m4menu->getVar('mid'))); |
|
30 | + list($block_count_visible) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('newblocks').' WHERE mid='.$m4menu->getVar('mid').' AND visible>0')); |
|
31 | 31 | // $block_desc = " $block_count_all($block_count_visible)" ; |
32 | - $block_desc = " ($block_count_visible/$block_count_all)" ; |
|
32 | + $block_desc = " ($block_count_visible/$block_count_all)"; |
|
33 | 33 | } else { |
34 | - $block_desc = '' ; |
|
34 | + $block_desc = ''; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | if ($m4menu->getVar('dirname') == $current_dirname) { |
38 | 38 | $adminmenu[] = array( |
39 | - 'selected' => true , |
|
40 | - 'title' => $m4menu->getVar('name', 'n') . $block_desc , |
|
39 | + 'selected' => true, |
|
40 | + 'title' => $m4menu->getVar('name', 'n').$block_desc, |
|
41 | 41 | 'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$m4menu->getVar('dirname', 'n') |
42 | - ) ; |
|
42 | + ); |
|
43 | 43 | //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => $m4menu->getVar('name') ) ; |
44 | 44 | } else { |
45 | 45 | $adminmenu[] = array( |
46 | - 'selected' => false , |
|
47 | - 'title' => $m4menu->getVar('name', 'n') . $block_desc , |
|
46 | + 'selected' => false, |
|
47 | + 'title' => $m4menu->getVar('name', 'n').$block_desc, |
|
48 | 48 | 'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$m4menu->getVar('dirname', 'n') |
49 | - ) ; |
|
49 | + ); |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | 53 | |
54 | 54 | // display |
55 | -require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ; |
|
56 | -$tpl = new D3Tpl() ; |
|
55 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
56 | +$tpl = new D3Tpl(); |
|
57 | 57 | $tpl->assign(array( |
58 | 58 | 'adminmenu' => $adminmenu, |
59 | 59 | 'mypage' => 'myblocksadmin' |
60 | -)) ; |
|
61 | -$tpl->display('db:altsys_inc_mymenusub.html') ; |
|
60 | +)); |
|
61 | +$tpl->display('db:altsys_inc_mymenusub.html'); |
@@ -1,37 +1,37 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_ROOT_PATH')) { |
|
4 | - exit ; |
|
3 | +if (!defined('XOOPS_ROOT_PATH')) { |
|
4 | + exit; |
|
5 | 5 | } |
6 | 6 | |
7 | -$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']) ; |
|
7 | +$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']); |
|
8 | 8 | |
9 | -$db = XoopsDatabaseFactory::getDatabaseConnection() ; |
|
10 | -$mrs = $db->query('SELECT m.name,m.dirname,COUNT(l.mid) FROM ' . $db->prefix('modules') . ' m LEFT JOIN ' . $db->prefix('altsys_language_constants') . ' l ON m.mid=l.mid WHERE m.isactive GROUP BY m.mid ORDER BY m.weight,m.mid') ; |
|
9 | +$db = XoopsDatabaseFactory::getDatabaseConnection(); |
|
10 | +$mrs = $db->query('SELECT m.name,m.dirname,COUNT(l.mid) FROM '.$db->prefix('modules').' m LEFT JOIN '.$db->prefix('altsys_language_constants').' l ON m.mid=l.mid WHERE m.isactive GROUP BY m.mid ORDER BY m.weight,m.mid'); |
|
11 | 11 | |
12 | -$adminmenu = array() ; |
|
12 | +$adminmenu = array(); |
|
13 | 13 | while (list($name, $dirname, $count) = $db->fetchRow($mrs)) { |
14 | 14 | if ($dirname == $current_dirname) { |
15 | 15 | $adminmenu[] = array( |
16 | - 'selected' => true , |
|
17 | - 'title' => $name . " ($count)" , |
|
16 | + 'selected' => true, |
|
17 | + 'title' => $name." ($count)", |
|
18 | 18 | 'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname='.$dirname |
19 | - ) ; |
|
19 | + ); |
|
20 | 20 | //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => htmlspecialchars( $name , ENT_QUOTES ) ) ; |
21 | 21 | } else { |
22 | 22 | $adminmenu[] = array( |
23 | - 'selected' => false , |
|
24 | - 'title' => $name . " ($count)" , |
|
23 | + 'selected' => false, |
|
24 | + 'title' => $name." ($count)", |
|
25 | 25 | 'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname='.$dirname |
26 | - ) ; |
|
26 | + ); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | |
30 | 30 | // display |
31 | -require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ; |
|
32 | -$tpl = new D3Tpl() ; |
|
31 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
32 | +$tpl = new D3Tpl(); |
|
33 | 33 | $tpl->assign(array( |
34 | 34 | 'adminmenu' => $adminmenu, |
35 | 35 | 'mypage' => 'mylangadmin' |
36 | -)) ; |
|
37 | -$tpl->display('db:altsys_inc_mymenusub.html') ; |
|
36 | +)); |
|
37 | +$tpl->display('db:altsys_inc_mymenusub.html'); |
@@ -1,56 +1,56 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_ROOT_PATH')) { |
|
4 | - exit ; |
|
3 | +if (!defined('XOOPS_ROOT_PATH')) { |
|
4 | + exit; |
|
5 | 5 | } |
6 | 6 | |
7 | -$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']) ; |
|
7 | +$current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']); |
|
8 | 8 | |
9 | -$db = XoopsDatabaseFactory::getDatabaseConnection() ; |
|
9 | +$db = XoopsDatabaseFactory::getDatabaseConnection(); |
|
10 | 10 | |
11 | 11 | // get custom templates |
12 | -list($count) = $db->fetchRow($db->query('SELECT COUNT(t.tpl_module) AS tpl_count FROM ' . $db->prefix('tplfile') . " t WHERE t.tpl_type='custom'")) ; |
|
12 | +list($count) = $db->fetchRow($db->query('SELECT COUNT(t.tpl_module) AS tpl_count FROM '.$db->prefix('tplfile')." t WHERE t.tpl_type='custom'")); |
|
13 | 13 | if ($current_dirname == '_custom') { |
14 | 14 | // $GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => _MYTPLSADMIN_CUSTOMTEMPLATE ) ; |
15 | - $custom_selected = true ; |
|
15 | + $custom_selected = true; |
|
16 | 16 | } else { |
17 | - $custom_selected = false ; |
|
17 | + $custom_selected = false; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | $adminmenu = array( |
21 | 21 | array( |
22 | - 'selected' => $custom_selected , |
|
23 | - 'title' => _MYTPLSADMIN_CUSTOMTEMPLATE . " ($count)" , |
|
22 | + 'selected' => $custom_selected, |
|
23 | + 'title' => _MYTPLSADMIN_CUSTOMTEMPLATE." ($count)", |
|
24 | 24 | 'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname=_custom' |
25 | 25 | ) |
26 | -) ; |
|
26 | +); |
|
27 | 27 | |
28 | 28 | // get modules/templates |
29 | -$mrs = $db->query('SELECT m.name,m.dirname,COUNT(t.tpl_module) AS tpl_count FROM ' . $db->prefix('modules') . ' m LEFT JOIN ' . $db->prefix('tplfile') . ' t ON m.dirname=t.tpl_module WHERE m.isactive GROUP BY m.mid HAVING tpl_count>0 ORDER BY m.weight,m.mid') ; |
|
29 | +$mrs = $db->query('SELECT m.name,m.dirname,COUNT(t.tpl_module) AS tpl_count FROM '.$db->prefix('modules').' m LEFT JOIN '.$db->prefix('tplfile').' t ON m.dirname=t.tpl_module WHERE m.isactive GROUP BY m.mid HAVING tpl_count>0 ORDER BY m.weight,m.mid'); |
|
30 | 30 | |
31 | 31 | // module loop |
32 | 32 | while (list($name, $dirname, $count) = $db->fetchRow($mrs)) { |
33 | 33 | if ($dirname == $current_dirname) { |
34 | 34 | $adminmenu[] = array( |
35 | - 'selected' => true , |
|
36 | - 'title' => $name . " ($count)" , |
|
35 | + 'selected' => true, |
|
36 | + 'title' => $name." ($count)", |
|
37 | 37 | 'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$dirname |
38 | - ) ; |
|
38 | + ); |
|
39 | 39 | //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => htmlspecialchars( $name , ENT_QUOTES ) ) ; |
40 | 40 | } else { |
41 | 41 | $adminmenu[] = array( |
42 | - 'selected' => false , |
|
43 | - 'title' => $name . " ($count)" , |
|
42 | + 'selected' => false, |
|
43 | + 'title' => $name." ($count)", |
|
44 | 44 | 'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$dirname |
45 | - ) ; |
|
45 | + ); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | |
49 | 49 | // display |
50 | -require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ; |
|
51 | -$tpl = new D3Tpl() ; |
|
50 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
51 | +$tpl = new D3Tpl(); |
|
52 | 52 | $tpl->assign(array( |
53 | 53 | 'adminmenu' => $adminmenu, |
54 | 54 | 'mypage' => 'mytplsadmin' |
55 | -)) ; |
|
56 | -$tpl->display('db:altsys_inc_mymenusub.html') ; |
|
55 | +)); |
|
56 | +$tpl->display('db:altsys_inc_mymenusub.html'); |