mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
Author name update.
NHN developers@xpressengine.com http://xpressengine.com/ git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7676 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7d1fa86e5c
commit
8f385a592b
603 changed files with 67379 additions and 67522 deletions
|
|
@ -1,33 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="0.2">
|
||||
<title xml:lang="ko">첨부파일</title>
|
||||
<title xml:lang="zh-CN">附件管理</title>
|
||||
<title xml:lang="en">Attachment</title>
|
||||
<title xml:lang="vi">Đính kèm</title>
|
||||
<title xml:lang="es">Adjuntar archivos</title>
|
||||
<title xml:lang="jp">添付ファイル</title>
|
||||
<title xml:lang="ru">Вложения</title>
|
||||
<title xml:lang="zh-TW">附加檔案</title>
|
||||
<description xml:lang="ko">첨부 파일 관리하는 모듈입니다.</description>
|
||||
<description xml:lang="zh-CN">管理附件的模块。</description>
|
||||
<description xml:lang="en">Module for managing attachments.</description>
|
||||
<description xml:lang="vi">Module quản lý File đính kèm.</description>
|
||||
<description xml:lang="es">Módulo para manejar los archivos adjuntos.</description>
|
||||
<description xml:lang="jp">添付ファイルを管理するモジュールです。</description>
|
||||
<description xml:lang="ru">Модуль для управления вложениями.</description>
|
||||
<description xml:lang="zh-TW">管理附加檔案的模組。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
<category>content</category>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="vi">zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
</author>
|
||||
</module>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="0.2">
|
||||
<title xml:lang="ko">첨부파일</title>
|
||||
<title xml:lang="zh-CN">附件管理</title>
|
||||
<title xml:lang="en">Attachment</title>
|
||||
<title xml:lang="vi">Đính kèm</title>
|
||||
<title xml:lang="es">Adjuntar archivos</title>
|
||||
<title xml:lang="jp">添付ファイル</title>
|
||||
<title xml:lang="ru">Вложения</title>
|
||||
<title xml:lang="zh-TW">附加檔案</title>
|
||||
<description xml:lang="ko">첨부 파일 관리하는 모듈입니다.</description>
|
||||
<description xml:lang="zh-CN">管理附件的模块。</description>
|
||||
<description xml:lang="en">Module for managing attachments.</description>
|
||||
<description xml:lang="vi">Module quản lý File đính kèm.</description>
|
||||
<description xml:lang="es">Módulo para manejar los archivos adjuntos.</description>
|
||||
<description xml:lang="jp">添付ファイルを管理するモジュールです。</description>
|
||||
<description xml:lang="ru">Модуль для управления вложениями.</description>
|
||||
<description xml:lang="zh-TW">管理附加檔案的模組。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
<category>content</category>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NHN</name>
|
||||
<name xml:lang="vi">NHN</name>
|
||||
<name xml:lang="zh-CN">NHN</name>
|
||||
<name xml:lang="en">NHN</name>
|
||||
<name xml:lang="es">NHN</name>
|
||||
<name xml:lang="jp">NHN</name>
|
||||
<name xml:lang="ru">NHN</name>
|
||||
<name xml:lang="zh-TW">NHN</name>
|
||||
</author>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -1,127 +1,127 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileAdminController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief file 모듈의 admin controller 클래스
|
||||
**/
|
||||
|
||||
class fileAdminController extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 첨부파일 모두 삭제
|
||||
**/
|
||||
function deleteModuleFiles($module_srl) {
|
||||
// 전체 첨부파일 목록을 구함
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('file.getModuleFiles',$args);
|
||||
if(!$output) return $output;
|
||||
$files = $output->data;
|
||||
|
||||
// DB에서 삭제
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('file.deleteModuleFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 실제 파일 삭제 (일단 약속에 따라서 한번에 삭제)
|
||||
FileHandler::removeDir( sprintf("./files/attach/images/%s/", $module_srl) ) ;
|
||||
FileHandler::removeDir( sprintf("./files/attach/binaries/%s/", $module_srl) );
|
||||
|
||||
// DB에서 구한 파일 목록을 삭제
|
||||
$path = array();
|
||||
$cnt = count($files);
|
||||
for($i=0;$i<$cnt;$i++) {
|
||||
$uploaded_filename = $files[$i]->uploaded_filename;
|
||||
FileHandler::removeFile($uploaded_filename);
|
||||
|
||||
$path_info = pathinfo($uploaded_filename);
|
||||
if(!in_array($path_info['dirname'], $path)) $path[] = $path_info['dirname'];
|
||||
}
|
||||
|
||||
// 해당 글의 첨부파일 디렉토리 삭제
|
||||
for($i=0;$i<count($path);$i++) FileHandler::removeBlankDir($path[$i]);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 페이지에서 선택된 파일들을 삭제
|
||||
**/
|
||||
function procFileAdminDeleteChecked() {
|
||||
// 선택된 글이 없으면 오류 표시
|
||||
$cart = Context::get('cart');
|
||||
if(!$cart) return $this->stop('msg_cart_is_null');
|
||||
$file_srl_list= explode('|@|', $cart);
|
||||
$file_count = count($file_srl_list);
|
||||
if(!$file_count) return $this->stop('msg_cart_is_null');
|
||||
|
||||
$oFileController = &getController('file');
|
||||
|
||||
// 글삭제
|
||||
for($i=0;$i<$file_count;$i++) {
|
||||
$file_srl = trim($file_srl_list[$i]);
|
||||
if(!$file_srl) continue;
|
||||
|
||||
$oFileController->deleteFile($file_srl);
|
||||
}
|
||||
|
||||
$this->setMessage( sprintf(Context::getLang('msg_checked_file_is_deleted'), $file_count) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 파일 기본 정보의 추가
|
||||
**/
|
||||
function procFileAdminInsertConfig() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$config->allowed_filetypes = Context::get('allowed_filetypes');
|
||||
$config->allow_outlink = Context::get('allow_outlink');
|
||||
$config->allow_outlink_format = Context::get('allow_outlink_format');
|
||||
$config->allow_outlink_site = Context::get('allow_outlink_site');
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('file',$config);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈별 파일 기본 정보의 추가
|
||||
**/
|
||||
function procFileAdminInsertModuleConfig() {
|
||||
// 필요한 변수를 받아옴
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
|
||||
// 여러개의 모듈 일괄 설정일 경우
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$download_grant = trim(Context::get('download_grant'));
|
||||
|
||||
$file_config->allow_outlink = Context::get('allow_outlink');
|
||||
$file_config->allow_outlink_format = Context::get('allow_outlink_format');
|
||||
$file_config->allow_outlink_site = Context::get('allow_outlink_site');
|
||||
$file_config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$file_config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$file_config->allowed_filetypes = Context::get('allowed_filetypes');
|
||||
if($download_grant) $file_config->download_grant = explode('|@|',$download_grant);
|
||||
else $file_config->download_grant = array();
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++) {
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$oModuleController->insertModulePartConfig('file',$srl,$file_config);
|
||||
}
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class fileAdminController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief file 모듈의 admin controller 클래스
|
||||
**/
|
||||
|
||||
class fileAdminController extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 첨부파일 모두 삭제
|
||||
**/
|
||||
function deleteModuleFiles($module_srl) {
|
||||
// 전체 첨부파일 목록을 구함
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('file.getModuleFiles',$args);
|
||||
if(!$output) return $output;
|
||||
$files = $output->data;
|
||||
|
||||
// DB에서 삭제
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('file.deleteModuleFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 실제 파일 삭제 (일단 약속에 따라서 한번에 삭제)
|
||||
FileHandler::removeDir( sprintf("./files/attach/images/%s/", $module_srl) ) ;
|
||||
FileHandler::removeDir( sprintf("./files/attach/binaries/%s/", $module_srl) );
|
||||
|
||||
// DB에서 구한 파일 목록을 삭제
|
||||
$path = array();
|
||||
$cnt = count($files);
|
||||
for($i=0;$i<$cnt;$i++) {
|
||||
$uploaded_filename = $files[$i]->uploaded_filename;
|
||||
FileHandler::removeFile($uploaded_filename);
|
||||
|
||||
$path_info = pathinfo($uploaded_filename);
|
||||
if(!in_array($path_info['dirname'], $path)) $path[] = $path_info['dirname'];
|
||||
}
|
||||
|
||||
// 해당 글의 첨부파일 디렉토리 삭제
|
||||
for($i=0;$i<count($path);$i++) FileHandler::removeBlankDir($path[$i]);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 페이지에서 선택된 파일들을 삭제
|
||||
**/
|
||||
function procFileAdminDeleteChecked() {
|
||||
// 선택된 글이 없으면 오류 표시
|
||||
$cart = Context::get('cart');
|
||||
if(!$cart) return $this->stop('msg_cart_is_null');
|
||||
$file_srl_list= explode('|@|', $cart);
|
||||
$file_count = count($file_srl_list);
|
||||
if(!$file_count) return $this->stop('msg_cart_is_null');
|
||||
|
||||
$oFileController = &getController('file');
|
||||
|
||||
// 글삭제
|
||||
for($i=0;$i<$file_count;$i++) {
|
||||
$file_srl = trim($file_srl_list[$i]);
|
||||
if(!$file_srl) continue;
|
||||
|
||||
$oFileController->deleteFile($file_srl);
|
||||
}
|
||||
|
||||
$this->setMessage( sprintf(Context::getLang('msg_checked_file_is_deleted'), $file_count) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 파일 기본 정보의 추가
|
||||
**/
|
||||
function procFileAdminInsertConfig() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$config->allowed_filetypes = Context::get('allowed_filetypes');
|
||||
$config->allow_outlink = Context::get('allow_outlink');
|
||||
$config->allow_outlink_format = Context::get('allow_outlink_format');
|
||||
$config->allow_outlink_site = Context::get('allow_outlink_site');
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('file',$config);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈별 파일 기본 정보의 추가
|
||||
**/
|
||||
function procFileAdminInsertModuleConfig() {
|
||||
// 필요한 변수를 받아옴
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
|
||||
// 여러개의 모듈 일괄 설정일 경우
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$download_grant = trim(Context::get('download_grant'));
|
||||
|
||||
$file_config->allow_outlink = Context::get('allow_outlink');
|
||||
$file_config->allow_outlink_format = Context::get('allow_outlink_format');
|
||||
$file_config->allow_outlink_site = Context::get('allow_outlink_site');
|
||||
$file_config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$file_config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$file_config->allowed_filetypes = Context::get('allowed_filetypes');
|
||||
if($download_grant) $file_config->download_grant = explode('|@|',$download_grant);
|
||||
else $file_config->download_grant = array();
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++) {
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$oModuleController->insertModulePartConfig('file',$srl,$file_config);
|
||||
}
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,96 +1,96 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileAdminModel
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief file 모듈의 admin model 클래스
|
||||
**/
|
||||
|
||||
class fileAdminModel extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모든 첨부파일을 시간 역순으로 가져옴 (관리자용)
|
||||
**/
|
||||
function getFileList($obj) {
|
||||
// 검색 옵션 정리
|
||||
$search_target = $obj->search_target?$obj->search_target:trim(Context::get('search_target'));
|
||||
$search_keyword = $obj->search_keyword?$obj->search_keyword:trim(Context::get('search_keyword'));
|
||||
|
||||
if($search_target && $search_keyword) {
|
||||
switch($search_target) {
|
||||
case 'filename' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_filename = $search_keyword;
|
||||
break;
|
||||
case 'filesize_more' :
|
||||
$args->s_filesize_more = (int)$search_keyword;
|
||||
break;
|
||||
case 'filesize_mega_more' :
|
||||
$args->s_filesize_more = (int)$search_keyword * 1024 * 1024;
|
||||
break;
|
||||
case 'filesize_less' :
|
||||
$args->s_filesize_less = (int)$search_keyword;
|
||||
break;
|
||||
case 'filesize_mega_less' :
|
||||
$args->s_filesize_less = (int)$search_keyword * 1024 * 1024;
|
||||
break;
|
||||
case 'download_count' :
|
||||
$args->s_download_count = (int)$search_keyword;
|
||||
break;
|
||||
case 'regdate' :
|
||||
$args->s_regdate = $search_keyword;
|
||||
break;
|
||||
case 'ipaddress' :
|
||||
$args->s_ipaddress = $search_keyword;
|
||||
break;
|
||||
case 'user_id' :
|
||||
$args->s_user_id = $search_keyword;
|
||||
break;
|
||||
case 'user_name' :
|
||||
$args->s_user_name = $search_keyword;
|
||||
break;
|
||||
case 'nick_name' :
|
||||
$args->s_nick_name = $search_keyword;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 유효/대기 상태 설정
|
||||
if($obj->isvalid == 'Y') $args->isvalid = 'Y';
|
||||
elseif($obj->isvalid == 'N') $args->isvalid = 'N';
|
||||
|
||||
// 멀티미디어/ 일반 상태 설정
|
||||
if($obj->direct_download == 'Y') $args->direct_download = 'Y';
|
||||
elseif($obj->direct_download == 'N') $args->direct_download= 'N';
|
||||
|
||||
// 변수 설정
|
||||
$args->sort_index = $obj->sort_index;
|
||||
$args->page = $obj->page?$obj->page:1;
|
||||
$args->list_count = $obj->list_count?$obj->list_count:20;
|
||||
$args->page_count = $obj->page_count?$obj->page_count:10;
|
||||
$args->s_module_srl = $obj->module_srl;
|
||||
$args->exclude_module_srl = $obj->exclude_module_srl;
|
||||
|
||||
// file.getFileList쿼리 실행
|
||||
$output = executeQuery('file.getFileList', $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
foreach($output->data as $key => $file) {
|
||||
$file->download_url = $oFileModel->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$output->data[$key] = $file;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class fileAdminModel
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief file 모듈의 admin model 클래스
|
||||
**/
|
||||
|
||||
class fileAdminModel extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모든 첨부파일을 시간 역순으로 가져옴 (관리자용)
|
||||
**/
|
||||
function getFileList($obj) {
|
||||
// 검색 옵션 정리
|
||||
$search_target = $obj->search_target?$obj->search_target:trim(Context::get('search_target'));
|
||||
$search_keyword = $obj->search_keyword?$obj->search_keyword:trim(Context::get('search_keyword'));
|
||||
|
||||
if($search_target && $search_keyword) {
|
||||
switch($search_target) {
|
||||
case 'filename' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_filename = $search_keyword;
|
||||
break;
|
||||
case 'filesize_more' :
|
||||
$args->s_filesize_more = (int)$search_keyword;
|
||||
break;
|
||||
case 'filesize_mega_more' :
|
||||
$args->s_filesize_more = (int)$search_keyword * 1024 * 1024;
|
||||
break;
|
||||
case 'filesize_less' :
|
||||
$args->s_filesize_less = (int)$search_keyword;
|
||||
break;
|
||||
case 'filesize_mega_less' :
|
||||
$args->s_filesize_less = (int)$search_keyword * 1024 * 1024;
|
||||
break;
|
||||
case 'download_count' :
|
||||
$args->s_download_count = (int)$search_keyword;
|
||||
break;
|
||||
case 'regdate' :
|
||||
$args->s_regdate = $search_keyword;
|
||||
break;
|
||||
case 'ipaddress' :
|
||||
$args->s_ipaddress = $search_keyword;
|
||||
break;
|
||||
case 'user_id' :
|
||||
$args->s_user_id = $search_keyword;
|
||||
break;
|
||||
case 'user_name' :
|
||||
$args->s_user_name = $search_keyword;
|
||||
break;
|
||||
case 'nick_name' :
|
||||
$args->s_nick_name = $search_keyword;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 유효/대기 상태 설정
|
||||
if($obj->isvalid == 'Y') $args->isvalid = 'Y';
|
||||
elseif($obj->isvalid == 'N') $args->isvalid = 'N';
|
||||
|
||||
// 멀티미디어/ 일반 상태 설정
|
||||
if($obj->direct_download == 'Y') $args->direct_download = 'Y';
|
||||
elseif($obj->direct_download == 'N') $args->direct_download= 'N';
|
||||
|
||||
// 변수 설정
|
||||
$args->sort_index = $obj->sort_index;
|
||||
$args->page = $obj->page?$obj->page:1;
|
||||
$args->list_count = $obj->list_count?$obj->list_count:20;
|
||||
$args->page_count = $obj->page_count?$obj->page_count:10;
|
||||
$args->s_module_srl = $obj->module_srl;
|
||||
$args->exclude_module_srl = $obj->exclude_module_srl;
|
||||
|
||||
// file.getFileList쿼리 실행
|
||||
$output = executeQuery('file.getFileList', $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
foreach($output->data as $key => $file) {
|
||||
$file->download_url = $oFileModel->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$output->data[$key] = $file;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,187 +1,187 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileAdminView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief file 모듈의 admin view 클래스
|
||||
**/
|
||||
|
||||
class fileAdminView extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 목록 출력 (관리자용)
|
||||
**/
|
||||
function dispFileAdminList() {
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->page = Context::get('page'); ///< 페이지
|
||||
$args->list_count = 30; ///< 한페이지에 보여줄 글 수
|
||||
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
$args->sort_index = 'file_srl'; ///< 소팅 값
|
||||
$args->isvalid = Context::get('isvalid');
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
|
||||
// 목록 구함
|
||||
$oFileModel = &getAdminModel('file');
|
||||
$output = $oFileModel->getFileList($args);
|
||||
|
||||
// 목록의 loop를 돌면서 document를 구하기
|
||||
if($output->data) {
|
||||
$oCommentModel = &getModel('comment');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$file_list = array();
|
||||
$document_list = array();
|
||||
$comment_list = array();
|
||||
$module_list= array();
|
||||
|
||||
$doc_srls = array();
|
||||
$com_srls = array();
|
||||
$mod_srls= array();
|
||||
|
||||
foreach($output->data as $file) {
|
||||
$file_srl = $file->file_srl;
|
||||
$target_srl = $file->upload_target_srl;
|
||||
$file_update_args = null;
|
||||
$file_update_args->file_srl = $file_srl;
|
||||
|
||||
// upload_target_type이 없으면 찾아서 업데이트
|
||||
if(!$file->upload_target_type) {
|
||||
// 찾아둔게 있으면 패스
|
||||
if($document_list[$target_srl]) {
|
||||
$file->upload_target_type = 'doc';
|
||||
} else if($comment_list[$target_srl]) {
|
||||
$file->upload_target_type = 'com';
|
||||
} else if($module_list[$target_srl]) {
|
||||
$file->upload_target_type = 'mod';
|
||||
} else {
|
||||
// document
|
||||
$document = $oDocumentModel->getDocument($target_srl);
|
||||
if($document->isExists()) {
|
||||
$file->upload_target_type = 'doc';
|
||||
$file_update_args->upload_target_type = $file->upload_target_type;
|
||||
$document_list[$target_srl] = $document;
|
||||
}
|
||||
// comment
|
||||
if(!$file->upload_target_type) {
|
||||
$comment = $oCommentModel->getComment($target_srl);
|
||||
if($comment->isExists()) {
|
||||
$file->upload_target_type = 'com';
|
||||
$file->target_document_srl = $comment->document_srl;
|
||||
$file_update_args->upload_target_type = $file->upload_target_type;
|
||||
$comment_list[$target_srl] = $comment;
|
||||
$doc_srls[] = $comment->document_srl;
|
||||
}
|
||||
}
|
||||
// module (페이지인 경우)
|
||||
if(!$file->upload_target_type) {
|
||||
$module = $oModuleModel->getModulesInfo($target_srl);
|
||||
if($module) {
|
||||
$file->upload_target_type = 'mod';
|
||||
$file_update_args->upload_target_type = $file->upload_target_type;
|
||||
$module_list[$module->comment_srl] = $module;
|
||||
}
|
||||
}
|
||||
if($file_update_args->upload_target_type) {
|
||||
executeQuery('file.updateFileTargetType', $file_update_args);
|
||||
}
|
||||
}
|
||||
|
||||
// 이미 구해진 데이터가 있는 확인
|
||||
for($i = 0; $i < $com_srls_count; ++$i) {
|
||||
if($comment_list[$com_srls[$i]]) delete($com_srls[$i]);
|
||||
}
|
||||
for($i = 0; $i < $doc_srls_count; ++$i) {
|
||||
if($document_list[$doc_srls[$i]]) delete($doc_srls[$i]);
|
||||
}
|
||||
for($i = 0; $i < $mod_srls_count; ++$i) {
|
||||
if($module_list[$mod_srls[$i]]) delete($mod_srls[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
if($file->upload_target_type) {
|
||||
if(!in_array($file->upload_target_srl, ${$file->upload_target_type.'_srls'})) {
|
||||
${$file->upload_target_type.'_srls'}[] = $target_srl;
|
||||
}
|
||||
}
|
||||
|
||||
$file_list[$file_srl] = $file;
|
||||
$mod_srls[] = $file->module_srl;
|
||||
}
|
||||
|
||||
// 중복 제거
|
||||
$doc_srls = array_unique($doc_srls);
|
||||
$com_srls = array_unique($com_srls);
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
|
||||
// 댓글 목록
|
||||
$com_srls_count = count($com_srls);
|
||||
if($com_srls_count) {
|
||||
$comment_output = $oCommentModel->getComments($com_srls);
|
||||
foreach($comment_output as $comment) {
|
||||
$comment_list[$comment->comment_srl] = $comment;
|
||||
$doc_srls[] = $comment->document_srl;
|
||||
}
|
||||
}
|
||||
|
||||
// 문서 목록
|
||||
$doc_srls_count = count($doc_srls);
|
||||
if($doc_srls_count) {
|
||||
$document_output = $oDocumentModel->getDocuments($doc_srls);
|
||||
foreach($document_output as $document) {
|
||||
$document_list[$document->document_srl] = $document;
|
||||
}
|
||||
}
|
||||
|
||||
// 모듈 목록
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count) {
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls);
|
||||
if($module_output && is_array($module_output)){
|
||||
foreach($module_output as $module) {
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($file_list as $srl => $file) {
|
||||
if($file->upload_target_type == 'com') {
|
||||
$file_list[$srl]->target_document_srl = $comment_list[$file->upload_target_srl]->document_srl;
|
||||
}
|
||||
}
|
||||
}
|
||||
Context::set('file_list', $file_list);
|
||||
Context::set('document_list', $document_list);
|
||||
Context::set('comment_list', $comment_list);
|
||||
Context::set('module_list', $module_list);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$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');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class fileAdminView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief file 모듈의 admin view 클래스
|
||||
**/
|
||||
|
||||
class fileAdminView extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 목록 출력 (관리자용)
|
||||
**/
|
||||
function dispFileAdminList() {
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->page = Context::get('page'); ///< 페이지
|
||||
$args->list_count = 30; ///< 한페이지에 보여줄 글 수
|
||||
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
$args->sort_index = 'file_srl'; ///< 소팅 값
|
||||
$args->isvalid = Context::get('isvalid');
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
|
||||
// 목록 구함
|
||||
$oFileModel = &getAdminModel('file');
|
||||
$output = $oFileModel->getFileList($args);
|
||||
|
||||
// 목록의 loop를 돌면서 document를 구하기
|
||||
if($output->data) {
|
||||
$oCommentModel = &getModel('comment');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$file_list = array();
|
||||
$document_list = array();
|
||||
$comment_list = array();
|
||||
$module_list= array();
|
||||
|
||||
$doc_srls = array();
|
||||
$com_srls = array();
|
||||
$mod_srls= array();
|
||||
|
||||
foreach($output->data as $file) {
|
||||
$file_srl = $file->file_srl;
|
||||
$target_srl = $file->upload_target_srl;
|
||||
$file_update_args = null;
|
||||
$file_update_args->file_srl = $file_srl;
|
||||
|
||||
// upload_target_type이 없으면 찾아서 업데이트
|
||||
if(!$file->upload_target_type) {
|
||||
// 찾아둔게 있으면 패스
|
||||
if($document_list[$target_srl]) {
|
||||
$file->upload_target_type = 'doc';
|
||||
} else if($comment_list[$target_srl]) {
|
||||
$file->upload_target_type = 'com';
|
||||
} else if($module_list[$target_srl]) {
|
||||
$file->upload_target_type = 'mod';
|
||||
} else {
|
||||
// document
|
||||
$document = $oDocumentModel->getDocument($target_srl);
|
||||
if($document->isExists()) {
|
||||
$file->upload_target_type = 'doc';
|
||||
$file_update_args->upload_target_type = $file->upload_target_type;
|
||||
$document_list[$target_srl] = $document;
|
||||
}
|
||||
// comment
|
||||
if(!$file->upload_target_type) {
|
||||
$comment = $oCommentModel->getComment($target_srl);
|
||||
if($comment->isExists()) {
|
||||
$file->upload_target_type = 'com';
|
||||
$file->target_document_srl = $comment->document_srl;
|
||||
$file_update_args->upload_target_type = $file->upload_target_type;
|
||||
$comment_list[$target_srl] = $comment;
|
||||
$doc_srls[] = $comment->document_srl;
|
||||
}
|
||||
}
|
||||
// module (페이지인 경우)
|
||||
if(!$file->upload_target_type) {
|
||||
$module = $oModuleModel->getModulesInfo($target_srl);
|
||||
if($module) {
|
||||
$file->upload_target_type = 'mod';
|
||||
$file_update_args->upload_target_type = $file->upload_target_type;
|
||||
$module_list[$module->comment_srl] = $module;
|
||||
}
|
||||
}
|
||||
if($file_update_args->upload_target_type) {
|
||||
executeQuery('file.updateFileTargetType', $file_update_args);
|
||||
}
|
||||
}
|
||||
|
||||
// 이미 구해진 데이터가 있는 확인
|
||||
for($i = 0; $i < $com_srls_count; ++$i) {
|
||||
if($comment_list[$com_srls[$i]]) delete($com_srls[$i]);
|
||||
}
|
||||
for($i = 0; $i < $doc_srls_count; ++$i) {
|
||||
if($document_list[$doc_srls[$i]]) delete($doc_srls[$i]);
|
||||
}
|
||||
for($i = 0; $i < $mod_srls_count; ++$i) {
|
||||
if($module_list[$mod_srls[$i]]) delete($mod_srls[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
if($file->upload_target_type) {
|
||||
if(!in_array($file->upload_target_srl, ${$file->upload_target_type.'_srls'})) {
|
||||
${$file->upload_target_type.'_srls'}[] = $target_srl;
|
||||
}
|
||||
}
|
||||
|
||||
$file_list[$file_srl] = $file;
|
||||
$mod_srls[] = $file->module_srl;
|
||||
}
|
||||
|
||||
// 중복 제거
|
||||
$doc_srls = array_unique($doc_srls);
|
||||
$com_srls = array_unique($com_srls);
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
|
||||
// 댓글 목록
|
||||
$com_srls_count = count($com_srls);
|
||||
if($com_srls_count) {
|
||||
$comment_output = $oCommentModel->getComments($com_srls);
|
||||
foreach($comment_output as $comment) {
|
||||
$comment_list[$comment->comment_srl] = $comment;
|
||||
$doc_srls[] = $comment->document_srl;
|
||||
}
|
||||
}
|
||||
|
||||
// 문서 목록
|
||||
$doc_srls_count = count($doc_srls);
|
||||
if($doc_srls_count) {
|
||||
$document_output = $oDocumentModel->getDocuments($doc_srls);
|
||||
foreach($document_output as $document) {
|
||||
$document_list[$document->document_srl] = $document;
|
||||
}
|
||||
}
|
||||
|
||||
// 모듈 목록
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count) {
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls);
|
||||
if($module_output && is_array($module_output)){
|
||||
foreach($module_output as $module) {
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($file_list as $srl => $file) {
|
||||
if($file->upload_target_type == 'com') {
|
||||
$file_list[$srl]->target_document_srl = $comment_list[$file->upload_target_srl]->document_srl;
|
||||
}
|
||||
}
|
||||
}
|
||||
Context::set('file_list', $file_list);
|
||||
Context::set('document_list', $document_list);
|
||||
Context::set('comment_list', $comment_list);
|
||||
Context::set('module_list', $module_list);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$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');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,149 +1,149 @@
|
|||
<?php
|
||||
/**
|
||||
* @class file
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief file 모듈의 high 클래스
|
||||
**/
|
||||
|
||||
class file extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
// 첨부파일의 기본 설정 저장
|
||||
$config->allowed_filesize = '2';
|
||||
$config->allowed_attach_size = '2';
|
||||
$config->allowed_filetypes = '*.*';
|
||||
$oModuleController->insertModuleConfig('file', $config);
|
||||
|
||||
// file 모듈에서 사용할 디렉토리 생성
|
||||
FileHandler::makeDir('./files/attach/images');
|
||||
FileHandler::makeDir('./files/attach/binaries');
|
||||
|
||||
// 2007. 10. 17 글/댓글의 입력/수정/삭제에 대한 trigger 등록
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
||||
$oModuleController->insertTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
$oModuleController->insertTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
||||
$oModuleController->insertTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
||||
$oModuleController->insertTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
||||
$oModuleController->insertTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
||||
$oModuleController->insertTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after');
|
||||
|
||||
// 2009. 6. 9 자동저장문서 삭제시 첨부 파일도 같이 삭제
|
||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 첨부파일도 모두 삭제하는 트리거 추가
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
||||
|
||||
// 2007. 10. 19 출력하기 전에 file 권한등을 세팅하는 트리거 호출
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 2007. 10. 17 글/댓글의 입력/수정/삭제에 대한 trigger 등록
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after')) return true;
|
||||
|
||||
// 2009. 6. 9 자동저장문서 삭제시 첨부 파일도 같이 삭제
|
||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after')) return true;
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 첨부파일도 모두 삭제하는 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after')) return true;
|
||||
|
||||
// 2007. 10. 19 출력하기 전에 file 권한등을 세팅하는 트리거 호출
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before')) return true;
|
||||
|
||||
// 타겟 판별용 필드
|
||||
if(!$oDB->isColumnExists('files', 'upload_target_type')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
// 2007. 10. 17 글/댓글의 입력/수정/삭제에 대한 trigger 등록
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before'))
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after'))
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after'))
|
||||
$oModuleController->insertTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before'))
|
||||
$oModuleController->insertTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after'))
|
||||
$oModuleController->insertTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before'))
|
||||
$oModuleController->insertTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after'))
|
||||
$oModuleController->insertTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after'))
|
||||
$oModuleController->insertTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after');
|
||||
|
||||
// 2009. 6. 9 자동저장문서 삭제시 첨부 파일도 같이 삭제
|
||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after'))
|
||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 첨부파일도 모두 삭제하는 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after'))
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
||||
|
||||
// 2007. 10. 19 출력하기 전에 file 권한등을 세팅하는 트리거 호출
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before'))
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
||||
|
||||
// 타겟 판별용 필드
|
||||
if(!$oDB->isColumnExists('files', 'upload_target_type')) $oDB->addColumn('files', 'upload_target_type', 'char', '3');
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 재생성
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class file
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief file 모듈의 high 클래스
|
||||
**/
|
||||
|
||||
class file extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
// 첨부파일의 기본 설정 저장
|
||||
$config->allowed_filesize = '2';
|
||||
$config->allowed_attach_size = '2';
|
||||
$config->allowed_filetypes = '*.*';
|
||||
$oModuleController->insertModuleConfig('file', $config);
|
||||
|
||||
// file 모듈에서 사용할 디렉토리 생성
|
||||
FileHandler::makeDir('./files/attach/images');
|
||||
FileHandler::makeDir('./files/attach/binaries');
|
||||
|
||||
// 2007. 10. 17 글/댓글의 입력/수정/삭제에 대한 trigger 등록
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
||||
$oModuleController->insertTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
$oModuleController->insertTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
||||
$oModuleController->insertTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
||||
$oModuleController->insertTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
||||
$oModuleController->insertTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
||||
$oModuleController->insertTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after');
|
||||
|
||||
// 2009. 6. 9 자동저장문서 삭제시 첨부 파일도 같이 삭제
|
||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 첨부파일도 모두 삭제하는 트리거 추가
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
||||
|
||||
// 2007. 10. 19 출력하기 전에 file 권한등을 세팅하는 트리거 호출
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 2007. 10. 17 글/댓글의 입력/수정/삭제에 대한 trigger 등록
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after')) return true;
|
||||
|
||||
// 2009. 6. 9 자동저장문서 삭제시 첨부 파일도 같이 삭제
|
||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after')) return true;
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 첨부파일도 모두 삭제하는 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after')) return true;
|
||||
|
||||
// 2007. 10. 19 출력하기 전에 file 권한등을 세팅하는 트리거 호출
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before')) return true;
|
||||
|
||||
// 타겟 판별용 필드
|
||||
if(!$oDB->isColumnExists('files', 'upload_target_type')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
// 2007. 10. 17 글/댓글의 입력/수정/삭제에 대한 trigger 등록
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before'))
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after'))
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after'))
|
||||
$oModuleController->insertTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before'))
|
||||
$oModuleController->insertTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after'))
|
||||
$oModuleController->insertTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before'))
|
||||
$oModuleController->insertTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after'))
|
||||
$oModuleController->insertTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after'))
|
||||
$oModuleController->insertTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after');
|
||||
|
||||
// 2009. 6. 9 자동저장문서 삭제시 첨부 파일도 같이 삭제
|
||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after'))
|
||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 첨부파일도 모두 삭제하는 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after'))
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
||||
|
||||
// 2007. 10. 19 출력하기 전에 file 권한등을 세팅하는 트리거 호출
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before'))
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
||||
|
||||
// 타겟 판별용 필드
|
||||
if(!$oDB->isColumnExists('files', 'upload_target_type')) $oDB->addColumn('files', 'upload_target_type', 'char', '3');
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 재생성
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,213 +1,213 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileModel
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief file 모듈의 model 클래스
|
||||
**/
|
||||
|
||||
class fileModel extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 문서에 속한 첨부파일 목록을 return
|
||||
* 문서 생성/ 수정시 ajax로 특정 upload_target_srl에 대해서 파일 목록을 요청받을 때 사용됨.
|
||||
* upload_target_srl이 정해지지 않은 경우 서버측 session의 값으로 대체 시도
|
||||
**/
|
||||
function getFileList() {
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$mid = Context::get('mid');
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
$upload_target_srl = Context::get('upload_target_srl');
|
||||
if(!$upload_target_srl) $upload_target_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
||||
|
||||
if($upload_target_srl) {
|
||||
$tmp_files = $this->getFiles($upload_target_srl);
|
||||
$file_count = count($tmp_files);
|
||||
|
||||
for($i=0;$i<$file_count;$i++) {
|
||||
$file_info = $tmp_files[$i];
|
||||
if(!$file_info->file_srl) continue;
|
||||
|
||||
$obj = null;
|
||||
$obj->file_srl = $file_info->file_srl;
|
||||
$obj->source_filename = $file_info->source_filename;
|
||||
$obj->file_size = $file_info->file_size;
|
||||
$obj->disp_file_size = FileHandler::filesize($file_info->file_size);
|
||||
if($file_info->direct_download=='N') $obj->download_url = $this->getDownloadUrl($file_info->file_srl, $file_info->sid);
|
||||
else $obj->download_url = str_replace('./', '', $file_info->uploaded_filename);
|
||||
$obj->direct_download = $file_info->direct_download;
|
||||
$files[] = $obj;
|
||||
$attached_size += $file_info->file_size;
|
||||
}
|
||||
} else {
|
||||
$upload_target_srl = 0;
|
||||
$attached_size = 0;
|
||||
$files = array();
|
||||
}
|
||||
|
||||
// 업로드 상태 표시 작성
|
||||
$upload_status = $this->getUploadStatus($attached_size);
|
||||
|
||||
// 남은 용량 체크
|
||||
$config = $oModuleModel->getModuleInfoByMid($mid);
|
||||
$file_config = $this->getUploadConfig();
|
||||
$left_size = $file_config->allowed_attach_size*1024*1024 - $attached_size;
|
||||
|
||||
// 필요한 정보들 세팅
|
||||
$this->add("files",$files);
|
||||
$this->add("editor_sequence",$editor_sequence);
|
||||
$this->add("upload_target_srl",$upload_target_srl);
|
||||
$this->add("upload_status",$upload_status);
|
||||
$this->add("left_size",$left_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 문서에 속한 첨부파일의 개수를 return
|
||||
**/
|
||||
function getFilesCount($upload_target_srl) {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = executeQuery('file.getFilesCount', $args);
|
||||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 다운로드 경로를 구함
|
||||
**/
|
||||
function getDownloadUrl($file_srl, $sid) {
|
||||
return sprintf('?module=%s&act=%s&file_srl=%s&sid=%s', 'file', 'procFileDownload', $file_srl, $sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 파일 설정 정보를 구함
|
||||
**/
|
||||
function getFileConfig($module_srl = null) {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$file_module_config = $oModuleModel->getModuleConfig('file');
|
||||
|
||||
if($module_srl) $file_config = $oModuleModel->getModulePartConfig('file',$module_srl);
|
||||
if(!$file_config) $file_config = $file_module_config;
|
||||
|
||||
if($file_config) {
|
||||
$config->allowed_filesize = $file_config->allowed_filesize;
|
||||
$config->allowed_attach_size = $file_config->allowed_attach_size;
|
||||
$config->allowed_filetypes = $file_config->allowed_filetypes;
|
||||
$config->download_grant = $file_config->download_grant;
|
||||
$config->allow_outlink = $file_config->allow_outlink;
|
||||
$config->allow_outlink_site = $file_config->allow_outlink_site;
|
||||
$config->allow_outlink_format = $file_config->allow_outlink_format;
|
||||
}
|
||||
|
||||
// 전체 파일첨부 속성을 먼저 따른다
|
||||
if(!$config->allowed_filesize) $config->allowed_filesize = $file_module_config->allowed_filesize;
|
||||
if(!$config->allowed_attach_size) $config->allowed_attach_size = $file_module_config->allowed_attach_size;
|
||||
if(!$config->allowed_filetypes) $config->allowed_filetypes = $file_module_config->allowed_filetypes;
|
||||
if(!$config->allow_outlink) $config->allow_outlink = $file_module_config->allow_outlink;
|
||||
if(!$config->allow_outlink_site) $config->allow_outlink_site = $file_module_config->allow_outlink_site;
|
||||
if(!$config->allow_outlink_format) $config->allow_outlink_format = $file_module_config->allow_outlink_format;
|
||||
if(!$config->download_grant) $config->download_grant = $file_module_config->download_grant;
|
||||
|
||||
// 그래도 없으면 default로
|
||||
if(!$config->allowed_filesize) $config->allowed_filesize = '2';
|
||||
if(!$config->allowed_attach_size) $config->allowed_attach_size = '3';
|
||||
if(!$config->allowed_filetypes) $config->allowed_filetypes = '*.*';
|
||||
if(!$config->allow_outlink) $config->allow_outlink = 'Y';
|
||||
if(!$config->download_grant) $config->download_grant = array();
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 파일 정보를 구함
|
||||
**/
|
||||
function getFile($file_srl) {
|
||||
$args->file_srl = $file_srl;
|
||||
$output = executeQuery('file.getFile', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$file = $output->data;
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 문서에 속한 파일을 모두 return
|
||||
**/
|
||||
function getFiles($upload_target_srl) {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$args->sort_index = 'file_srl';
|
||||
$output = executeQuery('file.getFiles', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
$file_list = $output->data;
|
||||
|
||||
if($file_list && !is_array($file_list)) $file_list = array($file_list);
|
||||
|
||||
$file_count = count($file_list);
|
||||
for($i=0;$i<$file_count;$i++) {
|
||||
$file = $file_list[$i];
|
||||
$file->source_filename = stripslashes($file->source_filename);
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$file_list[$i] = $file;
|
||||
}
|
||||
|
||||
return $file_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 첨부파일에 대한 설정을 return (관리자/비관리자 자동 구분)
|
||||
**/
|
||||
function getUploadConfig() {
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') {
|
||||
$file_config->allowed_filesize = preg_replace("/[a-z]/is","",ini_get('upload_max_filesize'));
|
||||
$file_config->allowed_attach_size = preg_replace("/[a-z]/is","",ini_get('upload_max_filesize'));
|
||||
$file_config->allowed_filetypes = '*.*';
|
||||
} else {
|
||||
$module_srl = Context::get('module_srl');
|
||||
// module_srl이 없으면 현재 모듈
|
||||
if(!$module_srl) {
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$module_srl = $current_module_info->module_srl;
|
||||
}
|
||||
$file_config = $this->getFileConfig($module_srl);
|
||||
}
|
||||
return $file_config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 파일 업로드를 위한 관리자/비관리자에 따른 안내문구 return
|
||||
**/
|
||||
function getUploadStatus($attached_size = 0) {
|
||||
$file_config = $this->getUploadConfig();
|
||||
|
||||
// 업로드 상태 표시 작성
|
||||
$upload_status = sprintf(
|
||||
'%s : %s/ %s<br /> %s : %s (%s : %s)',
|
||||
Context::getLang('allowed_attach_size'),
|
||||
FileHandler::filesize($attached_size),
|
||||
FileHandler::filesize($file_config->allowed_attach_size*1024*1024),
|
||||
Context::getLang('allowed_filesize'),
|
||||
FileHandler::filesize($file_config->allowed_filesize*1024*1024),
|
||||
Context::getLang('allowed_filetypes'),
|
||||
$file_config->allowed_filetypes
|
||||
);
|
||||
return $upload_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 file 설정을 return
|
||||
**/
|
||||
function getFileModuleConfig($module_srl) {
|
||||
return $this->getFileConfig($module_srl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class fileModel
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief file 모듈의 model 클래스
|
||||
**/
|
||||
|
||||
class fileModel extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 문서에 속한 첨부파일 목록을 return
|
||||
* 문서 생성/ 수정시 ajax로 특정 upload_target_srl에 대해서 파일 목록을 요청받을 때 사용됨.
|
||||
* upload_target_srl이 정해지지 않은 경우 서버측 session의 값으로 대체 시도
|
||||
**/
|
||||
function getFileList() {
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$mid = Context::get('mid');
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
$upload_target_srl = Context::get('upload_target_srl');
|
||||
if(!$upload_target_srl) $upload_target_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
||||
|
||||
if($upload_target_srl) {
|
||||
$tmp_files = $this->getFiles($upload_target_srl);
|
||||
$file_count = count($tmp_files);
|
||||
|
||||
for($i=0;$i<$file_count;$i++) {
|
||||
$file_info = $tmp_files[$i];
|
||||
if(!$file_info->file_srl) continue;
|
||||
|
||||
$obj = null;
|
||||
$obj->file_srl = $file_info->file_srl;
|
||||
$obj->source_filename = $file_info->source_filename;
|
||||
$obj->file_size = $file_info->file_size;
|
||||
$obj->disp_file_size = FileHandler::filesize($file_info->file_size);
|
||||
if($file_info->direct_download=='N') $obj->download_url = $this->getDownloadUrl($file_info->file_srl, $file_info->sid);
|
||||
else $obj->download_url = str_replace('./', '', $file_info->uploaded_filename);
|
||||
$obj->direct_download = $file_info->direct_download;
|
||||
$files[] = $obj;
|
||||
$attached_size += $file_info->file_size;
|
||||
}
|
||||
} else {
|
||||
$upload_target_srl = 0;
|
||||
$attached_size = 0;
|
||||
$files = array();
|
||||
}
|
||||
|
||||
// 업로드 상태 표시 작성
|
||||
$upload_status = $this->getUploadStatus($attached_size);
|
||||
|
||||
// 남은 용량 체크
|
||||
$config = $oModuleModel->getModuleInfoByMid($mid);
|
||||
$file_config = $this->getUploadConfig();
|
||||
$left_size = $file_config->allowed_attach_size*1024*1024 - $attached_size;
|
||||
|
||||
// 필요한 정보들 세팅
|
||||
$this->add("files",$files);
|
||||
$this->add("editor_sequence",$editor_sequence);
|
||||
$this->add("upload_target_srl",$upload_target_srl);
|
||||
$this->add("upload_status",$upload_status);
|
||||
$this->add("left_size",$left_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 문서에 속한 첨부파일의 개수를 return
|
||||
**/
|
||||
function getFilesCount($upload_target_srl) {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = executeQuery('file.getFilesCount', $args);
|
||||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 다운로드 경로를 구함
|
||||
**/
|
||||
function getDownloadUrl($file_srl, $sid) {
|
||||
return sprintf('?module=%s&act=%s&file_srl=%s&sid=%s', 'file', 'procFileDownload', $file_srl, $sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 파일 설정 정보를 구함
|
||||
**/
|
||||
function getFileConfig($module_srl = null) {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$file_module_config = $oModuleModel->getModuleConfig('file');
|
||||
|
||||
if($module_srl) $file_config = $oModuleModel->getModulePartConfig('file',$module_srl);
|
||||
if(!$file_config) $file_config = $file_module_config;
|
||||
|
||||
if($file_config) {
|
||||
$config->allowed_filesize = $file_config->allowed_filesize;
|
||||
$config->allowed_attach_size = $file_config->allowed_attach_size;
|
||||
$config->allowed_filetypes = $file_config->allowed_filetypes;
|
||||
$config->download_grant = $file_config->download_grant;
|
||||
$config->allow_outlink = $file_config->allow_outlink;
|
||||
$config->allow_outlink_site = $file_config->allow_outlink_site;
|
||||
$config->allow_outlink_format = $file_config->allow_outlink_format;
|
||||
}
|
||||
|
||||
// 전체 파일첨부 속성을 먼저 따른다
|
||||
if(!$config->allowed_filesize) $config->allowed_filesize = $file_module_config->allowed_filesize;
|
||||
if(!$config->allowed_attach_size) $config->allowed_attach_size = $file_module_config->allowed_attach_size;
|
||||
if(!$config->allowed_filetypes) $config->allowed_filetypes = $file_module_config->allowed_filetypes;
|
||||
if(!$config->allow_outlink) $config->allow_outlink = $file_module_config->allow_outlink;
|
||||
if(!$config->allow_outlink_site) $config->allow_outlink_site = $file_module_config->allow_outlink_site;
|
||||
if(!$config->allow_outlink_format) $config->allow_outlink_format = $file_module_config->allow_outlink_format;
|
||||
if(!$config->download_grant) $config->download_grant = $file_module_config->download_grant;
|
||||
|
||||
// 그래도 없으면 default로
|
||||
if(!$config->allowed_filesize) $config->allowed_filesize = '2';
|
||||
if(!$config->allowed_attach_size) $config->allowed_attach_size = '3';
|
||||
if(!$config->allowed_filetypes) $config->allowed_filetypes = '*.*';
|
||||
if(!$config->allow_outlink) $config->allow_outlink = 'Y';
|
||||
if(!$config->download_grant) $config->download_grant = array();
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 파일 정보를 구함
|
||||
**/
|
||||
function getFile($file_srl) {
|
||||
$args->file_srl = $file_srl;
|
||||
$output = executeQuery('file.getFile', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$file = $output->data;
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 문서에 속한 파일을 모두 return
|
||||
**/
|
||||
function getFiles($upload_target_srl) {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$args->sort_index = 'file_srl';
|
||||
$output = executeQuery('file.getFiles', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
$file_list = $output->data;
|
||||
|
||||
if($file_list && !is_array($file_list)) $file_list = array($file_list);
|
||||
|
||||
$file_count = count($file_list);
|
||||
for($i=0;$i<$file_count;$i++) {
|
||||
$file = $file_list[$i];
|
||||
$file->source_filename = stripslashes($file->source_filename);
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$file_list[$i] = $file;
|
||||
}
|
||||
|
||||
return $file_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 첨부파일에 대한 설정을 return (관리자/비관리자 자동 구분)
|
||||
**/
|
||||
function getUploadConfig() {
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') {
|
||||
$file_config->allowed_filesize = preg_replace("/[a-z]/is","",ini_get('upload_max_filesize'));
|
||||
$file_config->allowed_attach_size = preg_replace("/[a-z]/is","",ini_get('upload_max_filesize'));
|
||||
$file_config->allowed_filetypes = '*.*';
|
||||
} else {
|
||||
$module_srl = Context::get('module_srl');
|
||||
// module_srl이 없으면 현재 모듈
|
||||
if(!$module_srl) {
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$module_srl = $current_module_info->module_srl;
|
||||
}
|
||||
$file_config = $this->getFileConfig($module_srl);
|
||||
}
|
||||
return $file_config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 파일 업로드를 위한 관리자/비관리자에 따른 안내문구 return
|
||||
**/
|
||||
function getUploadStatus($attached_size = 0) {
|
||||
$file_config = $this->getUploadConfig();
|
||||
|
||||
// 업로드 상태 표시 작성
|
||||
$upload_status = sprintf(
|
||||
'%s : %s/ %s<br /> %s : %s (%s : %s)',
|
||||
Context::getLang('allowed_attach_size'),
|
||||
FileHandler::filesize($attached_size),
|
||||
FileHandler::filesize($file_config->allowed_attach_size*1024*1024),
|
||||
Context::getLang('allowed_filesize'),
|
||||
FileHandler::filesize($file_config->allowed_filesize*1024*1024),
|
||||
Context::getLang('allowed_filetypes'),
|
||||
$file_config->allowed_filetypes
|
||||
);
|
||||
return $upload_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 file 설정을 return
|
||||
**/
|
||||
function getFileModuleConfig($module_srl) {
|
||||
return $this->getFileConfig($module_srl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,53 +1,53 @@
|
|||
<?php
|
||||
/**
|
||||
* @class fileView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief file module의 view class
|
||||
*
|
||||
*
|
||||
*
|
||||
**/
|
||||
|
||||
class fileView extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 서비스형 모듈의 추가 설정을 위한 부분
|
||||
* file의 사용 형태에 대한 설정만 받음
|
||||
**/
|
||||
function triggerDispFileAdditionSetup(&$obj) {
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
$current_module_srls = Context::get('module_srls');
|
||||
|
||||
if(!$current_module_srl && !$current_module_srls) {
|
||||
// 선택된 모듈의 정보를 가져옴
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
if(!$current_module_srl) return new Object();
|
||||
}
|
||||
|
||||
// 선택된 모듈의 file설정을 가져옴
|
||||
$oFileModel = &getModel('file');
|
||||
$file_config = $oFileModel->getFileModuleConfig($current_module_srl);
|
||||
Context::set('file_config', $file_config);
|
||||
|
||||
// 그룹의 설정을 위한 권한 가져오기
|
||||
$oMemberModel = &getModel('member');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$group_list = $oMemberModel->getGroups($site_module_info->site_srl);
|
||||
Context::set('group_list', $group_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'file_module_config');
|
||||
$obj .= $tpl;
|
||||
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @class fileView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief file module의 view class
|
||||
*
|
||||
*
|
||||
*
|
||||
**/
|
||||
|
||||
class fileView extends file {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 서비스형 모듈의 추가 설정을 위한 부분
|
||||
* file의 사용 형태에 대한 설정만 받음
|
||||
**/
|
||||
function triggerDispFileAdditionSetup(&$obj) {
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
$current_module_srls = Context::get('module_srls');
|
||||
|
||||
if(!$current_module_srl && !$current_module_srls) {
|
||||
// 선택된 모듈의 정보를 가져옴
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
if(!$current_module_srl) return new Object();
|
||||
}
|
||||
|
||||
// 선택된 모듈의 file설정을 가져옴
|
||||
$oFileModel = &getModel('file');
|
||||
$file_config = $oFileModel->getFileModuleConfig($current_module_srl);
|
||||
Context::set('file_config', $file_config);
|
||||
|
||||
// 그룹의 설정을 위한 권한 가져오기
|
||||
$oMemberModel = &getModel('member');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$group_list = $oMemberModel->getGroups($site_module_info->site_srl);
|
||||
Context::set('group_list', $group_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'file_module_config');
|
||||
$obj .= $tpl;
|
||||
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/file/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief Attachment module's basic language pack
|
||||
**/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
$lang->about_allow_outlink = 'You can shut external links according to referers. (except media files like *.wmv, *.mp3)';
|
||||
$lang->about_allow_outlink_format = 'These formats will always be allowed. Please use comma(,) for multiple input.<br />eg)hwp,doc,zip,pdf';
|
||||
$lang->about_allow_outlink_site = 'These websites will alyways be allowed. Please use new line for multiple input.<br />ex)http://www.zeroboard.com';
|
||||
$lang->about_allow_outlink_site = 'These websites will alyways be allowed. Please use new line for multiple input.<br />ex)http://xpressengine.com/';
|
||||
$lang->about_allowed_filesize = 'You can assign file size limit for each file. (Exclude administrators)';
|
||||
$lang->about_allowed_attach_size = 'You can assign file size limit for each document. (Exclude administrators)';
|
||||
$lang->about_allowed_filetypes = 'Only allowed extentsions can be attached. To allow an extension, use "*.[extention]". To allow multiple extensions, use ";" between each extension.<br />ex) *.* or *.jpg;*.gif;<br />(Exclude Administrators)';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @archivo modules/file/lang/es.lang.php
|
||||
* @autor zero <zero@nzeo.com>
|
||||
* @autor NHN (developers@xpressengine.com)
|
||||
* @sumario Paquete del idioma espaA±ol para los archivos adjuntos
|
||||
**/
|
||||
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
$lang->enable_download_group = 'Descargar permitió grupos';
|
||||
|
||||
$lang->about_allow_outlink = 'Enlaces externos a Rusia Ripper puede bloquear el archivo. (*. WMV, *. mp3, etc, excepto los archivos multimedia)';
|
||||
$lang->about_allow_outlink_site = 'Archivos, independientemente de la configuración para permitir a los enlaces externos es la dirección del sitio. Entrada múltiples gubunhaeju un cambio en la línea, por favor. <br /> Ej.) http://www.zeroboard.com';
|
||||
$lang->about_allow_outlink_site = 'Archivos, independientemente de la configuración para permitir a los enlaces externos es la dirección del sitio. Entrada múltiples gubunhaeju un cambio en la línea, por favor. <br /> Ej.) http://xpressengine.com/';
|
||||
$lang->about_allowed_filesize = 'Puede definir el límite del tamaño del archivo adjunto. (exceptuando el administrador)';
|
||||
$lang->about_allowed_attach_size = 'Puede definir el límite del tamaño total de los archivos adjuntos por documento. (exceptuando el administrador)';
|
||||
$lang->about_allowed_filetypes = 'Puede definir las extensiones de los archivos permitidos. Para permitir una extensión use "*.extensión". Para permitir más de una extensión use ";".<br />ej) *.* o *.jpg;*.gif;etc.<br />(exceptuando el administrador)';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/file/lang/fr.lang.php
|
||||
* @author zero <zero@nzeo.com> Traduit par Pierre Duvent <PierreDuvent@gmail.com>
|
||||
* @author NHN (developers@xpressengine.com) Traduit par Pierre Duvent <PierreDuvent@gmail.com>
|
||||
* @brief Paquet du langage en francais pour le module d\'Annexe
|
||||
**/
|
||||
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
$lang->enable_download_group = 'Groupe permis de telecharger';
|
||||
|
||||
$lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)';
|
||||
$lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.<br />ex)http://www.zeroboard.com';
|
||||
$lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.<br />ex)http://xpressengine.com/';
|
||||
$lang->about_allowed_filesize = 'Vous pouvez designer la limite de mesure pour chaque fichier. (Exclure administrateurs)';
|
||||
$lang->about_allowed_attach_size = 'Vous pouvez designer la limite de mesure pour chaque document. (Exclure administrateurs)';
|
||||
$lang->about_allowed_filetypes = 'Extensions consentis seulement peuvent etre attaches. Pour consentir une extension, utilisez "*.[extention]". Pour consentir plusieurs extensions, utilisez ";" entre chaque extension.<br />ex) *.* ou *.jpg;*.gif;<br />(Exclure Administrateurs)';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/file/lang/jp.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa、ミニミ
|
||||
* @author NHN (developers@xpressengine.com) 翻訳:RisaPapa、ミニミ
|
||||
* @brief 添付ファイル(file)モジュールの基本言語パッケージ
|
||||
**/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
$lang->about_allow_outlink = 'リファラーによって外部からのファイルリンクを制御出来ます。(*.wmv, *.mp3などのメディアファイルは除く)';
|
||||
$lang->about_allow_outlink_format = '外部からのファイルリンク設定に構わず、常に外部からのリンクを許可する拡張子です。複数登録時には、「半角コンマ(,)」区切りで記入して下さい。<br />eg)txt,doc,zip,pdf';
|
||||
$lang->about_allow_outlink_site = '外部からのファイルリンク設定に構わず、常に外部からのリンクを許可するURLです。複数登録時には、改行で記入して下さい。<br />ex)http://www.zeroboard.com';
|
||||
$lang->about_allow_outlink_site = '外部からのファイルリンク設定に構わず、常に外部からのリンクを許可するURLです。複数登録時には、改行で記入して下さい。<br />ex)http://xpressengine.com/';
|
||||
$lang->about_allowed_filesize = '一つのファイルに対して、アップロード出来るファイルの最大サイズを指定します(管理者除外)。';
|
||||
$lang->about_allowed_attach_size = '一つの書き込みに対して、管理者以外のユーザーが添付出来る最大サイズを指定します。';
|
||||
$lang->about_allowed_filetypes = 'ここで指定された種類のファイルのみ添付出来ます。"*.拡張子"で指定し、 ";"で区切って任意の拡張子を追加して指定出来ます。 (管理者は制限無し)<br />ex) *.* or *.jpg;*.gif;<br />';
|
||||
|
|
|
|||
|
|
@ -1,57 +1,57 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/file/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 첨부 파일(file) 모듈의 기본 언어팩
|
||||
**/
|
||||
|
||||
$lang->file = '첨부 파일';
|
||||
$lang->file_name = '파일 이름';
|
||||
$lang->file_size = '파일 크기';
|
||||
$lang->download_count = '다운로드 받은 수';
|
||||
$lang->status = '상태';
|
||||
$lang->is_valid = '유효';
|
||||
$lang->is_stand_by = '대기';
|
||||
$lang->file_list = '첨부 파일 목록';
|
||||
$lang->allow_outlink = '파일 외부 링크';
|
||||
$lang->allow_outlink_site = '파일 외부 링크 허용 사이트';
|
||||
$lang->allow_outlink_format = '파일 외부 링크 허용 확장자';
|
||||
$lang->allowed_filesize = '파일 제한 크기';
|
||||
$lang->allowed_attach_size = '문서 첨부 제한';
|
||||
$lang->allowed_filetypes = '허용 확장자';
|
||||
$lang->enable_download_group = '다운로드 가능 그룹';
|
||||
|
||||
$lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다. (*.wmv, *.mp3등 미디어 파일 제외)';
|
||||
$lang->about_allow_outlink_format = '파일 외부 링크 설정에 상관없이 허용하는 파일 확장자입니다. 여러 개 입력 시에 쉼표(,)을 이용해서 구분해주세요.<br />예)hwp,doc,zip,pdf';
|
||||
$lang->about_allow_outlink_site = '파일 외부 링크 설정에 상관없이 허용하는 사이트 주소입니다. 여러 개 입력 시에 줄을 바꿔서 구분해주세요.<br />예)http://www.xpressengine.com';
|
||||
$lang->about_allowed_filesize = '하나의 파일에 대해 최고 용량을 지정할 수 있습니다. (관리자는 제외)';
|
||||
$lang->about_allowed_attach_size = '하나의 문서에 첨부할 수 있는 최고 용량을 지정할 수 있습니다. (관리자는 제외)';
|
||||
$lang->about_allowed_filetypes = '허용한 확장자만 첨부할 수 있습니다. "*.확장자"로 지정할 수 있고 ";" 으로 여러 개 지정이 가능합니다.<br />예) *.* or *.jpg;*.gif;<br />(관리자는 제외)';
|
||||
|
||||
$lang->cmd_delete_checked_file = '선택항목 삭제';
|
||||
$lang->cmd_move_to_document = '문서로 이동';
|
||||
$lang->cmd_download = '다운로드';
|
||||
|
||||
$lang->msg_not_permitted_download = '다운로드 할 수 있는 권한이 없습니다.';
|
||||
$lang->msg_cart_is_null = '삭제할 파일을 선택해주세요.';
|
||||
$lang->msg_checked_file_is_deleted = '%d개의 첨부 파일이 삭제되었습니다.';
|
||||
$lang->msg_exceeds_limit_size = '허용된 용량을 초과하여 첨부가 되지 않았습니다.';
|
||||
$lang->msg_file_not_found = '요청하신 파일을 찾을 수 없습니다.';
|
||||
|
||||
$lang->file_search_target_list = array(
|
||||
'filename' => '파일 이름',
|
||||
'filesize_more' => '파일 크기 (byte, 이상)',
|
||||
'filesize_mega_more' => '파일 크기 (MB, 이상)',
|
||||
'filesize_less' => '파일 크기 (byte, 이하)',
|
||||
'filesize_mega_less' => '파일 크기 (MB, 이하)',
|
||||
'download_count' => '다운로드 횟수 (이상)',
|
||||
'user_id' => '아이디',
|
||||
'user_name' => '이름',
|
||||
'nick_name' => '닉네임',
|
||||
'regdate' => '등록일',
|
||||
'ipaddress' => 'IP 주소',
|
||||
);
|
||||
$lang->msg_not_allowed_outlink = '외부링크에서 다운로드 할 수 없습니다.';
|
||||
$lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.';
|
||||
$lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/file/lang/ko.lang.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 첨부 파일(file) 모듈의 기본 언어팩
|
||||
**/
|
||||
|
||||
$lang->file = '첨부 파일';
|
||||
$lang->file_name = '파일 이름';
|
||||
$lang->file_size = '파일 크기';
|
||||
$lang->download_count = '다운로드 받은 수';
|
||||
$lang->status = '상태';
|
||||
$lang->is_valid = '유효';
|
||||
$lang->is_stand_by = '대기';
|
||||
$lang->file_list = '첨부 파일 목록';
|
||||
$lang->allow_outlink = '파일 외부 링크';
|
||||
$lang->allow_outlink_site = '파일 외부 링크 허용 사이트';
|
||||
$lang->allow_outlink_format = '파일 외부 링크 허용 확장자';
|
||||
$lang->allowed_filesize = '파일 제한 크기';
|
||||
$lang->allowed_attach_size = '문서 첨부 제한';
|
||||
$lang->allowed_filetypes = '허용 확장자';
|
||||
$lang->enable_download_group = '다운로드 가능 그룹';
|
||||
|
||||
$lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다. (*.wmv, *.mp3등 미디어 파일 제외)';
|
||||
$lang->about_allow_outlink_format = '파일 외부 링크 설정에 상관없이 허용하는 파일 확장자입니다. 여러 개 입력 시에 쉼표(,)을 이용해서 구분해주세요.<br />예)hwp,doc,zip,pdf';
|
||||
$lang->about_allow_outlink_site = '파일 외부 링크 설정에 상관없이 허용하는 사이트 주소입니다. 여러 개 입력 시에 줄을 바꿔서 구분해주세요.<br />예)http://www.xpressengine.com';
|
||||
$lang->about_allowed_filesize = '하나의 파일에 대해 최고 용량을 지정할 수 있습니다. (관리자는 제외)';
|
||||
$lang->about_allowed_attach_size = '하나의 문서에 첨부할 수 있는 최고 용량을 지정할 수 있습니다. (관리자는 제외)';
|
||||
$lang->about_allowed_filetypes = '허용한 확장자만 첨부할 수 있습니다. "*.확장자"로 지정할 수 있고 ";" 으로 여러 개 지정이 가능합니다.<br />예) *.* or *.jpg;*.gif;<br />(관리자는 제외)';
|
||||
|
||||
$lang->cmd_delete_checked_file = '선택항목 삭제';
|
||||
$lang->cmd_move_to_document = '문서로 이동';
|
||||
$lang->cmd_download = '다운로드';
|
||||
|
||||
$lang->msg_not_permitted_download = '다운로드 할 수 있는 권한이 없습니다.';
|
||||
$lang->msg_cart_is_null = '삭제할 파일을 선택해주세요.';
|
||||
$lang->msg_checked_file_is_deleted = '%d개의 첨부 파일이 삭제되었습니다.';
|
||||
$lang->msg_exceeds_limit_size = '허용된 용량을 초과하여 첨부가 되지 않았습니다.';
|
||||
$lang->msg_file_not_found = '요청하신 파일을 찾을 수 없습니다.';
|
||||
|
||||
$lang->file_search_target_list = array(
|
||||
'filename' => '파일 이름',
|
||||
'filesize_more' => '파일 크기 (byte, 이상)',
|
||||
'filesize_mega_more' => '파일 크기 (MB, 이상)',
|
||||
'filesize_less' => '파일 크기 (byte, 이하)',
|
||||
'filesize_mega_less' => '파일 크기 (MB, 이하)',
|
||||
'download_count' => '다운로드 횟수 (이상)',
|
||||
'user_id' => '아이디',
|
||||
'user_name' => '이름',
|
||||
'nick_name' => '닉네임',
|
||||
'regdate' => '등록일',
|
||||
'ipaddress' => 'IP 주소',
|
||||
);
|
||||
$lang->msg_not_allowed_outlink = '외부링크에서 다운로드 할 수 없습니다.';
|
||||
$lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.';
|
||||
$lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file ru.lang.php
|
||||
* @author zero <zero@nzeo.com> | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @author NHN (developers@xpressengine.com) | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467;
|
||||
* @brief Russian basic language pack
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
||||
░░ * @File : common/lang/vi.lang.php ░░
|
||||
░░ * @Author : zero (zero@nzeo.com) ░░
|
||||
░░ * @Author : NHN (developers@xpressengine.com) ░░
|
||||
░░ * @Trans : DucDuy Dao (webmaster@xpressengine.vn) ░░
|
||||
░░ * @Website: http://xpressengine.vn ░░
|
||||
░░ * @Brief : Vietnamese Language Pack (Only basic words are included here) ░░
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
$lang->about_allow_outlink = 'Những định dạng Link File từ bên ngoài được phép đính kèm.(Ngoại trừ định dạng Media *.wmv, *.mp3)';
|
||||
$lang->about_allow_outlink_format = 'Những định dạng này sẽ được phép liên kết. Hãy sử dụng dấu (,) để thêm nhiều định dạng .<br />Ví dụ: .hwp, .doc, .zip, .pdf';
|
||||
$lang->about_allow_outlink_site = 'Những Website được phép liên kết. Hãy nhập địa chỉ của những Website được phép.<br />Ví dụ: http://www.zeroboard.com';
|
||||
$lang->about_allow_outlink_site = 'Những Website được phép liên kết. Hãy nhập địa chỉ của những Website được phép.<br />Ví dụ: http://xpressengine.com/';
|
||||
$lang->about_allowed_filesize = 'Giới hạn dung lượng mỗi File đính kèm. (Ngoại trừ Administrators)';
|
||||
$lang->about_allowed_attach_size = 'Giới hạn dung lượng tối đa cho tất cả các File đính kèm trong một bài viết. (Ngoại trừ Administrators)';
|
||||
$lang->about_allowed_filetypes = 'Chỉ được phép đính kèm những File có đuôi được liệt kê trong danh sách.<br />Để thêm những dạng File được phép đính kèm, bạn sử dụng "*.[đuôi]".<br />Để cho phép nhiều dạng đuôi File hãy đặt dấu ";" vào giữa các dạng đuôi.<br />Ví dụ: *.* (Cho phép tất cả) hay *.jpg;*.gif;<br />(Ngoại trừ Administrators)';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/file/lang/zh-CN.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 附件(file) 模块语言包
|
||||
**/
|
||||
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
$lang->enable_download_group = '允许下载的用户组';
|
||||
|
||||
$lang->about_allow_outlink = '根据反向链接防止盗链。(*.wmv, *.mp3等媒体文件除外)';
|
||||
$lang->about_allow_outlink_site = '可以设置允许外链的站点。多个站点以换行来区分,即一行一个。<br />ex)http://www.zeroboard.com';
|
||||
$lang->about_allow_outlink_site = '可以设置允许外链的站点。多个站点以换行来区分,即一行一个。<br />ex)http://xpressengine.com/';
|
||||
$lang->about_allowed_filesize = '最大单个上传文件大小(管理员不受此限制)。';
|
||||
$lang->about_allowed_attach_size = '每个主题最大上传文件大小(管理员不受此限制)。';
|
||||
$lang->about_allowed_filetypes = '只允许上传指定的扩展名。 可以用"*.扩展名"来指定或用 ";"来 区分多个扩展名<br />例) *.* or *.jpg;*.gif;<br />(管理员不受此限制)';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/file/lang/zh-TW.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻譯:royallin
|
||||
* @author NHN (developers@xpressengine.com) 翻譯:royallin
|
||||
* @brief 附加檔案(file)模組正體中文語言
|
||||
**/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
$lang->about_allow_outlink = '是否允許連結外部檔案。(*.wmv, *.mp3等影音檔案除外)';
|
||||
$lang->about_allow_outlink_format = '設定允許外部連結的檔案格式。可以用逗號(,)來區隔多個副檔名。<br />例) hwp, doc, zip, pdf';
|
||||
$lang->about_allow_outlink_site = '可設置允許外部檔案連結的網站名單。當數量太多時,可換行輸入。<br />例) http://www.zeroboard.com';
|
||||
$lang->about_allow_outlink_site = '可設置允許外部檔案連結的網站名單。當數量太多時,可換行輸入。<br />例) http://xpressengine.com/';
|
||||
$lang->about_allowed_filesize = '最大單一上傳檔案大小 (管理員不受此限制)。';
|
||||
$lang->about_allowed_attach_size = '每個主題最大上傳檔案大小 (管理員不受此限制)。';
|
||||
$lang->about_allowed_filetypes = '設定允許上傳的檔案類型。可以用"*.副檔名"來指定或用分號";"來區隔多個副檔名。<br />例) *.* or *.jpg; *.gif;<br />(管理員不受此限制)';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue