mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1175 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
eb3142a434
commit
8ed249412a
5 changed files with 49 additions and 6 deletions
|
|
@ -155,16 +155,17 @@
|
|||
for($i=0;$i<$menu_count;$i++) {
|
||||
$id = $menus[$i]->attrs->id;
|
||||
if($menus[$i]->attrs->default == "true") $buff .= sprintf('$layout_info->default_menu = "%s";', $id);
|
||||
$buff .= sprintf('$layout_info->menu->{%s}->id = "%s";',$id, $menus[$i]->attrs->id);
|
||||
$buff .= sprintf('$layout_info->menu->{%s}->name = "%s";',$id, $menus[$i]->name->body);
|
||||
$buff .= sprintf('$layout_info->menu->{%s}->maxdepth = "%s";',$id, $menus[$i]->maxdepth->body);
|
||||
$buff .= sprintf('$layout_info->menu->{%s}->xml_file = "./files/cache/layout/".$layout_srl."_%s.xml.php";',$id, $id);
|
||||
$buff .= sprintf('$layout_info->menu->{%s}->php_file = "./files/cache/layout/".$layout_srl."_%s.php";',$id, $id);
|
||||
$buff .= sprintf('$layout_info->menu->%s->id = "%s";',$id, $menus[$i]->attrs->id);
|
||||
$buff .= sprintf('$layout_info->menu->%s->name = "%s";',$id, $menus[$i]->name->body);
|
||||
$buff .= sprintf('$layout_info->menu->%s->maxdepth = "%s";',$id, $menus[$i]->maxdepth->body);
|
||||
|
||||
$buff .= sprintf('$layout_info->menu->%s->menu_srl = $vars->%s;', $id, $id);
|
||||
$buff .= sprintf('$layout_info->menu->%s->xml_file = "./files/cache/menu/".$vars->%s.".xml.php";',$id, $id);
|
||||
$buff .= sprintf('$layout_info->menu->%s->php_file = "./files/cache/menu/".$vars->%s.".php";',$id, $id);
|
||||
}
|
||||
|
||||
$buff = '<?php if(!defined("__ZBXE__")) exit(); '.$buff.' ?>';
|
||||
FileHandler::writeFile($cache_file, $buff);
|
||||
|
||||
if(file_exists($cache_file)) include $cache_file;
|
||||
return $layout_info;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,11 @@
|
|||
|
||||
Context::set('layout_info', $layout_info);
|
||||
|
||||
// 메뉴 목록을 가져옴
|
||||
$oMenuModel = &getModel('menu');
|
||||
$menu_list = $oMenuModel->getMenus();
|
||||
Context::set('menu_list', $menu_list);
|
||||
|
||||
$this->setTemplateFile('layout_modify');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,19 @@
|
|||
<td>{$var->description}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<!--@foreach($layout_info->menu as $menu_id => $menu_info)-->
|
||||
<tr>
|
||||
<th>{$menu_info->name} ({$menu_id})</th>
|
||||
<td>
|
||||
<select name="{$menu_id}">
|
||||
<option value="0">------------------------</option>
|
||||
<!--@foreach($menu_list as $key => $val)-->
|
||||
<option value="{$val->menu_srl}" <!--@if($val->menu_srl == $menu_info->menu_srl)-->selected="true"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<!--@if($module=='admin')-->
|
||||
|
|
|
|||
|
|
@ -33,6 +33,19 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 등록된 모든 메뉴를 return
|
||||
**/
|
||||
function getMenus() {
|
||||
// 일단 DB에서 정보를 가져옴
|
||||
$args->menu_srl = $menu_srl;
|
||||
$output = executeQuery('menu.getMenus', $args);
|
||||
if(!$output->data) return;
|
||||
$menus = $output->data;
|
||||
if(!is_array($menus)) $menus = array($menus);
|
||||
return $menus;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DB 에 생성된 한개의 메뉴 정보를 구함
|
||||
* 생성된 메뉴의 DB정보+XML정보를 return
|
||||
|
|
|
|||
11
modules/menu/queries/getMenus.xml
Normal file
11
modules/menu/queries/getMenus.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getMenus" action="select">
|
||||
<tables>
|
||||
<table name="menu" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<navigation>
|
||||
<index var="sort_index" default="listorder" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
Loading…
Add table
Add a link
Reference in a new issue