13 private $menuSrlWithinHome = 0;
33 $obj->site_srl = (int)$site_module_info->site_srl;
59 $site_srl = (int)$site_module_info->site_srl;
62 $args =
new stdClass();
63 $args->site_srl = $site_srl ;
64 $args->menu_srl = $menu_srl;
80 $args =
new stdClass();
81 $args->menu_srl = $menu_srl;
86 $menu_info->xml_file = sprintf(
'./files/cache/menu/%s.xml.php',$menu_srl);
87 $menu_info->php_file = sprintf(
'./files/cache/menu/%s.php',$menu_srl);
100 if(!is_array($title))
102 $title = array($title);
104 $args =
new stdClass();
105 $args->title = $title;
106 $args->site_srl = $site_srl;
111 else $menu_info =
$output->data;
113 if($menu_info->menu_srl)
115 $menu_info->xml_file = sprintf(
'./files/cache/menu/%s.xml.php',$menu_info->menu_srl);
116 $menu_info->php_file = sprintf(
'./files/cache/menu/%s.php',$menu_info->menu_srl);
130 $args =
new stdClass();
131 $args->title = $title;
150 $args =
new stdClass();
151 $args->menu_item_srl = $menu_item_srl;
154 settype($node,
'object');
155 if($node->group_srls) $node->group_srls = explode(
',',$node->group_srls);
156 else $node->group_srls = array();
158 $tmp_name = unserialize($node->name);
159 if($tmp_name && count($tmp_name))
161 $selected_lang = array();
163 if(!$rand_name) $rand_name = array_shift($tmp_name);
164 $node->name = $rand_name;
180 $menuItem->moduleType = null;
182 else if(strncasecmp(
'http', $menuItem->url, 4) !== 0)
197 else $menuItem->moduleType =
'url';
200 if(is_array($menuItem->group_srls) && count($menuItem->group_srls) > 0)
202 if($menuItem->group_srls[0] == -1)
204 $menuItem->grant =
'member';
206 else if($menuItem->group_srls[0] == -3)
208 $menuItem->grant =
'manager';
212 $menuItem->grant =
'group';
219 $output = $oMemberModel->getGroups();
222 $groupList = array();
223 foreach(
$output AS $key=>$value)
225 $groupList[$value->group_srl] =
new stdClass();
226 $groupList[$value->group_srl]->group_srl = $value->group_srl;
227 if(substr($value->title,0,12)==
'$user_lang->')
229 $tmp = $oModuleAdminModel->getLangCode(0, $value->title);
232 else $groupList[$value->group_srl]->title = $value->title;
234 if(in_array($key, $menuItem->group_srls)) $groupList[$value->group_srl]->isChecked =
true;
235 else $groupList[$value->group_srl]->isChecked =
false;
238 $menuItem->groupList = $groupList;
241 $menuItem->name_key = $menuItem->name;
244 $this->
add(
'menu_item', $menuItem);
254 function getMenuItems($menu_srl, $parent_srl = null, $columnList = array())
256 $args =
new stdClass();
257 $args->menu_srl = $menu_srl;
258 $args->parent_srl = $parent_srl;
275 $site_srl = (int)$site_module_info->site_srl;
279 return $oModuleAdminModel->getLangCode($site_srl, $source_name, TRUE);
294 $group_list = $oMemberModel->getGroups();
298 $item_info =
new stdClass;
299 if(!$menu_item_srl && $parent_srl)
305 $item_info->parent_srl = $parent_srl;
306 $item_info->parent_menu_name = $parent_info->name;
312 if($menu_item_srl) $item_info = $this->
getMenuItemInfo($menu_item_srl);
314 if(!$item_info->menu_item_srl)
322 $security->encodeHTML(
'group_list..title');
323 $security->encodeHTML(
'item_info.url');
324 $security->encodeHTML(
'item_info.name');
328 $tpl = $oTemplate->compile($this->module_path.
'tpl',
'menu_item_info');
330 $this->
add(
'tpl', str_replace(
"\n",
" ",$tpl));
339 $oAutoinstallModel =
getModel(
'autoinstall');
345 $allModules = array();
349 foreach($_allModules as $module_name)
353 $defaultSkin =
$oModuleModel->getModuleDefaultSkin($module_name,
'P');
354 $defaultMobileSkin =
$oModuleModel->getModuleDefaultSkin($module_name,
'M');
357 $module->defaultSkin =
new stdClass();
358 $module->defaultSkin->skin = $defaultSkin;
359 $module->defaultSkin->title = $skinInfo->title ? $skinInfo->title : $defaultSkin;
360 $module->defaultMobileSkin =
new stdClass();
361 $module->defaultMobileSkin->skin = $defaultMobileSkin;
362 $module->defaultMobileSkin->title = $mobileSkinInfo->title ? $mobileSkinInfo->title : $defaultMobileSkin;
364 $module->package_srl = $oAutoinstallModel->getPackageSrlByPath(
'./modules/' . $module_name);
367 if($module_name ==
'page')
370 $module->title = $pageTypeName[
'ARTICLE'];
371 $allModules[
'ARTICLE'] =
$module;
373 unset($wModuleInfo->default_skin, $wModuleInfo->default_mskin);
374 $wModuleInfo->title = $pageTypeName[
'WIDGET'];
375 $wModuleInfo->no_skin =
'Y';
376 $allModules[
'WIDGET'] = $wModuleInfo;
378 unset($oModuleInfo->default_skin, $oModuleInfo->default_mskin);
379 $oModuleInfo->title = $pageTypeName[
'OUTSIDE'];
380 $oModuleInfo->no_skin =
'Y';
381 $allModules[
'OUTSIDE'] = $oModuleInfo;
385 $allModules[$module_name] =
$module;
389 $this->
add(
'all_modules', $allModules);
406 foreach(
$output->data as $value)
408 if($value->instanceCount > 1)
421 $oAutoinstallModel =
getModel(
'autoinstall');
424 $remotePackageList = $oAutoinstallModel->getHaveInstance(array(
'path'));
425 $remoteModuleList = array();
426 foreach($remotePackageList as $package)
428 if(strpos($package->path,
'./modules/') !== 0)
continue;
430 $pathInfo = explode(
'/', $package->path);
431 $remoteModuleList[] = $pathInfo[2];
438 $haveInstance = array_intersect($remoteModuleList, $allModuleList);
439 $haveDirectory = array_intersect($localModuleList, $allModuleList);
442 $moduleList = array_unique(array_merge($haveDirectory, $haveInstance));
444 $moduleInfoList = array();
458 unset($wModuleInfo->default_skin, $wModuleInfo->default_mskin);
459 $wModuleInfo->title = $pageTypeName[
'WIDGET'];
460 $wModuleInfo->no_skin =
'Y';
461 $moduleInfoList[
'WIDGET'] = $wModuleInfo;
463 unset($oModuleInfo->default_skin, $oModuleInfo->default_mskin);
464 $oModuleInfo->title = $pageTypeName[
'OUTSIDE'];
465 $oModuleInfo->no_skin =
'Y';
466 $moduleInfoList[
'OUTSIDE'] = $oModuleInfo;
475 return $moduleInfoList;
486 $siteSrl = (int)$site_module_info->site_srl;
491 $columnList = array(
'modules.mid',
'modules.browser_title',
'sites.index_module_srl');
497 $isMenuFixed =
false;
499 $php_file = sprintf(
_XE_PATH_ .
'files/cache/menu/%s.php',
$output->menu_srl);
500 if(file_exists($php_file)) include($php_file);
503 if(count($menu->list)>0)
505 foreach($menu->list AS $key=>$value)
507 $this->_menuInfoSetting($menu->list[$key], $start_module, $isMenuFixed, $menuSrl,$siteSrl);
517 $menuItems->menuSrl =
$output->menu_srl;
518 $menuItems->title =
$output->title;
519 $menuItems->menuItems = $menu;
520 $menuList[] = $menuItems;
524 $menuListFromDB = $this->
getMenus($siteSrl);
525 if(is_array($menuListFromDB))
528 foreach($menuListFromDB AS $key=>$value)
530 if($value->title == $oAdmin->getAdminMenuName()) unset(
$output[$key]);
535 $value->php_file = sprintf(
_XE_PATH_ .
'files/cache/menu/%s.php',$value->menu_srl);
536 if(!file_exists($value->php_file))
541 include($value->php_file);
543 $isMenuFixed =
false;
544 if(count($menu->list) > 0)
546 foreach($menu->list AS $key2=>$value2)
548 $this->_menuInfoSetting($menu->list[$key2], $start_module, $isMenuFixed, $value->menu_srl,$siteSrl);
558 $menuItems =
new stdClass();
559 $menuItems->menuSrl = $value->menu_srl;
560 $menuItems->title = $value->title;
561 $menuItems->menuItems = $menu;
564 if($value->menu_srl == $this->menuSrlWithinHome)
566 $menuList[-1] = $menuItems;
570 $menuList[] = $menuItems;
577 $this->
add(
'menuList', $menuList);
589 return new BaseObject(-1,
'msg_invalid_request');
595 if($menuItemInfo->is_shortcut ==
'Y')
597 return new BaseObject(-1,
'msg_invalid_request');
607 if($moduleConfInfo->setup_index_act)
609 $setupUrl =
getNotEncodedUrl(
'',
'module',
'admin',
'act', $moduleConfInfo->setup_index_act,
'module_srl',
$moduleInfo->module_srl,
'isLayoutDrop',
'1');
612 if($moduleConfInfo->simple_setup_index_act)
615 $advancedSetupUrl =
getUrl(
'',
'module',
'admin',
'act', $moduleConfInfo->setup_index_act,
'module_srl',
$moduleInfo->module_srl);
616 $simpleSetupHtml = $oTargetmoduleAdminModel->{$moduleConfInfo->simple_setup_index_act}(
$moduleInfo->module_srl, $advancedSetupUrl);
620 $this->
add(
'simpleSetupHtml', $simpleSetupHtml);
623 $this->
add(
'setupUrl', $setupUrl);
631 private function _menuInfoSetting(&$menu, &$start_module, &$isMenuFixed, $menuSrl,$siteSrl = 0)
635 if(!$menu[
'url'] && $menu[
'is_shortcut'] ==
'N')
637 $menu[
'is_shortcut'] =
'Y';
639 $args =
new stdClass;
640 $args->menu_item_srl = $menu[
'node_srl'];
641 $args->is_shortcut =
'Y';
642 if($menu[
'menu_name_key'])
$args->name = $menu[
'menu_name_key'];
643 else $args->name = $menu[
'menu_name'];
651 if($menu[
'is_shortcut'] !=
'Y')
654 $midInfo =
$oModuleModel->getModuleInfoByMid($menu[
'url'], $siteSrl);
659 $menu[
'module_srl'] = $midInfo->module_srl;
660 $menu[
'module'] = $midInfo->module;
661 if($midInfo->page_type)
663 $menu[
'module_type'] = $midInfo->page_type;
667 $menu[
'module_type'] = $midInfo->module;
673 $menu[
'setup_index_act'] =
$moduleInfo->setup_index_act;
677 $menu[
'setup_index_act'] =
$moduleInfo->default_index_act;
680 if($menu[
'is_shortcut'] ==
'N' && $midInfo->mid == $start_module->mid)
682 $menu[
'is_start_module'] =
true;
683 $this->menuSrlWithinHome = $menuSrl;
686 $menu[
'layout_srl'] = $midInfo->layout_srl;
687 $menu[
'browser_title'] = $midInfo->browser_title;
689 if(count($menu[
'list']) > 0)
691 foreach($menu[
'list'] as $key=>$value)
693 $this->_menuInfoSetting($menu[
'list'][$key], $start_module, $isMenuFixed, $menuSrl, $siteSrl);
getController($module_name)
set($key, $val, $set_to_get_vars=0)
getAdminModel($module_name)
executeQueryArray($query_id, $args=NULL, $arg_columns=NULL)
getAdminController($module_name)
readDir($path, $filter= '', $to_lower=FALSE, $concat_prefix=FALSE)
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
$module
Class name of Xe Module that is identified by mid.
triggerCall($trigger_name, $called_position, &$obj)