mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@369 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
127a6d4191
commit
4f2181d9df
9 changed files with 110 additions and 117 deletions
|
|
@ -13,55 +13,5 @@
|
|||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 종류와 정보를 구함
|
||||
**/
|
||||
function getModuleList() {
|
||||
// module model 객체 생성
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 다운받은 모듈과 설치된 모듈의 목록을 구함
|
||||
$downloaded_list = FileHandler::readDir('./files/modules');
|
||||
$installed_list = FileHandler::readDir('./modules');
|
||||
$searched_list = array_merge($downloaded_list, $installed_list);
|
||||
$searched_count = count($searched_list);
|
||||
if(!$searched_count) return;
|
||||
|
||||
for($i=0;$i<$searched_count;$i++) {
|
||||
// 모듈의 이름
|
||||
$module_name = $searched_list[$i];
|
||||
|
||||
// 모듈의 경로 (files/modules가 우선)
|
||||
$path = ModuleHandler::getModulePath($module_name);
|
||||
|
||||
// schemas내의 테이블 생성 xml파일수를 구함
|
||||
$tmp_files = FileHandler::readDir($path."schemas");
|
||||
$table_count = count($tmp_files);
|
||||
|
||||
// 테이블이 설치되어 있는지 체크
|
||||
$created_table_count = 0;
|
||||
for($j=0;$j<count($tmp_files);$j++) {
|
||||
list($table_name) = explode(".",$tmp_files[$j]);
|
||||
if($oDB->isTableExists($table_name)) $created_table_count ++;
|
||||
}
|
||||
|
||||
// 해당 모듈의 정보를 구함
|
||||
$info = $oModuleModel->getModuleInfoXml($module_name);
|
||||
unset($obj);
|
||||
|
||||
$info->module = $module_name;
|
||||
$info->created_table_count = $created_table_count;
|
||||
$info->table_count = $table_count;
|
||||
$info->path = $path;
|
||||
$info->admin_index_act = $info->admin_index_act;
|
||||
|
||||
$list[] = $info;
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@
|
|||
* @brief 모듈의 목록을 보여줌
|
||||
**/
|
||||
function dispModuleList() {
|
||||
// 모듈 목록을 세팅
|
||||
$oAdminModel = &getModel('admin');
|
||||
$module_list = $oAdminModel->getModuleList();
|
||||
Context::set('module_list', $module_list);
|
||||
// moduleView::dispModuleList()를 실행하고 템플릿 파일을 구해옴
|
||||
$oModuleView = &getView('module');
|
||||
$oModuleView->dispModuleList();
|
||||
|
||||
$this->setTemplateFile('module_list');
|
||||
$this->setTemplatePath($oModuleView->getTemplatePath());
|
||||
$this->setTemplateFile($oModuleView->getTemplateFile());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
<table border="1" width="100%">
|
||||
<tr>
|
||||
<td>{$lang->module_name}</td>
|
||||
<td>{$lang->version}</td>
|
||||
<td>{$lang->author}</td>
|
||||
<td>{$lang->date}</td>
|
||||
<td>{$lang->table_count}</td>
|
||||
<td>{$lang->installed_path}</td>
|
||||
</tr>
|
||||
<!--@foreach($module_list as $key => $val)-->
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<!--@if($val->admin_index_act)-->
|
||||
<a href="#" onclick="location.href='{getUrl('mo',$val->module,'act',$val->admin_index_act)}'">{$val->title}</a> <br /> ({$val->module})
|
||||
<!--@else-->
|
||||
{$val->title} <br />
|
||||
({$val->module})
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td>{$val->version}</td>
|
||||
<td><a href="#" onclick="window.open('{$val->author->homepage}')">{$val->author->name}</a></td>
|
||||
<td>{$val->author->date}</td>
|
||||
<td>
|
||||
<!--@if($val->created_table_count != $val->table_count)-->
|
||||
<span style="color:red">
|
||||
<!--@else-->
|
||||
<span>
|
||||
<!--@end-->
|
||||
{$val->created_table_count}/{$val->table_count}
|
||||
</span>
|
||||
</td>
|
||||
<td>{$val->path}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
{nl2br($val->author->description)}
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
|
|
@ -4,4 +4,8 @@
|
|||
* @author zero (zero@nzeo.com)
|
||||
* @brief 한국어 언어팩
|
||||
**/
|
||||
|
||||
$lang->module_list = "모듈 목록";
|
||||
$lang->module_config = "설정";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -392,5 +392,52 @@
|
|||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 종류와 정보를 구함
|
||||
**/
|
||||
function getModuleList() {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 다운받은 모듈과 설치된 모듈의 목록을 구함
|
||||
$downloaded_list = FileHandler::readDir('./files/modules');
|
||||
$installed_list = FileHandler::readDir('./modules');
|
||||
$searched_list = array_merge($downloaded_list, $installed_list);
|
||||
$searched_count = count($searched_list);
|
||||
if(!$searched_count) return;
|
||||
|
||||
for($i=0;$i<$searched_count;$i++) {
|
||||
// 모듈의 이름
|
||||
$module_name = $searched_list[$i];
|
||||
|
||||
// 모듈의 경로 (files/modules가 우선)
|
||||
$path = ModuleHandler::getModulePath($module_name);
|
||||
|
||||
// schemas내의 테이블 생성 xml파일수를 구함
|
||||
$tmp_files = FileHandler::readDir($path."schemas");
|
||||
$table_count = count($tmp_files);
|
||||
|
||||
// 테이블이 설치되어 있는지 체크
|
||||
$created_table_count = 0;
|
||||
for($j=0;$j<count($tmp_files);$j++) {
|
||||
list($table_name) = explode(".",$tmp_files[$j]);
|
||||
if($oDB->isTableExists($table_name)) $created_table_count ++;
|
||||
}
|
||||
|
||||
// 해당 모듈의 정보를 구함
|
||||
$info = $this->getModuleInfoXml($module_name);
|
||||
unset($obj);
|
||||
|
||||
$info->module = $module_name;
|
||||
$info->created_table_count = $created_table_count;
|
||||
$info->table_count = $table_count;
|
||||
$info->path = $path;
|
||||
$info->admin_index_act = $info->admin_index_act;
|
||||
|
||||
$list[] = $info;
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -16,19 +16,25 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 관리자의 index
|
||||
* @brief 모듈 관리자 페이지
|
||||
**/
|
||||
function dispContent() {
|
||||
// 모듈모델 객체를 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 등록된 모듈의 목록을 구해옴
|
||||
//$installed_module_list = $oModuleModel->getModulesInfo();
|
||||
Context::set('installed_module_list', $installed_module_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 목록 출력
|
||||
**/
|
||||
function dispModuleList() {
|
||||
// 모듈 목록을 구해서
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('module_list');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<!--#include("header.html")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<table border="1">
|
||||
<tr>
|
||||
4
modules/module/tpl.admin/header.html
Normal file
4
modules/module/tpl.admin/header.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<div style="margin-bottom:20px;">
|
||||
<span <!--@if($act=='dispModuleList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispModuleList')}">{$lang->module_list}</a>]</span>
|
||||
<span <!--@if($act=='dispConfig')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispConfig')}">{$lang->module_config}</a>]</span>
|
||||
</div>
|
||||
|
|
@ -1,20 +1,41 @@
|
|||
<table>
|
||||
<!--#include("header.html")-->
|
||||
<table border="1" width="100%">
|
||||
<tr>
|
||||
<th>{$lang->no}</th>
|
||||
<th>{$lang->module_name}</th>
|
||||
<th>{$lang->module_version}</th>
|
||||
<th>{$lang->module_table_count}</th>
|
||||
<th>{$lang->module_installed_path}</th>
|
||||
<th>{$lang->author}</th>
|
||||
<td>{$lang->module_name}</td>
|
||||
<td>{$lang->version}</td>
|
||||
<td>{$lang->author}</td>
|
||||
<td>{$lang->date}</td>
|
||||
<td>{$lang->table_count}</td>
|
||||
<td>{$lang->installed_path}</td>
|
||||
</tr>
|
||||
<!--@foreach($installed_module_list as $no => $module_obj)-->
|
||||
<!--@foreach($module_list as $key => $val)-->
|
||||
<tr>
|
||||
<td>{$no+1}</td>
|
||||
<td>{$module_obj->title}</td>
|
||||
<td>{$module_obj->version}</td>
|
||||
<td>{$module_obj->created_table_count} / {$module_obj->table_count}</td>
|
||||
<td>{$module_obj->path}</td>
|
||||
<td><a href="mailto:{$module_obj->author->email_address}">{$module_obj->author->name}</a></td>
|
||||
<td rowspan="2">
|
||||
<!--@if($val->admin_index_act)-->
|
||||
<a href="#" onclick="location.href='{getUrl('mo',$val->module,'act',$val->admin_index_act)}'">{$val->title}</a> <br /> ({$val->module})
|
||||
<!--@else-->
|
||||
{$val->title} <br />
|
||||
({$val->module})
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td>{$val->version}</td>
|
||||
<td><a href="#" onclick="window.open('{$val->author->homepage}')">{$val->author->name}</a></td>
|
||||
<td>{$val->author->date}</td>
|
||||
<td>
|
||||
<!--@if($val->created_table_count != $val->table_count)-->
|
||||
<span style="color:red">
|
||||
<!--@else-->
|
||||
<span>
|
||||
<!--@end-->
|
||||
{$val->created_table_count}/{$val->table_count}
|
||||
</span>
|
||||
</td>
|
||||
<td>{$val->path}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
{nl2br($val->author->description)}
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue