mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 06:39:56 +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
|
|
@ -3,10 +3,12 @@
|
|||
<grants />
|
||||
<actions>
|
||||
<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="procFileDelete" type="controller" standalone="true" />
|
||||
<action name="procFileDownload" type="controller" standalone="true" />
|
||||
<action name="procFileAdminDeleteChecked" type="controller" standalone="true" />
|
||||
<action name="procFileAdminInsertConfig" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@
|
|||
$oModuleController->insertActionForward('file', 'controller', 'procFileDelete');
|
||||
$oModuleController->insertActionForward('file', 'controller', 'procFileDownload');
|
||||
//$oModuleController->insertActionForward('file', 'controller', 'procFileAdminDeleteChecked');
|
||||
|
||||
// 첨부파일의 기본 설정 저장
|
||||
$config->allowed_filesize = '2';
|
||||
$config->allowed_filetypes = '*.*';
|
||||
$oModuleController->insertModuleConfig('file', $config);
|
||||
|
||||
// file 모듈에서 사용할 디렉토리 생성
|
||||
FileHandler::makeDir('./files/attach/images');
|
||||
|
|
|
|||
|
|
@ -324,5 +324,18 @@
|
|||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 파일 정보를 구함
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -60,5 +60,18 @@
|
|||
$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->is_valid = '유효';
|
||||
$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_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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue