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@1133 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6e8eabb9f6
commit
a0074e8311
13 changed files with 99 additions and 4 deletions
|
|
@ -448,7 +448,6 @@
|
||||||
$this->setTemplateFile('board_config');
|
$this->setTemplateFile('board_config');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 선택된 게시판의 정보 출력
|
* @brief 선택된 게시판의 정보 출력
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,12 @@
|
||||||
Context::set('component_list', $component_list);
|
Context::set('component_list', $component_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 첨부파일 모듈의 정보를 구함
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$file_config = $oModuleModel->getModuleConfig('file');
|
||||||
|
$file_config->allowed_filesize = $file_config->allowed_filesize * 1024;
|
||||||
|
Context::set('file_config',$file_config);
|
||||||
|
|
||||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||||
$tpl_path = $this->module_path.'tpl';
|
$tpl_path = $this->module_path.'tpl';
|
||||||
$tpl_file = 'editor.html';
|
$tpl_file = 'editor.html';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<!--%import("js/editor.js")-->
|
<!--%import("js/editor.js")-->
|
||||||
<!--%import("css/editor.css")-->
|
<!--%import("css/editor.css")-->
|
||||||
<!--%import("./lang")-->
|
<!--%import("./lang")-->
|
||||||
|
|
||||||
<!-- 에디터 활성화 -->
|
<!-- 에디터 활성화 -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var editor_path = "{$editor_path}";
|
var editor_path = "{$editor_path}";
|
||||||
|
|
@ -98,7 +97,7 @@
|
||||||
<!--%import("./js/SWFUpload.js")-->
|
<!--%import("./js/SWFUpload.js")-->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var zbxe_session_name = "{session_name()}";
|
var zbxe_session_name = "{session_name()}";
|
||||||
var uploader_setting = { "allowed_filesize" : 30720, "allowed_filetypes" : "*.*", "allowed_filetypes_description" : "All files..." }
|
var uploader_setting = { "allowed_filesize" : {$file_config->allowed_filesize}, "allowed_filetypes" : "{$file_config->allowed_filetypes}", "allowed_filetypes_description" : "All files..." }
|
||||||
editor_upload_init("{$upload_target_srl}");
|
editor_upload_init("{$upload_target_srl}");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@
|
||||||
<grants />
|
<grants />
|
||||||
<actions>
|
<actions>
|
||||||
<action name="dispFileAdminList" type="view" admin_index="true" standalone="true" />
|
<action name="dispFileAdminList" type="view" admin_index="true" standalone="true" />
|
||||||
|
<action name="dispFileAdminConfig" type="view" standalone="true" />
|
||||||
|
|
||||||
<action name="procFileUpload" type="controller" standalone="true" />
|
<action name="procFileUpload" type="controller" standalone="true" />
|
||||||
<action name="procFileDelete" type="controller" standalone="true" />
|
<action name="procFileDelete" type="controller" standalone="true" />
|
||||||
<action name="procFileDownload" type="controller" standalone="true" />
|
<action name="procFileDownload" type="controller" standalone="true" />
|
||||||
<action name="procFileAdminDeleteChecked" type="controller" standalone="true" />
|
<action name="procFileAdminDeleteChecked" type="controller" standalone="true" />
|
||||||
|
<action name="procFileAdminInsertConfig" type="controller" standalone="true" />
|
||||||
</actions>
|
</actions>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,11 @@
|
||||||
$oModuleController->insertActionForward('file', 'controller', 'procFileDelete');
|
$oModuleController->insertActionForward('file', 'controller', 'procFileDelete');
|
||||||
$oModuleController->insertActionForward('file', 'controller', 'procFileDownload');
|
$oModuleController->insertActionForward('file', 'controller', 'procFileDownload');
|
||||||
//$oModuleController->insertActionForward('file', 'controller', 'procFileAdminDeleteChecked');
|
//$oModuleController->insertActionForward('file', 'controller', 'procFileAdminDeleteChecked');
|
||||||
|
|
||||||
|
// 첨부파일의 기본 설정 저장
|
||||||
|
$config->allowed_filesize = '2';
|
||||||
|
$config->allowed_filetypes = '*.*';
|
||||||
|
$oModuleController->insertModuleConfig('file', $config);
|
||||||
|
|
||||||
// file 모듈에서 사용할 디렉토리 생성
|
// file 모듈에서 사용할 디렉토리 생성
|
||||||
FileHandler::makeDir('./files/attach/images');
|
FileHandler::makeDir('./files/attach/images');
|
||||||
|
|
|
||||||
|
|
@ -324,5 +324,18 @@
|
||||||
fpassthru($fp);
|
fpassthru($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 파일 기본 정보의 추가
|
||||||
|
**/
|
||||||
|
function procFileAdminInsertConfig() {
|
||||||
|
// 기본 정보를 받음
|
||||||
|
$args = Context::gets('allowed_filesize','allowed_filetypes');
|
||||||
|
|
||||||
|
// module Controller 객체 생성하여 입력
|
||||||
|
$oModuleController = &getController('module');
|
||||||
|
$output = $oModuleController->insertModuleConfig('file',$args);
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,19 @@
|
||||||
return "./?module=file&act=procFileDownload&file_srl=".$file_srl."&sid=".$sid;
|
return "./?module=file&act=procFileDownload&file_srl=".$file_srl."&sid=".$sid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 파일 설정 정보를 구함
|
||||||
|
**/
|
||||||
|
function getFileConfig() {
|
||||||
|
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$config = $oModuleModel->getModuleConfig('file');
|
||||||
|
|
||||||
|
if(!$config->allowed_filesize) $config->allowed_filesize = '2';
|
||||||
|
if(!$config->allowed_filetypes) $config->allowed_filetypes = '*.*';
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 파일 정보를 구함
|
* @brief 파일 정보를 구함
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -60,5 +60,18 @@
|
||||||
$this->setTemplateFile('file_list');
|
$this->setTemplateFile('file_list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 첨부파일 정보 설정 (관리자용)
|
||||||
|
**/
|
||||||
|
function dispFileAdminConfig() {
|
||||||
|
$oFileModel = &getModel('file');
|
||||||
|
$config = $oFileModel->getFileConfig();
|
||||||
|
Context::set('config',$config);
|
||||||
|
|
||||||
|
// 템플릿 파일 지정
|
||||||
|
$this->setTemplatePath($this->module_path.'tpl');
|
||||||
|
$this->setTemplateFile('file_config');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,12 @@
|
||||||
$lang->status = '상태';
|
$lang->status = '상태';
|
||||||
$lang->is_valid = '유효';
|
$lang->is_valid = '유효';
|
||||||
$lang->is_stand_by = '대기';
|
$lang->is_stand_by = '대기';
|
||||||
|
$lang->file_list = '첨부 파일 목록';
|
||||||
|
$lang->allowed_filesize = '허용 첨부 용량';
|
||||||
|
$lang->allowed_filetypes = '허용 첨부 파일 확장자';
|
||||||
|
|
||||||
|
$lang->about_allowed_filesize = '관리자를 제외한 사용자는 정하신 용량만 첨부할 수 있습니다';
|
||||||
|
$lang->about_allowed_filetypes = '관리자를 제외한 사용자는 정하신 확장자만 첨부할 수 있습니다.<br />( *.jpg;*.gif; 와 같이 정하시면 됩니다)';
|
||||||
|
|
||||||
$lang->cmd_delete_checked_file = '선택항목 삭제';
|
$lang->cmd_delete_checked_file = '선택항목 삭제';
|
||||||
$lang->cmd_move_to_document = '문서로 이동';
|
$lang->cmd_move_to_document = '문서로 이동';
|
||||||
|
|
|
||||||
26
modules/file/tpl/file_config.html
Normal file
26
modules/file/tpl/file_config.html
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<!--#include("header.html")-->
|
||||||
|
<!--%import("filter/insert_config.xml")-->
|
||||||
|
|
||||||
|
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||||
|
<table border="1">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2">{$lang->allowed_filesize}</th>
|
||||||
|
<td><input type="text" name="allowed_filesize" value="{$config->allowed_filesize}" />MB</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{$lang->about_allowed_filesize}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2">{$lang->allowed_filetypes}</th>
|
||||||
|
<td><input type="text" name="allowed_filetypes" value="{$config->allowed_filetypes}" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{$lang->about_allowed_filetypes}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<input type="submit" value="{$lang->cmd_registration}" accesskey="s" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
7
modules/file/tpl/filter/insert_config.xml
Normal file
7
modules/file/tpl/filter/insert_config.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<filter name="insert_config" module="file" act="procFileAdminInsertConfig" confirm_msg_code="confirm_submit">
|
||||||
|
<form />
|
||||||
|
<response>
|
||||||
|
<tag name="error" />
|
||||||
|
<tag name="message" />
|
||||||
|
</response>
|
||||||
|
</filter>
|
||||||
6
modules/file/tpl/header.html
Normal file
6
modules/file/tpl/header.html
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<!--%import("js/board_admin.js")-->
|
||||||
|
|
||||||
|
<div style="margin-bottom:20px;">
|
||||||
|
<span <!--@if($act=='dispFileAdminList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispFileAdminList')}">{$lang->file_list}</a>]</span>
|
||||||
|
<span <!--@if($act=='dispFileAdminConfig')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispFileAdminConfig')}">{$lang->cmd_module_config}</a>]</span>
|
||||||
|
</div>
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2">
|
<td rowspan="2">
|
||||||
<!--@if($val->admin_index_act)-->
|
<!--@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})
|
<a href="#" onclick="location.href='{getUrl('act',$val->admin_index_act)}'">{$val->title}</a> <br /> ({$val->module})
|
||||||
<!--@else-->
|
<!--@else-->
|
||||||
{$val->title} <br />
|
{$val->title} <br />
|
||||||
({$val->module})
|
({$val->module})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue