mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 07:12:15 +09:00
merge from 1.7.3.5(r13153:r13167)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc47d2b247
commit
2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions
|
|
@ -9,9 +9,9 @@
|
|||
<title xml:lang="ru">Вложения</title>
|
||||
<title xml:lang="zh-TW">附加檔案</title>
|
||||
<title xml:lang="tr">Ekler</title>
|
||||
<description xml:lang="ko">첨부 파일 관리하는 모듈입니다.</description>
|
||||
<description xml:lang="ko">첨부 파일을 관리합니다.</description>
|
||||
<description xml:lang="zh-CN">管理附件的模块。</description>
|
||||
<description xml:lang="en">Module for managing attachments.</description>
|
||||
<description xml:lang="en">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>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@
|
|||
<action name="getFileList" type="model" standalone="true" />
|
||||
<action name="procFileUpload" type="controller" standalone="true" />
|
||||
<action name="procFileIframeUpload" type="controller" standalone="true" />
|
||||
<action name="procFileImageResize" type="controller" standalone="true" />
|
||||
<action name="procFileImageResize" type="controller" standalone="true" ruleset="imageResize" />
|
||||
<action name="procFileDelete" type="controller" standalone="true" />
|
||||
<action name="procFileDownload" type="controller" standalone="true" />
|
||||
<action name="procFileDownload" type="controller" standalone="true" method="GET|POST" />
|
||||
<action name="procFileOutput" type="controller" standalone="true" />
|
||||
<action name="procFileAdminDeleteChecked" type="controller" standalone="true" ruleset="deleteChecked" />
|
||||
<action name="procFileAdminInsertConfig" type="controller" standalone="true" ruleset="insertConfig" />
|
||||
<action name="procFileAdminInsertModuleConfig" type="controller" standalone="true" ruleset="fileModuleConfig" />
|
||||
|
|
|
|||
|
|
@ -1,187 +1,197 @@
|
|||
<?php
|
||||
/**
|
||||
* admin controller class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
class fileAdminController extends file {
|
||||
/**
|
||||
* admin controller class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class fileAdminController extends file
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the attachment of a particular module
|
||||
*
|
||||
* @param int $module_srl Sequence of module to delete files
|
||||
* @return Object
|
||||
**/
|
||||
function deleteModuleFiles($module_srl) {
|
||||
// Get a full list of attachments
|
||||
$args->module_srl = $module_srl;
|
||||
$columnList = array('file_srl', 'uploaded_filename');
|
||||
$output = executeQueryArray('file.getModuleFiles',$args, $columnList);
|
||||
if(!$output) return $output;
|
||||
$files = $output->data;
|
||||
// Remove from the DB
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('file.deleteModuleFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
// Remove the file
|
||||
FileHandler::removeDir( sprintf("./files/attach/images/%s/", $module_srl) ) ;
|
||||
FileHandler::removeDir( sprintf("./files/attach/binaries/%s/", $module_srl) );
|
||||
// Remove the file list obtained from the 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'];
|
||||
}
|
||||
// Remove a file directory of the document
|
||||
for($i=0;$i<count($path);$i++) FileHandler::removeBlankDir($path[$i]);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete selected files from the administrator page
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileAdminDeleteChecked() {
|
||||
// An error appears if no document is selected
|
||||
$cart = Context::get('cart');
|
||||
if(!$cart) return $this->stop('msg_cart_is_null');
|
||||
if(!is_array($cart)) $file_srl_list= explode('|@|', $cart);
|
||||
else $file_srl_list = $cart;
|
||||
$file_count = count($file_srl_list);
|
||||
if(!$file_count) return $this->stop('msg_cart_is_null');
|
||||
|
||||
$oFileController = &getController('file');
|
||||
// Delete the post
|
||||
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) );
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispFileAdminList');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add file information
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileAdminInsertConfig() {
|
||||
// Get configurations (using module model object)
|
||||
$config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$config->allowed_filetypes = str_replace(' ', '', 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');
|
||||
// Create module Controller object
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('file',$config);
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispFileAdminConfig');
|
||||
return $this->setRedirectUrl($returnUrl, $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add file information for each module
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function procFileAdminInsertModuleConfig() {
|
||||
// Get variables
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
// In order to configure multiple modules at once
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$download_grant = 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 = str_replace(' ', '', Context::get('allowed_filetypes'));
|
||||
|
||||
if(!is_array($download_grant)) $file_config->download_grant = explode('|@|',$download_grant);
|
||||
else $file_config->download_grant = $download_grant;
|
||||
|
||||
//관리자가 허용한 첨부파일의 사이즈가 php.ini의 값보다 큰지 확인하기 - by ovclas
|
||||
$userFileAllowSize = $this->_changeBytes($file_config->allowed_filesize.'M');
|
||||
$userAttachAllowSize = $this->_changeBytes($file_config->allowed_attach_size.'M');
|
||||
$iniPostMaxSize = $this->_changeBytes(ini_get('post_max_size'));
|
||||
$iniUploadMaxSize = $this->_changeBytes(ini_get('upload_max_filesize'));
|
||||
$iniMinSzie = min($iniPostMaxSize, $iniUploadMaxSize);
|
||||
|
||||
if($userFileAllowSize > $iniMinSzie || $userAttachAllowSize > $iniMinSzie)
|
||||
return new Object(-1, 'input size over than config in php.ini');
|
||||
|
||||
$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', 'info');
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispBoardAdminContent');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add to SESSION file srl
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function procFileAdminAddCart()
|
||||
/**
|
||||
* Delete the attachment of a particular module
|
||||
*
|
||||
* @param int $module_srl Sequence of module to delete files
|
||||
* @return Object
|
||||
*/
|
||||
function deleteModuleFiles($module_srl)
|
||||
{
|
||||
// Get a full list of attachments
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$columnList = array('file_srl', 'uploaded_filename');
|
||||
$output = executeQueryArray('file.getModuleFiles',$args, $columnList);
|
||||
if(!$output) return $output;
|
||||
$files = $output->data;
|
||||
// Remove from the DB
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('file.deleteModuleFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
// Remove the file
|
||||
FileHandler::removeDir( sprintf("./files/attach/images/%s/", $module_srl) ) ;
|
||||
FileHandler::removeDir( sprintf("./files/attach/binaries/%s/", $module_srl) );
|
||||
// Remove the file list obtained from the DB
|
||||
$path = array();
|
||||
$cnt = count($files);
|
||||
for($i=0;$i<$cnt;$i++)
|
||||
{
|
||||
$file_srl = (int)Context::get('file_srl');
|
||||
//$fileSrlList = array(500, 502);
|
||||
$uploaded_filename = $files[$i]->uploaded_filename;
|
||||
FileHandler::removeFile($uploaded_filename);
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
$output = $oFileModel->getFile($file_srl);
|
||||
//$output = $oFileModel->getFile($fileSrlList);
|
||||
$path_info = pathinfo($uploaded_filename);
|
||||
if(!in_array($path_info['dirname'], $path)) $path[] = $path_info['dirname'];
|
||||
}
|
||||
// Remove a file directory of the document
|
||||
for($i=0;$i<count($path);$i++) FileHandler::removeBlankDir($path[$i]);
|
||||
|
||||
if($output->file_srl)
|
||||
{
|
||||
if($_SESSION['file_management'][$output->file_srl]) unset($_SESSION['file_management'][$output->file_srl]);
|
||||
else $_SESSION['file_management'][$output->file_srl] = true;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete selected files from the administrator page
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function procFileAdminDeleteChecked()
|
||||
{
|
||||
// An error appears if no document is selected
|
||||
$cart = Context::get('cart');
|
||||
if(!$cart) return $this->stop('msg_file_cart_is_null');
|
||||
if(!is_array($cart)) $file_srl_list= explode('|@|', $cart);
|
||||
else $file_srl_list = $cart;
|
||||
$file_count = count($file_srl_list);
|
||||
if(!$file_count) return $this->stop('msg_file_cart_is_null');
|
||||
|
||||
$oFileController = &getController('file');
|
||||
// Delete the post
|
||||
for($i=0;$i<$file_count;$i++)
|
||||
{
|
||||
$file_srl = trim($file_srl_list[$i]);
|
||||
if(!$file_srl) continue;
|
||||
|
||||
$oFileController->deleteFile($file_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change value from human readable to byte unit
|
||||
*
|
||||
* @param string $size_str Size string
|
||||
* @return int The byte value for input
|
||||
**/
|
||||
function _changeBytes($size_str)
|
||||
$this->setMessage( sprintf(Context::getLang('msg_checked_file_is_deleted'), $file_count) );
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispFileAdminList');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add file information
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function procFileAdminInsertConfig()
|
||||
{
|
||||
// Get configurations (using module model object)
|
||||
$config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$config->allowed_filetypes = str_replace(' ', '', 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');
|
||||
// Create module Controller object
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('file',$config);
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispFileAdminConfig');
|
||||
return $this->setRedirectUrl($returnUrl, $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add file information for each module
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function procFileAdminInsertModuleConfig()
|
||||
{
|
||||
// Get variables
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
// In order to configure multiple modules at once
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$download_grant = 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 = str_replace(' ', '', Context::get('allowed_filetypes'));
|
||||
|
||||
if(!is_array($download_grant)) $file_config->download_grant = explode('|@|',$download_grant);
|
||||
else $file_config->download_grant = $download_grant;
|
||||
|
||||
//관리자가 허용한 첨부파일의 사이즈가 php.ini의 값보다 큰지 확인하기 - by ovclas
|
||||
$userFileAllowSize = $this->_changeBytes($file_config->allowed_filesize.'M');
|
||||
$userAttachAllowSize = $this->_changeBytes($file_config->allowed_attach_size.'M');
|
||||
$iniPostMaxSize = $this->_changeBytes(ini_get('post_max_size'));
|
||||
$iniUploadMaxSize = $this->_changeBytes(ini_get('upload_max_filesize'));
|
||||
$iniMinSzie = min($iniPostMaxSize, $iniUploadMaxSize);
|
||||
|
||||
if($userFileAllowSize > $iniMinSzie || $userAttachAllowSize > $iniMinSzie)
|
||||
return new Object(-1, 'input size over than config in php.ini');
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++)
|
||||
{
|
||||
switch (substr ($size_str, -1))
|
||||
{
|
||||
case 'M': case 'm': return (int)$size_str * 1048576;
|
||||
case 'K': case 'k': return (int)$size_str * 1024;
|
||||
case 'G': case 'g': return (int)$size_str * 1073741824;
|
||||
default: return $size_str;
|
||||
}
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$oModuleController->insertModulePartConfig('file',$srl,$file_config);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated', 'info');
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispBoardAdminContent');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add to SESSION file srl
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function procFileAdminAddCart()
|
||||
{
|
||||
$file_srl = (int)Context::get('file_srl');
|
||||
//$fileSrlList = array(500, 502);
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
$output = $oFileModel->getFile($file_srl);
|
||||
//$output = $oFileModel->getFile($fileSrlList);
|
||||
|
||||
if($output->file_srl)
|
||||
{
|
||||
if($_SESSION['file_management'][$output->file_srl]) unset($_SESSION['file_management'][$output->file_srl]);
|
||||
else $_SESSION['file_management'][$output->file_srl] = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change value from human readable to byte unit
|
||||
*
|
||||
* @param string $size_str Size string
|
||||
* @return int The byte value for input
|
||||
*/
|
||||
function _changeBytes($size_str)
|
||||
{
|
||||
switch (substr ($size_str, -1))
|
||||
{
|
||||
case 'M': case 'm': return (int)$size_str * 1048576;
|
||||
case 'K': case 'k': return (int)$size_str * 1024;
|
||||
case 'G': case 'g': return (int)$size_str * 1073741824;
|
||||
default: return $size_str;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* End of file file.admin.controller.php */
|
||||
/* Location: ./modules/file/file.admin.controller.php */
|
||||
|
|
|
|||
|
|
@ -1,192 +1,201 @@
|
|||
<?php
|
||||
/**
|
||||
* Admin model class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
class fileAdminModel extends file {
|
||||
/**
|
||||
* Admin model class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class fileAdminModel extends file
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
/**
|
||||
* Get all the attachments in order by time descending (for administrators)
|
||||
*
|
||||
* <pre>
|
||||
* Search options:
|
||||
* - s_module_srl: int[] or int, search module_srl
|
||||
* - exclude_module_srl: int[] or int, exclude module_srl
|
||||
* - isvalid: Y or N
|
||||
* - direct_download: Y or N
|
||||
* - s_filename: string, like operation
|
||||
* - s_filesize_more: int, more operation, byte unit
|
||||
* - s_filesize_mega_more: int, more operation, mega unit
|
||||
* - s_filesize_less: int, less operation, byte unit
|
||||
* - s_filesize_mega_less: int, less operation, mega unit
|
||||
* - s_download_count: int, more operation
|
||||
* - s_regdate: string(YYYYMMDDHHMMSS), like prefix operation(STRING%)
|
||||
* - s_ipaddress: string, like prefix operation
|
||||
* - s_user_id: string
|
||||
* - s_user_name: string
|
||||
* - s_nick_name: string
|
||||
* - sort_index: string. default: files.file_srl
|
||||
* - page : int
|
||||
* - list_count: int. default: 20
|
||||
* - page_count: int. default: 10
|
||||
*
|
||||
* Result data:
|
||||
* - file_srl
|
||||
* - upload_target_srl
|
||||
* - upload_target_type
|
||||
* - sid
|
||||
* - module_srl
|
||||
* - member_srl
|
||||
* - download_count
|
||||
* - direct_download
|
||||
* - source_filename
|
||||
* - uploaded_filename
|
||||
* - file_size
|
||||
* - comment
|
||||
* - isvaild
|
||||
* - regdate
|
||||
* - ipaddress
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param object $obj Search options
|
||||
* @param array $columnList Column list to get from DB
|
||||
* @return Object Object contains query result
|
||||
*/
|
||||
function getFileList($obj, $columnList = array())
|
||||
{
|
||||
$args = new stdClass();
|
||||
$this->_makeSearchParam($obj, $args);
|
||||
|
||||
/**
|
||||
* Get all the attachments in order by time descending (for administrators)
|
||||
*
|
||||
* <pre>
|
||||
* Search options:
|
||||
* - s_module_srl: int[] or int, search module_srl
|
||||
* - exclude_module_srl: int[] or int, exclude module_srl
|
||||
* - isvalid: Y or N
|
||||
* - direct_download: Y or N
|
||||
* - s_filename: string, like operation
|
||||
* - s_filesize_more: int, more operation, byte unit
|
||||
* - s_filesize_mega_more: int, more operation, mega unit
|
||||
* - s_filesize_less: int, less operation, byte unit
|
||||
* - s_filesize_mega_less: int, less operation, mega unit
|
||||
* - s_download_count: int, more operation
|
||||
* - s_regdate: string(YYYYMMDDHHMMSS), like prefix operation(STRING%)
|
||||
* - s_ipaddress: string, like prefix operation
|
||||
* - s_user_id: string
|
||||
* - s_user_name: string
|
||||
* - s_nick_name: string
|
||||
* - sort_index: string. default: files.file_srl
|
||||
* - page : int
|
||||
* - list_count: int. default: 20
|
||||
* - page_count: int. default: 10
|
||||
*
|
||||
* Result data:
|
||||
* - file_srl
|
||||
* - upload_target_srl
|
||||
* - upload_target_type
|
||||
* - sid
|
||||
* - module_srl
|
||||
* - member_srl
|
||||
* - download_count
|
||||
* - direct_download
|
||||
* - source_filename
|
||||
* - uploaded_filename
|
||||
* - file_size
|
||||
* - comment
|
||||
* - isvaild
|
||||
* - regdate
|
||||
* - ipaddress
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param object $obj Search options
|
||||
* @param array $columnList Column list to get from DB
|
||||
* @return Object Object contains query result
|
||||
**/
|
||||
function getFileList($obj, $columnList = array()) {
|
||||
$this->_makeSearchParam($obj, $args);
|
||||
// Set valid/invalid state
|
||||
if($obj->isvalid == 'Y') $args->isvalid = 'Y';
|
||||
elseif($obj->isvalid == 'N') $args->isvalid = 'N';
|
||||
// Set multimedia/common file
|
||||
if($obj->direct_download == 'Y') $args->direct_download = 'Y';
|
||||
elseif($obj->direct_download == 'N') $args->direct_download= 'N';
|
||||
// Set variables
|
||||
$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;
|
||||
// Execute the file.getFileList query
|
||||
$output = executeQuery('file.getFileList', $args, $columnList);
|
||||
// Return if no result or an error occurs
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
// Set valid/invalid state
|
||||
if($obj->isvalid == 'Y') $args->isvalid = 'Y';
|
||||
elseif($obj->isvalid == 'N') $args->isvalid = 'N';
|
||||
// Set multimedia/common file
|
||||
if($obj->direct_download == 'Y') $args->direct_download = 'Y';
|
||||
elseif($obj->direct_download == 'N') $args->direct_download= 'N';
|
||||
// Set variables
|
||||
$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;
|
||||
// Execute the file.getFileList query
|
||||
$output = executeQuery('file.getFileList', $args, $columnList);
|
||||
// Return if no result or an error occurs
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
foreach($output->data as $key => $file) {
|
||||
if($_SESSION['file_management'][$file->file_srl]) $file->isCarted = true;
|
||||
else $file->isCarted = false;
|
||||
|
||||
$file->download_url = $oFileModel->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$output->data[$key] = $file;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return number of attachments which belongs to a specific document
|
||||
*
|
||||
* <pre>
|
||||
* Result data:
|
||||
* +---------+-------+
|
||||
* | isvalid | count |
|
||||
* +---------+-------+
|
||||
* | Y | 00 |
|
||||
* +---------+-------+
|
||||
* | N | 00 |
|
||||
* +---------+-------+
|
||||
* </pre>
|
||||
*
|
||||
* @param object $obj Search options (not used...)
|
||||
* @return array
|
||||
**/
|
||||
function getFilesCountByGroupValid($obj = '') {
|
||||
//$this->_makeSearchParam($obj, $args);
|
||||
|
||||
$output = executeQueryArray('file.getFilesCountByGroupValid', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return number of attachments which belongs to a specific date
|
||||
*
|
||||
* @param string $date Date string
|
||||
* @return int
|
||||
**/
|
||||
function getFilesCountByDate($date = '') {
|
||||
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||
|
||||
$output = executeQuery('file.getFilesCount', $args);
|
||||
if(!$output->toBool()) return 0;
|
||||
|
||||
return $output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make search parameters from object(private)
|
||||
*
|
||||
* @param object $obj Original searach options
|
||||
* @param object $args Result searach options
|
||||
* @return void
|
||||
*/
|
||||
function _makeSearchParam(&$obj, &$args)
|
||||
foreach($output->data as $key => $file)
|
||||
{
|
||||
// Search options
|
||||
$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($_SESSION['file_management'][$file->file_srl]) $file->isCarted = true;
|
||||
else $file->isCarted = false;
|
||||
|
||||
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;
|
||||
case 'isvalid' :
|
||||
$args->isvalid = $search_keyword;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$file->download_url = $oFileModel->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$output->data[$key] = $file;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return number of attachments which belongs to a specific document
|
||||
*
|
||||
* <pre>
|
||||
* Result data:
|
||||
* +---------+-------+
|
||||
* | isvalid | count |
|
||||
* +---------+-------+
|
||||
* | Y | 00 |
|
||||
* +---------+-------+
|
||||
* | N | 00 |
|
||||
* +---------+-------+
|
||||
* </pre>
|
||||
*
|
||||
* @param object $obj Search options (not used...)
|
||||
* @return array
|
||||
*/
|
||||
function getFilesCountByGroupValid($obj = '')
|
||||
{
|
||||
//$this->_makeSearchParam($obj, $args);
|
||||
|
||||
$output = executeQueryArray('file.getFilesCountByGroupValid', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return number of attachments which belongs to a specific date
|
||||
*
|
||||
* @param string $date Date string
|
||||
* @return int
|
||||
*/
|
||||
function getFilesCountByDate($date = '')
|
||||
{
|
||||
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||
|
||||
$output = executeQuery('file.getFilesCount', $args);
|
||||
if(!$output->toBool()) return 0;
|
||||
|
||||
return $output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make search parameters from object(private)
|
||||
*
|
||||
* @param object $obj Original searach options
|
||||
* @param object $args Result searach options
|
||||
* @return void
|
||||
*/
|
||||
function _makeSearchParam(&$obj, &$args)
|
||||
{
|
||||
// Search options
|
||||
$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;
|
||||
case 'isvalid' :
|
||||
$args->isvalid = $search_keyword;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* End of file file.admin.model.php */
|
||||
/* Location: ./modules/file/file.admin.model.php */
|
||||
|
|
|
|||
|
|
@ -1,192 +1,225 @@
|
|||
<?php
|
||||
/**
|
||||
* Admin view of the module class file
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
class fileAdminView extends file {
|
||||
/**
|
||||
* Admin view of the module class file
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class fileAdminView extends file
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
/**
|
||||
* Display output list (for administrator)
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function dispFileAdminList()
|
||||
{
|
||||
// Options to get a list
|
||||
$args = new stdClass();
|
||||
$args->page = Context::get('page'); // /< Page
|
||||
$args->list_count = 30; // /< Number of documents that appear on a single page
|
||||
$args->page_count = 10; // /< Number of pages that appear in the page navigation
|
||||
|
||||
/**
|
||||
* Display output list (for administrator)
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function dispFileAdminList() {
|
||||
// Options to get a list
|
||||
$args->page = Context::get('page'); // /< Page
|
||||
$args->list_count = 30; // /< Number of documents that appear on a single page
|
||||
$args->page_count = 10; // /< Number of pages that appear in the page navigation
|
||||
$args->sort_index = 'file_srl'; // /< Sorting values
|
||||
$args->isvalid = Context::get('isvalid');
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
// Get a list
|
||||
$oFileAdminModel = &getAdminModel('file');
|
||||
$columnList = array('file_srl', 'upload_target_srl', 'upload_target_type', 'sid', 'module_srl'
|
||||
, 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress', 'member.member_srl', 'member.nick_name');
|
||||
$output = $oFileAdminModel->getFileList($args, $columnList);
|
||||
// Get the document for looping a list
|
||||
if($output->data)
|
||||
{
|
||||
$oCommentModel = &getModel('comment');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$args->sort_index = 'file_srl'; // /< Sorting values
|
||||
$args->isvalid = Context::get('isvalid');
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
// Get a list
|
||||
$oFileAdminModel = &getAdminModel('file');
|
||||
$columnList = array('file_srl', 'upload_target_srl', 'upload_target_type', 'sid', 'module_srl'
|
||||
, 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress');
|
||||
$output = $oFileAdminModel->getFileList($args, $columnList);
|
||||
// Get the document for looping a list
|
||||
if($output->data) {
|
||||
$oCommentModel = &getModel('comment');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oModuleModel = &getModel('module');
|
||||
$file_list = array();
|
||||
$document_list = array();
|
||||
$comment_list = array();
|
||||
$module_list= array();
|
||||
|
||||
$file_list = array();
|
||||
$document_list = array();
|
||||
$comment_list = array();
|
||||
$module_list= array();
|
||||
$doc_srls = array();
|
||||
$com_srls = array();
|
||||
$mod_srls= 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;
|
||||
// Find and update if upload_target_type doesn't exist
|
||||
if(!$file->upload_target_type) {
|
||||
// Pass if upload_target_type is already found
|
||||
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 (for a page)
|
||||
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);
|
||||
}
|
||||
}
|
||||
// Check if data is already obtained
|
||||
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;
|
||||
}
|
||||
// Remove duplication
|
||||
$doc_srls = array_unique($doc_srls);
|
||||
$com_srls = array_unique($com_srls);
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
// Comment list
|
||||
$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;
|
||||
}
|
||||
}
|
||||
// Document list
|
||||
$doc_srls_count = count($doc_srls);
|
||||
if($doc_srls_count) {
|
||||
$document_output = $oDocumentModel->getDocuments($doc_srls);
|
||||
if(is_array($document_output))
|
||||
foreach($output->data as $file)
|
||||
{
|
||||
$file_srl = $file->file_srl;
|
||||
$target_srl = $file->upload_target_srl;
|
||||
$file_update_args = new stdClass();
|
||||
$file_update_args->file_srl = $file_srl;
|
||||
// Find and update if upload_target_type doesn't exist
|
||||
if(!$file->upload_target_type)
|
||||
{
|
||||
// Pass if upload_target_type is already found
|
||||
if($document_list[$target_srl])
|
||||
{
|
||||
foreach($document_output as $document) {
|
||||
$document_list[$document->document_srl] = $document;
|
||||
$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 (for a page)
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Module List
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count) {
|
||||
$columnList = array('module_srl', 'mid', 'browser_title');
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
|
||||
if($module_output && is_array($module_output)){
|
||||
foreach($module_output as $module) {
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
// Check if data is already obtained
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($file->upload_target_type)
|
||||
{
|
||||
if(!in_array($file->upload_target_srl, ${$file->upload_target_type.'_srls'}))
|
||||
{
|
||||
${$file->upload_target_type.'_srls'}[] = $target_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);
|
||||
// Set a template
|
||||
$security = new Security();
|
||||
$security->encodeHTML('file_list..source_filename','file_list..ipaddress');
|
||||
$security->encodeHTML('module_list..browser_title','module_list..mid');
|
||||
$file_list[$file_srl] = $file;
|
||||
$mod_srls[] = $file->module_srl;
|
||||
}
|
||||
// Remove duplication
|
||||
$doc_srls = array_unique($doc_srls);
|
||||
$com_srls = array_unique($com_srls);
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
// Comment list
|
||||
$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;
|
||||
}
|
||||
}
|
||||
// Document list
|
||||
$doc_srls_count = count($doc_srls);
|
||||
if($doc_srls_count)
|
||||
{
|
||||
$document_output = $oDocumentModel->getDocuments($doc_srls);
|
||||
if(is_array($document_output))
|
||||
{
|
||||
foreach($document_output as $document)
|
||||
{
|
||||
$document_list[$document->document_srl] = $document;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Module List
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count)
|
||||
{
|
||||
$columnList = array('module_srl', 'mid', 'browser_title');
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
|
||||
if($module_output && is_array($module_output))
|
||||
{
|
||||
foreach($module_output as $module)
|
||||
{
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('file_list');
|
||||
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);
|
||||
// Set a template
|
||||
$security = new Security();
|
||||
$security->encodeHTML('file_list..');
|
||||
$security->encodeHTML('module_list..');
|
||||
|
||||
/**
|
||||
* Set attachment information (for administrator)
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function dispFileAdminConfig() {
|
||||
$oFileModel = &getModel('file');
|
||||
$config = $oFileModel->getFileConfig();
|
||||
Context::set('config',$config);
|
||||
// Set a template file
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('adminConfig');
|
||||
}
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('file_list');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* Set attachment information (for administrator)
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function dispFileAdminConfig()
|
||||
{
|
||||
$oFileModel = &getModel('file');
|
||||
$config = $oFileModel->getFileConfig();
|
||||
Context::set('config',$config);
|
||||
// Set a template file
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('adminConfig');
|
||||
}
|
||||
}
|
||||
/* End of file file.admin.view.php */
|
||||
/* Location: ./modules/file/file.admin.view.php */
|
||||
|
|
|
|||
|
|
@ -1,148 +1,152 @@
|
|||
<?php
|
||||
/**
|
||||
* High class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
class file extends ModuleObject {
|
||||
/**
|
||||
* High class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class file extends ModuleObject
|
||||
{
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function moduleInstall()
|
||||
{
|
||||
// Register action forward (to use in administrator mode)
|
||||
$oModuleController = &getController('module');
|
||||
// Save the default settings for attachments
|
||||
$config->allowed_filesize = '2';
|
||||
$config->allowed_attach_size = '2';
|
||||
$config->allowed_filetypes = '*.*';
|
||||
$oModuleController->insertModuleConfig('file', $config);
|
||||
// Generate a directory for the file module
|
||||
FileHandler::makeDir('./files/attach/images');
|
||||
FileHandler::makeDir('./files/attach/binaries');
|
||||
// 2007. 10. 17 Create a trigger to insert, update, delete documents and comments
|
||||
$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 Delete all the attachements when auto-saved document is deleted
|
||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
// 2007. 10. 17 Create a trigger to delete all the attachements when the module is deleted
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
||||
// 2007. 10. 19 Call a trigger to set up the file permissions before displaying
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
||||
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// Register action forward (to use in administrator mode)
|
||||
$oModuleController = &getController('module');
|
||||
// Save the default settings for attachments
|
||||
$config->allowed_filesize = '2';
|
||||
$config->allowed_attach_size = '2';
|
||||
$config->allowed_filetypes = '*.*';
|
||||
$oModuleController->insertModuleConfig('file', $config);
|
||||
// Generate a directory for the file module
|
||||
FileHandler::makeDir('./files/attach/images');
|
||||
FileHandler::makeDir('./files/attach/binaries');
|
||||
// 2007. 10. 17 Create a trigger to insert, update, delete documents and comments
|
||||
$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 Delete all the attachements when auto-saved document is deleted
|
||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
// 2007. 10. 17 Create a trigger to delete all the attachements when the module is deleted
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
||||
// 2007. 10. 19 Call a trigger to set up the file permissions before displaying
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
||||
return new Object();
|
||||
}
|
||||
|
||||
return new Object();
|
||||
}
|
||||
/**
|
||||
* A method to check if successfully installed
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
// 2007. 10. 17 Create a trigger to insert, update, delete documents and comments
|
||||
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 Delete all the attachements when auto-saved document is deleted
|
||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after')) return true;
|
||||
// 2007. 10. 17 Create a trigger to delete all the attachements when the module is deleted
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after')) return true;
|
||||
// 2007. 10. 19 Call a trigger to set up the file permissions before displaying
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before')) return true;
|
||||
// A column to determine a target type
|
||||
if(!$oDB->isColumnExists('files', 'upload_target_type')) return true;
|
||||
|
||||
/**
|
||||
* A method to check if successfully installed
|
||||
*
|
||||
* @return bool
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
// 2007. 10. 17 Create a trigger to insert, update, delete documents and comments
|
||||
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 Delete all the attachements when auto-saved document is deleted
|
||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after')) return true;
|
||||
// 2007. 10. 17 Create a trigger to delete all the attachements when the module is deleted
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after')) return true;
|
||||
// 2007. 10. 19 Call a trigger to set up the file permissions before displaying
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before')) return true;
|
||||
// A column to determine a target type
|
||||
if(!$oDB->isColumnExists('files', 'upload_target_type')) return true;
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'file', 'controller', 'triggerCopyModule', 'after')) return true;
|
||||
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'file', 'controller', 'triggerCopyModule', 'after')) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Execute update
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
// 2007. 10. 17 Create a trigger to insert, update, delete documents and comments
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
||||
|
||||
/**
|
||||
* Execute update
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
// 2007. 10. 17 Create a trigger to insert, update, delete documents and comments
|
||||
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.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', '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.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('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', '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.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', '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.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 Delete all the attachements when auto-saved document is deleted
|
||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after'))
|
||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
// 2007. 10. 17 Create a trigger to delete all the attachements when the module is deleted
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after'))
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
||||
// 2007. 10. 19 Call a trigger to set up the file permissions before displaying
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before'))
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
||||
// A column to determine a target type
|
||||
if(!$oDB->isColumnExists('files', 'upload_target_type')) $oDB->addColumn('files', 'upload_target_type', 'char', '3');
|
||||
|
||||
if(!$oModuleModel->getTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after'))
|
||||
$oModuleController->insertTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after');
|
||||
// 2009. 6. 9 Delete all the attachements when auto-saved document is deleted
|
||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after'))
|
||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
||||
// 2007. 10. 17 Create a trigger to delete all the attachements when the module is deleted
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after'))
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
||||
// 2007. 10. 19 Call a trigger to set up the file permissions before displaying
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before'))
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
||||
// A column to determine a target type
|
||||
if(!$oDB->isColumnExists('files', 'upload_target_type')) $oDB->addColumn('files', 'upload_target_type', 'char', '3');
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'file', 'controller', 'triggerCopyModule', 'after'))
|
||||
{
|
||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'file', 'controller', 'triggerCopyModule', 'after');
|
||||
}
|
||||
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'file', 'controller', 'triggerCopyModule', 'after'))
|
||||
{
|
||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'file', 'controller', 'triggerCopyModule', 'after');
|
||||
}
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-generate the cache file
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* Re-generate the cache file
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
}
|
||||
}
|
||||
/* End of file file.class.php */
|
||||
/* Location: ./modules/file/file.class.php */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,284 +1,313 @@
|
|||
<?php
|
||||
/**
|
||||
* Model class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
class fileModel extends file {
|
||||
/**
|
||||
* Model class of the file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class fileModel extends file
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
/**
|
||||
* Return a file list attached in the document
|
||||
*
|
||||
* It is used when a file list of the upload_target_srl is requested for creating/updating a document.
|
||||
* Attempt to replace with sever-side session if upload_target_srl is not yet determined
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function getFileList()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
/**
|
||||
* Return a file list attached in the document
|
||||
*
|
||||
* It is used when a file list of the upload_target_srl is requested for creating/updating a document.
|
||||
* Attempt to replace with sever-side session if upload_target_srl is not yet determined
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
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;
|
||||
|
||||
$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);
|
||||
|
||||
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();
|
||||
}
|
||||
// Display upload status
|
||||
$upload_status = $this->getUploadStatus($attached_size);
|
||||
// Check remained file size until upload complete
|
||||
//$config = $oModuleModel->getModuleInfoByMid($mid); //perhaps config varialbles not used
|
||||
|
||||
$file_config = $this->getUploadConfig();
|
||||
$left_size = $file_config->allowed_attach_size*1024*1024 - $attached_size;
|
||||
// Settings of required information
|
||||
$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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return number of attachments which belongs to a specific document
|
||||
*
|
||||
* @param int $upload_target_srl The sequence to get a number of files
|
||||
* @return int Returns a number of files
|
||||
**/
|
||||
function getFilesCount($upload_target_srl) {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = executeQuery('file.getFilesCount', $args);
|
||||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a download path
|
||||
*
|
||||
* @param int $file_srl The sequence of file to get url
|
||||
* @param string $sid
|
||||
* @return string Returns a url
|
||||
**/
|
||||
function getDownloadUrl($file_srl, $sid) {
|
||||
return sprintf('?module=%s&act=%s&file_srl=%s&sid=%s', 'file', 'procFileDownload', $file_srl, $sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file configurations
|
||||
*
|
||||
* @param int $module_srl If set this, returns specific module's configuration. Otherwise returns global configuration.
|
||||
* @return object Returns configuration.
|
||||
**/
|
||||
function getFileConfig($module_srl = null) {
|
||||
// Get configurations (using module model object)
|
||||
$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;
|
||||
}
|
||||
// Property for all files comes first than each property
|
||||
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 setting if not exists
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file information
|
||||
*
|
||||
* @param int $file_srl The sequence of file to get information
|
||||
* @param array $columnList The list of columns to get from DB
|
||||
* @return Object|object|array If error returns an instance of Object. If result set is one returns a object that contins file information. If result set is more than one returns array of object.
|
||||
**/
|
||||
function getFile($file_srl, $columnList = array()) {
|
||||
$args->file_srl = $file_srl;
|
||||
$output = executeQueryArray('file.getFile', $args, $columnList);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// old version compatibility
|
||||
if(count($output->data) == 1)
|
||||
for($i=0;$i<$file_count;$i++)
|
||||
{
|
||||
$file = $output->data[0];
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$file_info = $tmp_files[$i];
|
||||
if(!$file_info->file_srl) continue;
|
||||
|
||||
return $file;
|
||||
$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
|
||||
}
|
||||
else
|
||||
{
|
||||
$upload_target_srl = 0;
|
||||
$attached_size = 0;
|
||||
$files = array();
|
||||
}
|
||||
// Display upload status
|
||||
$upload_status = $this->getUploadStatus($attached_size);
|
||||
// Check remained file size until upload complete
|
||||
//$config = $oModuleModel->getModuleInfoByMid($mid); //perhaps config varialbles not used
|
||||
|
||||
$file_config = $this->getUploadConfig();
|
||||
$left_size = $file_config->allowed_attach_size*1024*1024 - $attached_size;
|
||||
// Settings of required information
|
||||
$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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return number of attachments which belongs to a specific document
|
||||
*
|
||||
* @param int $upload_target_srl The sequence to get a number of files
|
||||
* @return int Returns a number of files
|
||||
*/
|
||||
function getFilesCount($upload_target_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = executeQuery('file.getFilesCount', $args);
|
||||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a download path
|
||||
*
|
||||
* @param int $file_srl The sequence of file to get url
|
||||
* @param string $sid
|
||||
* @return string Returns a url
|
||||
*/
|
||||
function getDownloadUrl($file_srl, $sid)
|
||||
{
|
||||
return sprintf('?module=%s&act=%s&file_srl=%s&sid=%s', 'file', 'procFileDownload', $file_srl, $sid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file configurations
|
||||
*
|
||||
* @param int $module_srl If set this, returns specific module's configuration. Otherwise returns global configuration.
|
||||
* @return object Returns configuration.
|
||||
*/
|
||||
function getFileConfig($module_srl = null)
|
||||
{
|
||||
// Get configurations (using module model object)
|
||||
$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;
|
||||
|
||||
$config = new stdClass();
|
||||
|
||||
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;
|
||||
}
|
||||
// Property for all files comes first than each property
|
||||
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 setting if not exists
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file information
|
||||
*
|
||||
* @param int $file_srl The sequence of file to get information
|
||||
* @param array $columnList The list of columns to get from DB
|
||||
* @return Object|object|array If error returns an instance of Object. If result set is one returns a object that contins file information. If result set is more than one returns array of object.
|
||||
*/
|
||||
function getFile($file_srl, $columnList = array())
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->file_srl = $file_srl;
|
||||
$output = executeQueryArray('file.getFile', $args, $columnList);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// old version compatibility
|
||||
if(count($output->data) == 1)
|
||||
{
|
||||
$file = $output->data[0];
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
|
||||
return $file;
|
||||
}
|
||||
else
|
||||
{
|
||||
$fileList = array();
|
||||
|
||||
if(is_array($output->data))
|
||||
{
|
||||
$fileList = array();
|
||||
|
||||
if(is_array($output->data))
|
||||
foreach($output->data as $key=>$value)
|
||||
{
|
||||
foreach($output->data as $key=>$value)
|
||||
{
|
||||
$file = $value;
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
array_push($fileList, $file);
|
||||
}
|
||||
$file = $value;
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
array_push($fileList, $file);
|
||||
}
|
||||
return $fileList;
|
||||
}
|
||||
}
|
||||
return $fileList;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all files which belong to a specific document
|
||||
*
|
||||
* @param int $upload_target_srl The sequence of target to get file list
|
||||
* @param array $columnList The list of columns to get from DB
|
||||
* @param string $sortIndex The column that used as sort index
|
||||
* @return array Returns array of object that contains file information. If no result returns null.
|
||||
**/
|
||||
function getFiles($upload_target_srl, $columnList = array(), $sortIndex = 'file_srl', $ckValid = false) {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$args->sort_index = $sortIndex;
|
||||
if($ckValid) $args->isvalid = 'Y';
|
||||
$output = executeQuery('file.getFiles', $args, $columnList);
|
||||
if(!$output->data) return;
|
||||
/**
|
||||
* Return all files which belong to a specific document
|
||||
*
|
||||
* @param int $upload_target_srl The sequence of target to get file list
|
||||
* @param array $columnList The list of columns to get from DB
|
||||
* @param string $sortIndex The column that used as sort index
|
||||
* @return array Returns array of object that contains file information. If no result returns null.
|
||||
*/
|
||||
function getFiles($upload_target_srl, $columnList = array(), $sortIndex = 'file_srl', $ckValid = false)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$args->sort_index = $sortIndex;
|
||||
if($ckValid) $args->isvalid = 'Y';
|
||||
$output = executeQuery('file.getFiles', $args, $columnList);
|
||||
if(!$output->data) return;
|
||||
|
||||
$file_list = $output->data;
|
||||
$file_list = $output->data;
|
||||
|
||||
if($file_list && !is_array($file_list)) $file_list = array($file_list);
|
||||
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;
|
||||
}
|
||||
$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;
|
||||
}
|
||||
return $file_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return configurations of the attachement (it automatically checks if an administrator is)
|
||||
*
|
||||
* @return object Returns a file configuration of current module. If user is admin, returns PHP's max file size and allow all file types.
|
||||
**/
|
||||
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');
|
||||
// Get the current module if module_srl doesn't exist
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return messages for file upload and it depends whether an admin is or not
|
||||
*
|
||||
* @param int $attached_size
|
||||
* @return string
|
||||
**/
|
||||
function getUploadStatus($attached_size = 0) {
|
||||
$file_config = $this->getUploadConfig();
|
||||
// Display upload status
|
||||
$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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return file configuration of the module
|
||||
*
|
||||
* @param int $module_srl The sequence of module to get configuration
|
||||
* @return object
|
||||
**/
|
||||
function getFileModuleConfig($module_srl) {
|
||||
return $this->getFileConfig($module_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a grant of file
|
||||
*
|
||||
* @param object $file_info The file information to get grant
|
||||
* @param object $member_info The member information to get grant
|
||||
* @return object Returns a grant of file
|
||||
*/
|
||||
function getFileGrant($file_info, $member_info){
|
||||
if (!$file_info) return null;
|
||||
|
||||
if ($_SESSION['__XE_UPLOADING_FILES_INFO__'][$file_info->file_srl]) {
|
||||
$file_grant->is_deletable = true;
|
||||
return $file_grant;
|
||||
/**
|
||||
* Return configurations of the attachement (it automatically checks if an administrator is)
|
||||
*
|
||||
* @return object Returns a file configuration of current module. If user is admin, returns PHP's max file size and allow all file types.
|
||||
*/
|
||||
function getUploadConfig()
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
$file_config = new stdClass();
|
||||
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');
|
||||
// Get the current module if module_srl doesn't exist
|
||||
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;
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$grant = $oModuleModel->getGrant($oModuleModel->getModuleInfoByModuleSrl($file_info->module_srl), $member_info);
|
||||
/**
|
||||
* Return messages for file upload and it depends whether an admin is or not
|
||||
*
|
||||
* @param int $attached_size
|
||||
* @return string
|
||||
*/
|
||||
function getUploadStatus($attached_size = 0)
|
||||
{
|
||||
$file_config = $this->getUploadConfig();
|
||||
// Display upload status
|
||||
$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;
|
||||
}
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($file_info->upload_target_srl);
|
||||
if ($oDocument->isExists()) $document_grant = $oDocument->isGranted();
|
||||
|
||||
$file_grant->is_deletable = ($document_grant || $member_info->is_admin == 'Y' || $member_info->member_srl == $file_info->member_srl || $grant->manager);
|
||||
|
||||
/**
|
||||
* Return file configuration of the module
|
||||
*
|
||||
* @param int $module_srl The sequence of module to get configuration
|
||||
* @return object
|
||||
*/
|
||||
function getFileModuleConfig($module_srl)
|
||||
{
|
||||
return $this->getFileConfig($module_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a grant of file
|
||||
*
|
||||
* @param object $file_info The file information to get grant
|
||||
* @param object $member_info The member information to get grant
|
||||
* @return object Returns a grant of file
|
||||
*/
|
||||
function getFileGrant($file_info, $member_info)
|
||||
{
|
||||
if(!$file_info) return null;
|
||||
|
||||
if($_SESSION['__XE_UPLOADING_FILES_INFO__'][$file_info->file_srl])
|
||||
{
|
||||
$file_grant->is_deletable = true;
|
||||
return $file_grant;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$grant = $oModuleModel->getGrant($oModuleModel->getModuleInfoByModuleSrl($file_info->module_srl), $member_info);
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($file_info->upload_target_srl);
|
||||
if($oDocument->isExists()) $document_grant = $oDocument->isGranted();
|
||||
|
||||
$file_grant->is_deletable = ($document_grant || $member_info->is_admin == 'Y' || $member_info->member_srl == $file_info->member_srl || $grant->manager);
|
||||
|
||||
return $file_grant;
|
||||
}
|
||||
}
|
||||
/* End of file file.model.php */
|
||||
/* Location: ./modules/file/file.model.php */
|
||||
|
|
|
|||
|
|
@ -1,49 +1,53 @@
|
|||
<?php
|
||||
/**
|
||||
* The view class file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
class fileView extends file {
|
||||
/**
|
||||
* The view class file module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class fileView extends file
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
/**
|
||||
* This is for additional configuration for service module
|
||||
* It only receives file configurations
|
||||
*
|
||||
* @param string $obj The html string of page of addition setup of module
|
||||
* @return Object
|
||||
*/
|
||||
function triggerDispFileAdditionSetup(&$obj)
|
||||
{
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
$current_module_srls = Context::get('module_srls');
|
||||
|
||||
/**
|
||||
* This is for additional configuration for service module
|
||||
* It only receives file configurations
|
||||
*
|
||||
* @param string $obj The html string of page of addition setup of module
|
||||
* @return Object
|
||||
**/
|
||||
function triggerDispFileAdditionSetup(&$obj) {
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
$current_module_srls = Context::get('module_srls');
|
||||
if(!$current_module_srl && !$current_module_srls)
|
||||
{
|
||||
// Get information of the current module
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
if(!$current_module_srl) return new Object();
|
||||
}
|
||||
// Get file configurations of the module
|
||||
$oFileModel = &getModel('file');
|
||||
$file_config = $oFileModel->getFileModuleConfig($current_module_srl);
|
||||
Context::set('file_config', $file_config);
|
||||
// Get a permission for group setting
|
||||
$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);
|
||||
// Set a template file
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'file_module_config');
|
||||
$obj .= $tpl;
|
||||
|
||||
if(!$current_module_srl && !$current_module_srls) {
|
||||
// Get information of the current module
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
if(!$current_module_srl) return new Object();
|
||||
}
|
||||
// Get file configurations of the module
|
||||
$oFileModel = &getModel('file');
|
||||
$file_config = $oFileModel->getFileModuleConfig($current_module_srl);
|
||||
Context::set('file_config', $file_config);
|
||||
// Get a permission for group setting
|
||||
$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);
|
||||
// Set a template file
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'file_module_config');
|
||||
$obj .= $tpl;
|
||||
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
?>
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
/* End of file file.view.php */
|
||||
/* Location: ./modules/file/file.view.php */
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
<value xml:lang="vi"><![CDATA[Đính kèm]]></value>
|
||||
<value xml:lang="mn"><![CDATA[file]]></value>
|
||||
</item>
|
||||
<item name="file_upload">
|
||||
<value xml:lang="ko"><![CDATA[파일 업로드]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Upload]]></value>
|
||||
</item>
|
||||
<item name="file_name">
|
||||
<value xml:lang="ko"><![CDATA[파일 이름]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Name]]></value>
|
||||
|
|
@ -99,7 +103,7 @@
|
|||
<value xml:lang="vi"><![CDATA[Danh sách đính kèm]]></value>
|
||||
</item>
|
||||
<item name="allow_outlink">
|
||||
<value xml:lang="ko"><![CDATA[다른 사이트에서 첨부파일 링크하는 것을 허용할까요?]]></value>
|
||||
<value xml:lang="ko"><![CDATA[파일 외부 링크]]></value>
|
||||
<value xml:lang="en"><![CDATA[Allow External Link?]]></value>
|
||||
<value xml:lang="jp"><![CDATA[外部からのファイルリンク]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[防盗链]]></value>
|
||||
|
|
@ -129,7 +133,7 @@
|
|||
<value xml:lang="vi"><![CDATA[Những định dạng cho phép]]></value>
|
||||
</item>
|
||||
<item name="allowed_filesize">
|
||||
<value xml:lang="ko"><![CDATA[파일 제한 크기]]></value>
|
||||
<value xml:lang="ko"><![CDATA[파일 크기 제한]]></value>
|
||||
<value xml:lang="en"><![CDATA[Maximum File Size]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイルサイズ制限]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[文件大小限制]]></value>
|
||||
|
|
@ -177,14 +181,14 @@
|
|||
<value xml:lang="vi"><![CDATA[Nhóm được phép Download]]></value>
|
||||
</item>
|
||||
<item name="about_allow_outlink">
|
||||
<value xml:lang="ko"><![CDATA[리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다. (*.wmv, *.mp3등 미디어 파일 제외)]]></value>
|
||||
<value xml:lang="en"><![CDATA[You can block external links according to referers (except media files like *.wmv and *.mp3).]]></value>
|
||||
<value xml:lang="ko"><![CDATA[리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)]]></value>
|
||||
<value xml:lang="en"><![CDATA[You can block external links according to referers(except media files like *.wmv and *.mp3).]]></value>
|
||||
<value xml:lang="jp"><![CDATA[リファラーによって外部からのファイルリンクを制御できます。(*.wmv, *.mp3などのメディアファイルは除く)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[根据反向链接防止盗链。(*.wmv, *.mp3等媒体文件除外)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[是否允許連結外部檔案。(*.wmv, *.mp3等影音檔案除外)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Enlaces externos a Rusia Ripper puede bloquear el archivo. (*. WMV, *. mp3, etc, excepto los archivos multimedia)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dış bağlantıları kapatabilirsiniz. (*.wmv, *.mp3 gibi ortam dosyaları hariç)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Enlaces externos a Rusia Ripper puede bloquear el archivo.(*. WMV, *. mp3, etc, excepto los archivos multimedia)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dış bağlantıları kapatabilirsiniz.(*.wmv, *.mp3 gibi ortam dosyaları hariç)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[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)]]></value>
|
||||
</item>
|
||||
<item name="about_allow_outlink_format">
|
||||
|
|
@ -193,7 +197,7 @@
|
|||
<value xml:lang="jp"><![CDATA[外部からのファイルリンク設定に関係なく、常に外部からのリンクを許可する拡張子です。複数登録時には、「半角コンマ(,)」区切りで記入してください。 eg)txt,doc,zip,pdf]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[設定允許外部連結的檔案格式。可以用逗號(,)來區隔多個副檔名。 例) hwp, doc, zip, pdf]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Bu biçimlere her zaman izin verilecektir. Lütfen çoklu giriş için virgül(,) kullanınız. örn.)hwp,doc,zip,pdf]]></value>
|
||||
<value xml:lang="vi"><![CDATA[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 . Ví dụ: .hwp, .doc, .zip, .pdf]]></value>
|
||||
<value xml:lang="vi"><![CDATA[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 . Ví dụ: .hwp, .doc, .zip, .pdf]]></value>
|
||||
</item>
|
||||
<item name="about_allow_outlink_site">
|
||||
<value xml:lang="ko"><![CDATA[파일 외부 링크 설정에 상관없이 허용하는 사이트 주소입니다. 여러 개 입력 시에 줄을 바꿔서 구분해주세요. 예)http://www.xpressengine.com]]></value>
|
||||
|
|
@ -208,28 +212,28 @@
|
|||
<value xml:lang="vi"><![CDATA[Những Website được phép liên kết. Hãy nhập địa chỉ của những Website được phép. Ví dụ: http://xpressengine.com/]]></value>
|
||||
</item>
|
||||
<item name="about_allowed_filesize">
|
||||
<value xml:lang="ko"><![CDATA[하나의 파일에 대해 최고 용량을 지정할 수 있습니다. (관리자는 제외)]]></value>
|
||||
<value xml:lang="en"><![CDATA[You can assign file size limit for each file. (Exclude administrators)]]></value>
|
||||
<value xml:lang="ko"><![CDATA[하나의 파일에 대해 최고 용량을 지정할 수 있습니다.(관리자는 제외)]]></value>
|
||||
<value xml:lang="en"><![CDATA[You can assign file size limit for each file.(Exclude administrators)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[一つのファイルに対して、アップロード可能なファイルの最大サイズを指定します(管理者は除く)。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[最大单个上传文件大小(管理员不受此限制)。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[最大單一上傳檔案大小 (管理員不受此限制)。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez designer la limite de mesure pour chaque fichier. (Exclure administrateurs)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Вы можете присвоить лимит размера для каждого файла. (Исключая администраторов)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Puede definir el límite del tamaño del archivo adjunto. (exceptuando el administrador)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Her dosya için dosya boyut limiti atayabilirsiniz. (Yöneticiler için limitsizdir)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Giới hạn dung lượng mỗi File đính kèm. (Ngoại trừ Administrators)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[最大單一上傳檔案大小(管理員不受此限制)。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez designer la limite de mesure pour chaque fichier.(Exclure administrateurs)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Вы можете присвоить лимит размера для каждого файла.(Исключая администраторов)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Puede definir el límite del tamaño del archivo adjunto.(exceptuando el administrador)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Her dosya için dosya boyut limiti atayabilirsiniz.(Yöneticiler için limitsizdir)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Giới hạn dung lượng mỗi File đính kèm.(Ngoại trừ Administrators)]]></value>
|
||||
</item>
|
||||
<item name="about_allowed_attach_size">
|
||||
<value xml:lang="ko"><![CDATA[하나의 문서에 첨부할 수 있는 최고 용량을 지정할 수 있습니다. (관리자는 제외)]]></value>
|
||||
<value xml:lang="en"><![CDATA[You can assign file size limit for each document. (Exclude administrators)]]></value>
|
||||
<value xml:lang="ko"><![CDATA[하나의 문서에 첨부할 수 있는 최고 용량을 지정할 수 있습니다.(관리자는 제외)]]></value>
|
||||
<value xml:lang="en"><![CDATA[You can assign file size limit for each document.(Exclude administrators)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[一つの書き込みに対して、管理者以外のユーザーが添付可能な最大サイズを指定します。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[每个主题最大上传文件大小(管理员不受此限制)。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[每個主題最大上傳檔案大小 (管理員不受此限制)。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez designer la limite de mesure pour chaque document. (Exclure administrateurs)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Вы можете присвоить лимит размера для каждого документа. (Исключая администраторов]]></value>
|
||||
<value xml:lang="es"><![CDATA[Puede definir el límite del tamaño total de los archivos adjuntos por documento. (exceptuando el administrador)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Her belge için dosya boyutu limiti atayabilirsiniz. (Yöneticiler için limitsizdir)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[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)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[每個主題最大上傳檔案大小(管理員不受此限制)。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez designer la limite de mesure pour chaque document.(Exclure administrateurs)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Вы можете присвоить лимит размера для каждого документа.(Исключая администраторов]]></value>
|
||||
<value xml:lang="es"><![CDATA[Puede definir el límite del tamaño total de los archivos adjuntos por documento.(exceptuando el administrador)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Her belge için dosya boyutu limiti atayabilirsiniz.(Yöneticiler için limitsizdir)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[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)]]></value>
|
||||
</item>
|
||||
<item name="about_allowed_filetypes">
|
||||
<value xml:lang="ko"><![CDATA["*.확장자"로 지정할 수 있고 ";" 으로 여러 개 지정이 가능합니다. 예) *.* or *.jpg;*.gif;]]></value>
|
||||
|
|
@ -241,7 +245,7 @@
|
|||
<value xml:lang="ru"><![CDATA[Чтобы разрешить расширение, ипользуйте "*.расширение". Чтобы разрешить несколько расширений, используйте ";" между ними. например: *.* или *.jpg;*.gif;]]></value>
|
||||
<value xml:lang="es"><![CDATA[Para permitir una extensión use "*.extensión". Para permitir más de una extensión use ";". ej) *.* o *.jpg;*.gif;etc.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Bir uzantıya izin vermek için, "*.[uzantı]" komutunu kullanınız. Birden fazla eklentiye izin vermek için, her uzantının arasına ";" koyunuz. örn.) *.* veya *.jpg;*.gif; ]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Để thêm những dạng File được phép đính kèm, bạn sử dụng "*.[đuôi]". Để 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. Ví dụ: *.* (Cho phép tất cả) hay *.jpg;*.gif;]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Để thêm những dạng File được phép đính kèm, bạn sử dụng "*.[đuôi]". Để 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. Ví dụ: *.*(Cho phép tất cả) hay *.jpg;*.gif;]]></value>
|
||||
</item>
|
||||
<item name="cmd_delete_checked_file">
|
||||
<value xml:lang="ko"><![CDATA[선택항목 삭제]]></value>
|
||||
|
|
@ -290,7 +294,7 @@
|
|||
<value xml:lang="tr"><![CDATA[İndirmek için izniniz yok]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Bạn không được quyền Download.]]></value>
|
||||
</item>
|
||||
<item name="msg_cart_is_null">
|
||||
<item name="msg_file_cart_is_null">
|
||||
<value xml:lang="ko"><![CDATA[삭제할 파일을 선택해주세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Please select a file(s) to delete.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[削除するファイルを選択してください]]></value>
|
||||
|
|
@ -327,7 +331,7 @@
|
|||
<value xml:lang="vi"><![CDATA[Dung lượng File quá lớn.]]></value>
|
||||
</item>
|
||||
<item name="msg_file_not_found">
|
||||
<value xml:lang="ko"><![CDATA[요청하신 파일을 찾을 수 없습니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[요청한 파일을 찾을 수 없습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Could not find requested file.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイルが見つかりません。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[无法找到该文件。]]></value>
|
||||
|
|
@ -350,63 +354,63 @@
|
|||
<value xml:lang="vi"><![CDATA[Tên File]]></value>
|
||||
</item>
|
||||
<item name="filesize_more">
|
||||
<value xml:lang="ko"><![CDATA[파일 크기 (byte, 이상)]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Size (byte, more)]]></value>
|
||||
<value xml:lang="ko"><![CDATA[파일 크기(byte, 이상)]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Size(byte, more)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイルサイズ((Byte以上)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[文件大小 (byte, 以上)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[檔案大小 (byte, 以上)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Mesure de Fichier (octet, surplus)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Размер файла (Байт, свыше)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Tamaño del archivo (Byte, sobre)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dosya Boyutu (byte, üstü)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Dung lượng (Tối thiểu Byte)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[文件大小(byte, 以上)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[檔案大小(byte, 以上)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Mesure de Fichier(octet, surplus)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Размер файла(Байт, свыше)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Tamaño del archivo(Byte, sobre)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dosya Boyutu(byte, üstü)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Dung lượng(Tối thiểu Byte)]]></value>
|
||||
</item>
|
||||
<item name="filesize_mega_more">
|
||||
<value xml:lang="ko"><![CDATA[파일 크기 (MB, 이상)]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Size (mbyte, more)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイルサイズ (Mb、以上)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[文件大小 (Mb, 以上)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[檔案大小 (Mb, 以上)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[파일크기 (Mb, 이상)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Размер файла (Мегабайт, свыше)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Tamaño del archivo (Mb, o mb)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dosya Boyutu (mbyte, üstü)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Dung lượng (Tối thiểu MB)]]></value>
|
||||
<value xml:lang="ko"><![CDATA[파일 크기(MB, 이상)]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Size(mbyte, more)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイルサイズ(Mb、以上)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[文件大小(Mb, 以上)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[檔案大小(Mb, 以上)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[파일크기(Mb, 이상)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Размер файла(Мегабайт, свыше)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Tamaño del archivo(Mb, o mb)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dosya Boyutu(mbyte, üstü)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Dung lượng(Tối thiểu MB)]]></value>
|
||||
</item>
|
||||
<item name="filesize_less">
|
||||
<value xml:lang="ko"><![CDATA[파일 크기 (byte, 이하)]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Size (byte, less)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイルサイズ (byte, 以下)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[文件大小 (byte, 以下)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[檔案大小 (byte, 以下)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[파일크기 (byte, 이하)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Размер файла (Байт, ниже)]]></value>
|
||||
<value xml:lang="es"><![CDATA[파일크기 (byte, 이하)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dosya Boyutu (byte, düşük)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Dung lượng (Tối đa Byte)]]></value>
|
||||
<value xml:lang="ko"><![CDATA[파일 크기(byte, 이하)]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Size(byte, less)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイルサイズ(byte, 以下)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[文件大小(byte, 以下)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[檔案大小(byte, 以下)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[파일크기(byte, 이하)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Размер файла(Байт, ниже)]]></value>
|
||||
<value xml:lang="es"><![CDATA[파일크기(byte, 이하)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dosya Boyutu(byte, düşük)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Dung lượng(Tối đa Byte)]]></value>
|
||||
</item>
|
||||
<item name="filesize_mega_less">
|
||||
<value xml:lang="ko"><![CDATA[파일 크기 (MB, 이하)]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Size (Mb, less)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイルサイズ (Mb, 以下)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[文件大小 (Mb, 以下)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[檔案大小 (Mb, 以下)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[파일크기 (Mb, 이하)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Размер файла (Мегабайт, ниже)]]></value>
|
||||
<value xml:lang="es"><![CDATA[파일크기 (Mb, 이하)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dosya Boyutu (Mb, düşük)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Dung lượng (Tối đa MB)]]></value>
|
||||
<value xml:lang="ko"><![CDATA[파일 크기(MB, 이하)]]></value>
|
||||
<value xml:lang="en"><![CDATA[File Size(Mb, less)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイルサイズ(Mb, 以下)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[文件大小(Mb, 以下)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[檔案大小(Mb, 以下)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[파일크기(Mb, 이하)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Размер файла(Мегабайт, ниже)]]></value>
|
||||
<value xml:lang="es"><![CDATA[파일크기(Mb, 이하)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Dosya Boyutu(Mb, düşük)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Dung lượng(Tối đa MB)]]></value>
|
||||
</item>
|
||||
<item name="download_count">
|
||||
<value xml:lang="ko"><![CDATA[다운로드 횟수 (이상)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Downloads (more)]]></value>
|
||||
<value xml:lang="ko"><![CDATA[다운로드 횟수(이상)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Downloads(more)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ダウンロード数(以上)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[下载次数 (以上)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[下載次數 (以上)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Telecharges (surplus)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Скачано (свыше)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Descargados (Sobre)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[İndirmeler (daha fazla)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[下载次数(以上)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[下載次數(以上)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Telecharges(surplus)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Скачано(свыше)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Descargados(Sobre)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[İndirmeler(daha fazla)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Lượt Download]]></value>
|
||||
</item>
|
||||
<item name="user_id">
|
||||
|
|
|
|||
7
modules/file/ruleset/imageResize.xml
Normal file
7
modules/file/ruleset/imageResize.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<fields>
|
||||
<field name="width" required="true" rule="number" />
|
||||
<field name="file_srl" required="true" rule="number" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
@ -1,46 +1,58 @@
|
|||
<load target="js/fileConfig.js" type="body" usecdn="true" />
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->file_upload} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_fileupload" target="_blank">{$lang->help}</a></h1>
|
||||
</div>
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/file/tpl/adminConfig/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="insertConfig" action="./" method="post" class="form">
|
||||
|
||||
<form ruleset="insertConfig" action="./" method="post" class="x_form-horizontal section">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminInsertConfig" />
|
||||
<h1 class="h1">File Upload</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q"><label>{$lang->allow_outlink}</label></p>
|
||||
<p class="a">
|
||||
<input type="radio" name="allow_outlink" value="Y" id="allow_outlink_y" checked="checked"|cond="$config->allow_outlink == 'Y'" /> <label for="allow_outlink_y">{$lang->cmd_yes}</label>
|
||||
<input type="radio" name="allow_outlink" value="N" id="allow_outlink_n" checked="checked"|cond="$config->allow_outlink == 'N'" /> <label for="allow_outlink_n">{$lang->cmd_no}</label>
|
||||
</p>
|
||||
</li>
|
||||
<li style="display:none"|cond="$config->allow_outlink == 'N'" class="_outLink">
|
||||
<p class="q"><label for="allow_outlink_format">{$lang->allow_outlink_format}</label></p>
|
||||
<p class="a"><input type="text" name="allow_outlink_format" id="allow_outlink_format" value="{$config->allow_outlink_format}" /></p>
|
||||
<p class="desc">{$lang->about_allow_outlink_format}</p>
|
||||
|
||||
</li>
|
||||
<li style="display:none"|cond="$config->allow_outlink == 'N'" class="_outLink">
|
||||
<p class="q"><label for="allow_outlink_site">{$lang->allow_outlink_site}</label></p>
|
||||
<p class="a"><textarea name="allow_outlink_site" id="allow_outlink_site" rows="8" cols="42">{$config->allow_outlink_site}</textarea></p>
|
||||
<p class="desc">{$lang->about_allow_outlink_site}</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="filesize">{$lang->about_allowed_filesize}</label></p>
|
||||
<p class="a"><input id="filesize" type="text" name="allowed_filesize" value="{$config->allowed_filesize}" style="width:40px" /> MB</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="attachSize">{$lang->about_allowed_attach_size}</label></p>
|
||||
<p class="a"><input id="attachSize" type="text" name="allowed_attach_size" value="{$config->allowed_attach_size}" style="width:40px" /> MB</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="allowedFiletypes">{$lang->allowed_filetypes}</label></p>
|
||||
<p class="a"><input id="allowedFiletypes" type="text" name="allowed_filetypes" value="{$config->allowed_filetypes}" /></p>
|
||||
<p class="desc">{$lang->about_allowed_filetypes}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn medium"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
<input type="hidden" name="xe_validator_id" value="modules/file/tpl/adminConfig/1" />
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->allow_outlink} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_file_outlink" target="_blank">{$lang->help}</a></label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline"><input type="radio" name="allow_outlink" id="allow_outlink_y" value="Y" checked="checked"|cond="$config->allow_outlink == 'Y'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline"><input type="radio" name="allow_outlink" value="N" checked="checked"|cond="$config->allow_outlink == 'N'" /> {$lang->cmd_no}</label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="allow_outlink_format">{$lang->allow_outlink_format}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="allow_outlink_format" id="allow_outlink_format" value="{$config->allow_outlink_format}" />
|
||||
<p class="x_help-inline">{$lang->about_allow_outlink_format}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="allow_outlink_site">{$lang->allow_outlink_site}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="allow_outlink_site" id="allow_outlink_site" rows="4" cols="42" style="float:left;margin-right:10px">{$config->allow_outlink_site}</textarea>
|
||||
<p class="x_help-block">{$lang->about_allow_outlink_site}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="filesize" class="x_control-label">{$lang->allowed_filesize} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_file_size" target="_blank">{$lang->help}</a></label>
|
||||
<div class="x_controls">
|
||||
<input type="number" id="filesize" name="allowed_filesize" value="{$config->allowed_filesize}" /> MB/{ini_get('upload_max_filesize')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="attachSize" class="x_control-label">{$lang->allowed_attach_size} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_file_document_attach_limit" target="_blank">{$lang->help}</a></label>
|
||||
<div class="x_controls">
|
||||
<input type="number" id="attachSize" name="allowed_attach_size" value="{$config->allowed_attach_size}" /> MB
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="allowedFiletypes" class="x_control-label">{$lang->allowed_filetypes}</label>
|
||||
<div class="x_controls">
|
||||
<input id="allowedFiletypes" type="text" name="allowed_filetypes" value="{$config->allowed_filetypes}" />
|
||||
<p class="x_help-inline">{$lang->about_allowed_filetypes}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
<!--#include("header.html")-->
|
||||
<!--%import("filter/insert_config.xml")-->
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="insertConfig" action="./" method="post" class="form">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminInsertConfig" />
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="col">{$lang->allow_outlink}</th>
|
||||
<td class="text">
|
||||
<select name="allow_outlink">
|
||||
<option value="Y"<!--@if($config->allow_outlink=='Y')--> selected="selected"<!--@end-->>{$lang->enable}</option>
|
||||
<option value="N"<!--@if($config->allow_outlink=='N')--> selected="selected"<!--@end-->>{$lang->disable}</option>
|
||||
</select>
|
||||
<p>{$lang->about_allow_outlink}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allow_outlink_format}</th>
|
||||
<td class="text">
|
||||
<input type="text" name="allow_outlink_format" value="{$config->allow_outlink_format}" />
|
||||
<p>{$lang->about_allow_outlink_format}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allow_outlink_site}</th>
|
||||
<td class="text">
|
||||
<textarea name="allow_outlink_site" rows="8" cols="42">{$config->allow_outlink_site}</textarea>
|
||||
<p>{$lang->about_allow_outlink_site}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allowed_filesize}</th>
|
||||
<td class="text">
|
||||
<input type="text" name="allowed_filesize" value="{$config->allowed_filesize}" size="3" />MB
|
||||
<p>{$lang->about_allowed_filesize}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allowed_attach_size}</th>
|
||||
<td class="text">
|
||||
<input type="text" name="allowed_attach_size" value="{$config->allowed_attach_size}" size="3" />MB
|
||||
/ {ini_get('upload_max_filesize')}
|
||||
<p>{$lang->about_allowed_attach_size}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->allowed_filetypes}</th>
|
||||
<td class="text">
|
||||
<input type="text" name="allowed_filetypes" value="{$config->allowed_filetypes}" />
|
||||
<p>{$lang->about_allowed_filetypes}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -1,186 +1,206 @@
|
|||
<script type="text/javascript">
|
||||
<script>
|
||||
xe.lang.msg_empty_search_target = '{$lang->msg_empty_search_target}';
|
||||
xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
||||
</script>
|
||||
<load target="js/file_admin.js" usecdn="true" />
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form id="fo_list" action="./" method="post" class="form">
|
||||
<form id="fo_list" action="./" method="post">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<h1 class="h1">{$lang->file}</h1>
|
||||
<div class="table">
|
||||
<div class="cnb">
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispFileAdminList')}" <!--@if($search_keyword == '')-->class="active"<!--@end-->>All</a>
|
||||
| <a href="{getUrl('search_target','isvalid','search_keyword','Y')}" <!--@if($search_target == 'isvalid' && $search_keyword == 'Y')-->class="active"<!--@end-->>{$lang->is_valid}</a>
|
||||
| <a href="{getUrl('search_target','isvalid','search_keyword','N')}" <!--@if($search_target == 'isvalid' && $search_keyword == 'N')-->class="active"<!--@end-->>{$lang->is_stand_by}</a>
|
||||
</div>
|
||||
<table width="100%" border="1" cellspacing="0" id="fileListTable">
|
||||
<caption>
|
||||
<!--@if($search_keyword == '')-->
|
||||
All
|
||||
<!--@elseif($search_target == 'isvalid' && $search_keyword == 'Y')-->
|
||||
{$lang->is_valid}
|
||||
<!--@elseif($search_target == 'isvalid' && $search_keyword == 'N')-->
|
||||
{$lang->is_stand_by}
|
||||
<!--@end-->
|
||||
({number_format($total_count)})
|
||||
<span class="side"><span class="btn"><a href="#listManager" class="modalAnchor" onclick="getFileList();">{$lang->file_manager}...</a></span></span>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text">{$lang->file}</th>
|
||||
<th scope="col" class="nowr">{$lang->file_size}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_download}</th>
|
||||
<th scope="col" class="nowr">{$lang->author}</th>
|
||||
<th scope="col" class="nowr">{$lang->date}</th>
|
||||
<th scope="col" class="nowr">{$lang->ipaddress}</th>
|
||||
<th scope="col" class="nowr">{$lang->status}</th>
|
||||
<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col" class="text">{$lang->file}</th>
|
||||
<th scope="col" class="nowr">{$lang->file_size}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_download}</th>
|
||||
<th scope="col" class="nowr">{$lang->author}</th>
|
||||
<th scope="col" class="nowr">{$lang->date}</th>
|
||||
<th scope="col" class="nowr">{$lang->ipaddress}</th>
|
||||
<th scope="col" class="nowr">{$lang->status}</th>
|
||||
<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<!--@foreach($file_list as $no => $val)-->
|
||||
<!-- one document start -->
|
||||
<!--@if($val->upload_target_srl != $cur_upload_target_srl)-->
|
||||
<!--@if($val->upload_target_type == 'com')-->
|
||||
{@ $document_srl = $val->target_document_srl}
|
||||
{@ $move_uri = getUrl('', 'document_srl', $document_srl).'#comment_'.$val->upload_target_srl}
|
||||
<!--@elseif($val->upload_target_type == 'doc')-->
|
||||
{@ $document_srl = $val->upload_target_srl}
|
||||
{@ $move_uri = getUrl('', 'document_srl', $document_srl)}
|
||||
<!--@end-->
|
||||
{@ $cur_upload_target_srl = $val->upload_target_srl}
|
||||
<tr>
|
||||
<th colspan="8" class="text" scope="col">
|
||||
<!--@if(!$val->upload_target_type)-->
|
||||
<!--@if($val->isvalid=='Y')-->
|
||||
{$lang->is_valid}
|
||||
<!--@else-->
|
||||
{$lang->is_stand_by}
|
||||
<!--@end-->
|
||||
<!--@else-->
|
||||
<!--@if($val->upload_target_type == 'com')-->[{$lang->comment}] <!--@end-->
|
||||
<!--@if($val->upload_target_type == 'mod')-->[{$lang->module}] <!--@end-->
|
||||
|
||||
<!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl] && $document_list[$document_srl]->get('module_srl') == $document_list[$document_srl]->get('member_srl'))-->[{$lang->cmd_temp_save}] <!--@end-->
|
||||
<!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl] && $document_list[$document_srl]->get('module_srl') == 0)-->[{$lang->cmd_trash}] <!--@end-->
|
||||
<a href="{getUrl('', 'mid', $module_list[$val->module_srl]->mid)}" target="_blank">{$module_list[$val->module_srl]->browser_title}</a>
|
||||
<!--@if($document_list[$document_srl] && ($val->upload_target_type == 'doc' || $val->upload_target_type == 'com'))-->
|
||||
- <!--@if($document_list[$document_srl]->get('module_srl') != $document_list[$document_srl]->get('member_srl'))--><a href="{$move_uri}" target="_blank">{$document_list[$document_srl]->getTitle()}</a><!--@else-->{$document_list[$document_srl]->getTitle()}<!--@end-->
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</th>
|
||||
</tr>
|
||||
<!--@endif-->
|
||||
<!-- one document end -->
|
||||
<tr>
|
||||
<td class="text"><a href="{$val->download_url}">{htmlspecialchars($val->source_filename)}</a></td>
|
||||
<td class="nowr">{FileHandler::filesize($val->file_size)}</td>
|
||||
<td class="nowr">{$val->download_count}</td>
|
||||
<td class="nowr">
|
||||
<!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl])-->
|
||||
<a href="#popup_menu_area" class="member_{$document_list[$document_srl]->get('member_srl')}">{$document_list[$document_srl]->getNickName()}</a>
|
||||
<!--@elseif($val->upload_target_type == 'com' && $comment_list[$val->upload_target_srl])-->
|
||||
<a href="#popup_menu_area" class="member_{$comment_list[$val->upload_target_srl]->get('member_srl')}">{$comment_list[$val->upload_target_srl]->getNickName()}</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td class="nowr">{zdate($val->regdate,"Y-m-d H:i")}</td>
|
||||
<td class="nowr"><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
|
||||
<td class="nowr"><!--@if($val->isvalid=='Y')-->{$lang->is_valid}<!--@else-->{$lang->is_stand_by}<!--@end--></td>
|
||||
<td>
|
||||
<input type="checkbox" name="cart" value="{$val->file_srl}" />
|
||||
</td>
|
||||
</tr>
|
||||
<!--@endforeach-->
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="#listManager" class="modalAnchor" onclick="getFileList();">{$lang->file_manager}...</a></span>
|
||||
</div>
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->file} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_content_file" target="_blank">{$lang->help}</a></h1>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/file/tpl/file_list/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<table id="fileListTable" class="x_table x_table-striped x_table-hover">
|
||||
<caption>
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispFileAdminList')}" class="active"|cond="$search_keyword == ''">{$lang->all}<block cond="$search_keyword == ''">({number_format($total_count)})</block></a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('search_target','isvalid','search_keyword','Y')}" class="active"|cond="$search_target == 'isvalid' && $search_keyword == 'Y'">{$lang->is_valid}<block cond="$search_target == 'isvalid' && $search_keyword == 'Y'">({number_format($total_count)})</block></a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('search_target','isvalid','search_keyword','N')}" class="active"|cond="$search_target == 'isvalid' && $search_keyword == 'N'">{$lang->is_stand_by}<block cond="$search_target == 'isvalid' && $search_keyword == 'N'">({number_format($total_count)})</block></a>
|
||||
<a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_faq_file_status" target="_blank">{$lang->help}</a>
|
||||
|
||||
<span class="x_pull-right"><a href="#listManager" class="x_btn modalAnchor" onclick="getFileList();">{$lang->delete}</a></span>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->file}</th>
|
||||
<th scope="col" class="nowr">{$lang->file_size}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_download}</th>
|
||||
<th scope="col" class="nowr">{$lang->author}</th>
|
||||
<th scope="col" class="nowr">{$lang->date}</th>
|
||||
<th scope="col" class="nowr">{$lang->ipaddress}</th>
|
||||
<th scope="col" class="nowr">{$lang->status}</th>
|
||||
<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($file_list as $no => $val)-->
|
||||
<!-- one document start -->
|
||||
<!--@if($val->upload_target_srl != $cur_upload_target_srl)-->
|
||||
<!--@if($val->upload_target_type == 'com')-->
|
||||
{@ $document_srl = $val->target_document_srl}
|
||||
{@ $move_uri = getUrl('', 'document_srl', $document_srl).'#comment_'.$val->upload_target_srl}
|
||||
<!--@elseif($val->upload_target_type == 'doc')-->
|
||||
{@ $document_srl = $val->upload_target_srl}
|
||||
{@ $move_uri = getUrl('', 'document_srl', $document_srl)}
|
||||
<!--@end-->
|
||||
{@ $cur_upload_target_srl = $val->upload_target_srl}
|
||||
<tr>
|
||||
<th colspan="8" scope="col">
|
||||
<!--@if(!$val->upload_target_type)-->
|
||||
<!--@if($val->isvalid=='Y')-->
|
||||
{$lang->is_valid}
|
||||
<!--@else-->
|
||||
{$lang->is_stand_by}
|
||||
<!--@end-->
|
||||
<!--@else-->
|
||||
<!--@if($val->upload_target_type == 'com')-->[{$lang->comment}] <!--@end-->
|
||||
<!--@if($val->upload_target_type == 'mod')-->[{$lang->module}] <!--@end-->
|
||||
|
||||
<!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl] && $document_list[$document_srl]->get('module_srl') == $document_list[$document_srl]->get('member_srl'))-->[{$lang->cmd_temp_save}] <!--@end-->
|
||||
<!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl] && $document_list[$document_srl]->get('module_srl') == 0)-->[{$lang->cmd_trash}] <!--@end-->
|
||||
<a href="{getUrl('', 'mid', $module_list[$val->module_srl]->mid)}" target="_blank">{$module_list[$val->module_srl]->browser_title}</a>
|
||||
<!--@if($document_list[$document_srl] && ($val->upload_target_type == 'doc' || $val->upload_target_type == 'com'))-->
|
||||
- <!--@if($document_list[$document_srl]->get('module_srl') != $document_list[$document_srl]->get('member_srl'))--><a href="{$move_uri}" target="_blank">{$document_list[$document_srl]->getTitle()}</a><!--@else-->{$document_list[$document_srl]->getTitle()}<!--@end-->
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</th>
|
||||
</tr>
|
||||
<!--@endif-->
|
||||
<!-- one document end -->
|
||||
<tr>
|
||||
<td><a href="{$val->download_url}">{htmlspecialchars($val->source_filename)}</a></td>
|
||||
<td class="nowr">{FileHandler::filesize($val->file_size)}</td>
|
||||
<td class="nowr">{$val->download_count}</td>
|
||||
<td class="nowr">
|
||||
<!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl])-->
|
||||
<a href="#popup_menu_area" class="member_{$document_list[$document_srl]->get('member_srl')}">{$document_list[$document_srl]->getNickName()}</a>
|
||||
<!--@elseif($val->upload_target_type == 'com' && $comment_list[$val->upload_target_srl])-->
|
||||
<a href="#popup_menu_area" class="member_{$comment_list[$val->upload_target_srl]->get('member_srl')}">{$comment_list[$val->upload_target_srl]->getNickName()}</a>
|
||||
<!--@else-->
|
||||
<a href="#popup_menu_area" class="member_{$val->member_srl}">{$val->nick_name}</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td class="nowr">{zdate($val->regdate,"Y-m-d H:i")}</td>
|
||||
<td class="nowr"><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
|
||||
<td class="nowr"><!--@if($val->isvalid=='Y')-->{$lang->is_valid}<!--@else-->{$lang->is_stand_by}<!--@end--></td>
|
||||
<td>
|
||||
<input type="checkbox" name="cart" value="{$val->file_srl}" />
|
||||
</td>
|
||||
</tr>
|
||||
<!--@endforeach-->
|
||||
<tr cond="!$file_list">
|
||||
<td>{$lang->no_files}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<span class="x_pull-right">
|
||||
<a href="#listManager" class="x_btn modalAnchor" onclick="getFileList();">{$lang->delete}</a>
|
||||
</span>
|
||||
</form>
|
||||
<div class="modal" id="listManager">
|
||||
<form ruleset="deleteChecked" action="./" method="post" class="fg form">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminDeleteChecked" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<h2 class="h2">{$lang->file_manager}</h2>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0" id="fileManageListTable">
|
||||
<caption>{$lang->selected_file} <strong id="selectedFileCount"></strong></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text">{$lang->file}</th>
|
||||
<th scope="col" class="nowr">{$lang->file_size}</th>
|
||||
<th scope="col" class="nowr">{$lang->status}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_delete}" class="delete" /></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="search">
|
||||
<form action="" class="pagination">
|
||||
|
||||
<form action="" class="x_pagination">
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
|
||||
<input cond="$search_target" type="hidden" name="search_target" value="{$search_target}" />
|
||||
|
||||
<a href="{getUrl('page', '')}" class="direction">« FIRST</a>
|
||||
<block cond="$page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page && $page_navigation->page_count != $page_navigation->total_page">
|
||||
<ul>
|
||||
<li class="x_disabled"|cond="!$page || $page == 1"><a href="{getUrl('page', '')}">« {$lang->first_page}</a></li>
|
||||
<block cond="$page_navigation->first_page != 1 && $page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page - 1 && $page_navigation->page_count != $page_navigation->total_page">
|
||||
{@$isGoTo = true}
|
||||
<a href="{getUrl('page', '')}">1</a>
|
||||
<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
|
||||
</block>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<li>
|
||||
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">…</a>
|
||||
<span cond="$isGoTo" id="goTo" class="x_input-append">
|
||||
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
|
||||
<button type="submit" class="x_add-on">Go</button>
|
||||
</span>
|
||||
</li>
|
||||
</block>
|
||||
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
{@$last_page = $page_no}
|
||||
<strong cond="$page_no == $page">{$page_no}</strong>
|
||||
<a cond="$page_no != $page" href="{getUrl('page', $page_no)}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<block cond="$last_page != $page_navigation->last_page">
|
||||
<li class="x_active"|cond="$page_no == $page"><a href="{getUrl('page', $page_no)}">{$page_no}</a></li>
|
||||
<!--@end-->
|
||||
|
||||
<block cond="$last_page != $page_navigation->last_page && $last_page + 1 != $page_navigation->last_page">
|
||||
{@$isGoTo = true}
|
||||
<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
|
||||
</block>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">LAST »</a>
|
||||
<span cond="$isGoTo" id="goTo" class="tgContent">
|
||||
<input name="page" title="{$lang->cmd_go_to_page}" />
|
||||
<button type="submit">Go</button>
|
||||
</span>
|
||||
<li>
|
||||
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">…</a>
|
||||
<span cond="$isGoTo" id="goTo" class="x_input-append">
|
||||
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
|
||||
<button type="submit" class="x_add-on">Go</button>
|
||||
</span>
|
||||
</li>
|
||||
</block>
|
||||
<li class="x_disabled"|cond="$page == $page_navigation->last_page"><a href="{getUrl('page', $page_navigation->last_page)}" title="{$page_navigation->last_page}">{$lang->last_page} »</a></li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
<form action="./" method="get" onsubmit="return checkSearch(this)">
|
||||
<form action="./" method="get" onsubmit="return checkSearch(this)" class="search center x_input-append">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<select name="search_target">
|
||||
<option value="">{$lang->search_target}</option>
|
||||
<!--@foreach($lang->file_search_target_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||
<input type="submit" value="{$lang->cmd_search}" />
|
||||
<a href="{getUrl('','module',$module,'act',$act)}"><span>{$lang->cmd_cancel}</span></a>
|
||||
</form>
|
||||
</div>
|
||||
<select name="search_target" title="{$lang->search_target}" style="margin-right:4px">
|
||||
<!--@foreach($lang->file_search_target_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="search" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||
<button type="submit" class="x_btn x_btn-inverse">{$lang->cmd_search}</button>
|
||||
<a href="{getUrl('','module',$module,'act',$act)}" class="x_btn">{$lang->cmd_cancel}</a>
|
||||
</form>
|
||||
|
||||
<form ruleset="deleteChecked" action="./" method="post" class="x_modal" id="listManager">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminDeleteChecked" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/file/tpl/file_list/1" />
|
||||
<div class="x_modal-header">
|
||||
<h1>{$lang->file_manager}: {$lang->delete}</h1>
|
||||
</div>
|
||||
<div class="x_modal-body">
|
||||
<table width="100%" id="fileManageListTable" class="x_table x_table-striped x_table-hover">
|
||||
<caption>
|
||||
<strong>{$lang->selected_file} <span id="selectedFileCount"></span></strong>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->file}</th>
|
||||
<th scope="col" class="nowr">{$lang->file_size}</th>
|
||||
<th scope="col" class="nowr">{$lang->status}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="x_modal-footer">
|
||||
<button type="submit" class="x_btn x_btn-inverse">{$lang->cmd_delete}</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
jQuery(function($){
|
||||
// Modal anchor activation
|
||||
var $docTable = $('#fileListTable');
|
||||
$docTable.find(':checkbox').change(function(){
|
||||
var $modalAnchor = $('a.modalAnchor');
|
||||
if($docTable.find('tbody :checked').length == 0){
|
||||
$modalAnchor.removeAttr('href').addClass('x_disabled');
|
||||
} else {
|
||||
$modalAnchor.attr('href','#listManager').removeClass('x_disabled');
|
||||
}
|
||||
}).change();
|
||||
// Button action
|
||||
$('a.modalAnchor').bind('before-open.mw', function(){
|
||||
if($docTable.find('tbody :checked').length == 0){
|
||||
$('body').css('overflow','auto');
|
||||
alert('{$lang->msg_file_cart_is_null}');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,46 +1,42 @@
|
|||
<form ruleset="fileModuleConfig" action="./" method="post" class="form">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminInsertModuleConfig" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
|
||||
<h3 class="h3">{$lang->file}</h3>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row"><label for="allowed_filesize">{$lang->allowed_filesize}</label></th>
|
||||
<td class="text">
|
||||
<input type="text" name="allowed_filesize" id="allowed_filesize" value="{$file_config->allowed_filesize}" size="3" style="width:30px" /> MB
|
||||
<p class="desc">{$lang->about_allowed_filesize}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="allowed_attach_size">{$lang->allowed_attach_size}</label></th>
|
||||
<td class="text">
|
||||
<input type="text" name="allowed_attach_size" id="allowed_attach_size" value="{$file_config->allowed_attach_size}" size="3" style="width:30px" /> MB
|
||||
<section class="section">
|
||||
<h1>{$lang->file}</h1>
|
||||
|
||||
<form ruleset="fileModuleConfig" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminInsertModuleConfig" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="allowed_filesize" class="x_control-label">{$lang->allowed_filesize}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="allowed_filesize" id="allowed_filesize" value="{$file_config->allowed_filesize}" size="3" /> MB
|
||||
<p class="x_help-inline">{$lang->about_allowed_filesize}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="allowed_attach_size" class="x_control-label">{$lang->allowed_attach_size}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="allowed_attach_size" id="allowed_attach_size" value="{$file_config->allowed_attach_size}" size="3" /> MB
|
||||
/ {ini_get('upload_max_filesize')}
|
||||
<p class="desc">{$lang->about_allowed_attach_size}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="allowed_filetypes">{$lang->allowed_filetypes}</label></th>
|
||||
<td class="text">
|
||||
<p class="x_help-inline">{$lang->about_allowed_attach_size}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="allowed_filetypes" class="x_control-label">{$lang->allowed_filetypes}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="allowed_filetypes" id="allowed_filetypes" value="{$file_config->allowed_filetypes}" />
|
||||
<p class="desc">{$lang->about_allowed_filetypes}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->enable_download_group}</th>
|
||||
<td class="text">
|
||||
<!--@foreach($group_list as $k => $v)-->
|
||||
<input type="checkbox" class="checkbox" name="download_grant[]" value="{$v->group_srl}" id="grant_{$key}_{$v->group_srl}" <!--@if(in_array($v->group_srl, $file_config->download_grant))-->checked="checked"<!--@end-->/>
|
||||
<label for="grant_{$key}_{$v->group_srl}">{$v->title}</label>
|
||||
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
<p class="x_help-inline">{$lang->about_allowed_filetypes}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->enable_download_group}</label>
|
||||
<div class="x_controls">
|
||||
<label loop="$group_list => $k, $v" for="grant_{$key}_{$v->group_srl}"><input type="checkbox" name="download_grant[]" value="{$v->group_srl}" id="grant_{$key}_{$v->group_srl}" checked="checked"|cond="in_array($v->group_srl, $file_config->download_grant)" /> {$v->title}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<button class="x_btn x_btn-primary" type="submit">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<load target="js/file_admin.js" usecdn="true" />
|
||||
<h2 class="h2">{$lang->file} {$lang->cmd_management}</h2>
|
||||
<div class="cnb">
|
||||
<ul>
|
||||
<li <!--@if($act=='dispFileAdminList')-->class="active"<!--@end-->><a href="{getUrl('act','dispFileAdminList')}">{$lang->file_list}</a></li>
|
||||
<li <!--@if($act=='dispFileAdminConfig')-->class="active"<!--@end-->><a href="{getUrl('act','dispFileAdminConfig')}">{$lang->cmd_module_config}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>
|
||||
<a href="{getUrl('act','dispFileAdminList')}" class="active"|cond="$act=='dispFileAdminList'">{$lang->file_list}</a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('act','dispFileAdminConfig')}" class="active"|cond="$act=='dispFileAdminConfig'">{$lang->cmd_module_config}</a>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<script type="text/javascript">//<<![CDATA[
|
||||
<script>//<<![CDATA[
|
||||
|
||||
var uploaded_fileinfo = {};
|
||||
<!--@if($uploaded_fileinfo->error==0)-->
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
(function($){
|
||||
$('input[name=allow_outlink]').click(function(){
|
||||
if($(this).val() == 'Y'){
|
||||
$('._outLink').show();
|
||||
}else{
|
||||
$('._outLink').hide();
|
||||
}
|
||||
});
|
||||
}(jQuery))
|
||||
|
|
@ -51,9 +51,11 @@ function checkSearch(form)
|
|||
alert(xe.lang.msg_empty_search_target);
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
if(form.search_keyword.value == '')
|
||||
{
|
||||
alert(xe.lang.msg_empty_search_keyword);
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<script type="text/javascript">
|
||||
<script>
|
||||
parent.editor_upload_clear_list("{$editor_sequence}","{$upload_target_srl}");
|
||||
|
||||
<!--@foreach($file_list as $key => $file_info)-->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue