issue 70 file module UX changed

document module develope for document management


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8679 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-07-28 05:09:38 +00:00
parent 99d36039e9
commit aadeda4f55
23 changed files with 444 additions and 261 deletions

View file

@ -492,7 +492,6 @@
$layout_list[] = $layout_info;
}
}
// debugPrint($layout_list);
Context::set('theme_list', $theme_list);
Context::set('layout_list', $layout_list);

View file

@ -75,7 +75,6 @@
//insert menu
$args->title = $this->xeMenuTitle;
$args->menu_srl = getNextSequence();
//$args->menu_srl = 3302;
$args->listorder = $args->menu_srl * -1;
$output = executeQuery('menu.insertMenu', $args);
$menuSrl = $args->menu_srl;
@ -129,26 +128,22 @@
foreach($installed_module_list AS $key=>$value)
{
//if($value->module == 'document')
//{
$moduleActionInfo = $oModuleModel->getModuleActionXml($value->module);
if(is_object($moduleActionInfo->menu))
$moduleActionInfo = $oModuleModel->getModuleActionXml($value->module);
if(is_object($moduleActionInfo->menu))
{
foreach($moduleActionInfo->menu AS $key2=>$value2)
{
foreach($moduleActionInfo->menu AS $key2=>$value2)
{
$gnbKey = "'".$this->_getGnbKey($key2)."'";
$gnbKey = "'".$this->_getGnbKey($key2)."'";
//insert menu item
$args->menu_item_srl = getNextSequence();
$args->parent_srl = $gnbDBList[$gnbKey];
//$args->name = '{$lang->menu_gnb_sub['.$gnbKey.'][\''.$key2.'\']}';
$args->name = '{$lang->menu_gnb_sub[\''.$key2.'\']}';
$args->url = getNotEncodedUrl('', 'module', 'admin', 'act', $value2->index);
$args->listorder = -1*$args->menu_item_srl;
$output = executeQuery('menu.insertMenuItem', $args);
}
//insert menu item
$args->menu_item_srl = getNextSequence();
$args->parent_srl = $gnbDBList[$gnbKey];
$args->name = '{$lang->menu_gnb_sub[\''.$key2.'\']}';
$args->url = getNotEncodedUrl('', 'module', 'admin', 'act', $value2->index);
$args->listorder = -1*$args->menu_item_srl;
$output = executeQuery('menu.insertMenuItem', $args);
}
//}
}
}
}

View file

@ -29,7 +29,7 @@
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig');
header('location:'.$returnUrl);
$this->setRedirectUrl($returnUrl);
return;
}
else return $output;

View file

@ -1532,14 +1532,15 @@ class documentController extends document {
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
$type = Context::get('type');
$module_srl = Context::get('target_module');
$target_module = Context::get('target_module');
$module_srl = Context::get('module_srl');
$category_srl = Context::get('target_category');
$message_content = Context::get('message_content');
if($message_content) $message_content = nl2br($message_content);
$cart = Context::get('cart');
if($cart) $document_srl_list = explode('|@|', $cart);
else $document_srl_list = array();
if(!is_array($cart)) $document_srl_list = explode('|@|', $cart);
else $document_srl_list = $cart;
$document_srl_count = count($document_srl_list);
// Send a message
@ -1613,6 +1614,11 @@ class documentController extends document {
$_SESSION['document_management'] = array();
$this->setMessage($msg_code);
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList');
$this->setRedirectUrl($returnUrl);
return;
}
}
function procDocumentInsertModuleConfig()
@ -1708,11 +1714,17 @@ class documentController extends document {
}
}
if(count($documentSrlList)) {
if(count($documentSrlList) > 0) {
$oDocumentModel = &getModel('document');
$documentList = $oDocumentModel->getDocuments($documentSrlList, $this->grant->is_admin);
$this->add('document_list', $documentList);
}
else
{
global $lang;
$documentList = array();
$this->setMessage($lang->no_documents);
}
$this->add('document_list', $documentList);
}
/**

View file

@ -1,4 +1,7 @@
<!--%import("js/document_admin.js")-->
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form id="fo_list" action="./" method="get" class="form">
<input type="hidden" name="page" value="{$page}" />
<h1 class="h1">Document</h1>
@ -42,7 +45,9 @@
</div>
</form>
<div class="modal" id="listManager">
<form action="" class="fg form">
<form action="./" method="post" class="fg form" id="manageForm">
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
<input type="hidden" name="type" value="" />
<h2 class="h2">선택한 글 관리</h2>
<div class="table even">
<table width="100%" border="1" cellspacing="0" id="documentManageListTable">
@ -52,36 +57,41 @@
<th scope="col" class="title">Title</th>
<th scope="col">Author</th>
<th scope="col">Status</th>
<th scope="col"><input type="checkbox" title="Check All" /></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<p class="q"><label for="midUrl">선택한 글을 다음 위치로 옮기거나 복사할 수 있습니다.</label></p>
<p class="q"><label for="site">선택한 글을 다음 위치로 옮기거나 복사할 수 있습니다.</label></p>
<div class="a">
<input type="text" id="midUrl" />
<span class="desc"><a href="#midSuggestion" class="tgFade" onclick="getModuleList();">Find Module ID</a></span>
<div id="midSuggestion" class="tgContent">
<ul>
<li><button type="button">SiteID.ModuleID.Category</button></li>
<li><button type="button">naradesign.freeBoard</button></li>
<li><button type="button">naradesign.userForum.technique</button></li>
<li><button type="button">mygony.freeBoard</button></li>
<li><button type="button">mygony.userForum.technique</button></li>
</ul>
</div>
<input type="text" name="site_keyword" id="site" />
<span class="desc"><a href="#suggestion" class="tgAnchor" onclick="getModuleList();">사이트 찾기</a></span>
<p>
<select style="width:290px" name="target_module" id="module_list">
<option>모듈을 선택하세요.</option>
</select>
</p>
<p>
<select style="width:290px" name="module_srl" id="mid_list">
<option>모듈 아이디를 선택하세요.</option>
</select>
</p>
<p>
<select id="target_category" name="target_category" style="width:290px">
<option>분류를 선택하세요.</option>
</select>
</p>
</div>
<p class="q"><label for="message">저작자에게 쪽지를 발송해서 이 사실을 알립니다. 작성하지 않으면 발송하지 않습니다.</label></p>
<p>
<textarea cols="42" rows="3" id="message" style="width:98%"></textarea>
<textarea cols="42" rows="3" name="message_content" id="message" style="width:98%"></textarea>
</p>
<div class="btnArea">
<span class="btn"><input type="submit" value="Move" /></span>
<span class="btn"><input type="submit" value="Copy" /></span>
<span class="btn"><input type="submit" value="Trash" /></span>
<span class="btn"><input type="submit" value="Delete" class="delete" /></span>
<button type="submit" name="type" value="trash">{$lang->cmd_trash}</button>
<button type="submit" name="type" value="delete">{$lang->cmd_delete}</button>
<button type="submit" name="type" value="move">{$lang->cmd_move}</button>
<button type="submit" name="type" value="copy">{$lang->cmd_copy}</button>
</div>
</form>
</div>

View file

@ -28,46 +28,6 @@ function completeManageDocument(ret_obj) {
window.close();
}
/* 선택된 모듈의 카테고리 목록을 가져오는 함수 */
function doGetCategoryFromModule(module_srl) {
var params = new Array();
params['module_srl'] = module_srl;
var response_tags = ['error','message','categories'];
exec_xml('document','getDocumentCategories',params, completeGetCategoryFromModules, response_tags);
}
function completeGetCategoryFromModules(ret_obj, response_tags) {
var obj = jQuery('#target_category').get(0);
var length = obj.options.length;
for(var i=0;i<length;i++) obj.remove(0);
var categories = ret_obj['categories'];
if(!categories) return;
var depth_str = '-';
for(var i=0; i < 5; i++) depth_str += depth_str;
var category_list = categories.split("\n");
for(var i=0;i<category_list.length;i++) {
var item = category_list[i];
var pos = item.indexOf(',');
var category_srl = item.substr(0,pos);
var item = item.substr(pos+1, item.length);
var pos = item.indexOf(',');
var depth = item.substr(0,pos);
var category_title = item.substr(pos+1,item.length);
if(!category_srl || !category_title) continue;
if (depth > 0) category_title = depth_str.substr(0, depth) + ' ' + category_title;
var opt = new Option(category_title, category_srl, false, false);
obj.options[obj.options.length] = opt;
}
}
function doCancelDeclare() {
var document_srl = [];
@ -157,33 +117,119 @@ function getDocumentList() {
function completeGetDocumentList(ret_obj, response_tags)
{
var document_list = ret_obj['document_list']['item'];
var htmlListBuffer = '';
var statusNameList = {"PUBLIC":"Public", "SECRET":"Secret", "PRIVATE":"Private", "TEMP":"Temp"};
for(var x in document_list)
if(ret_obj['document_list'] == null)
{
var objDocument = document_list[x];
htmlListBuffer += '<tr>' +
'<td class="title">'+ objDocument.variables.title +'</td>' +
'<td>'+ objDocument.variables.nick_name +'</td>' +
'<td>'+ statusNameList[objDocument.variables.status] +'</td>' +
'<td><input type="checkbox" /></td>' +
htmlListBuffer = '<tr>' +
'<td colspan="3" style="text-align:center;">'+ret_obj['message']+'</td>' +
'</tr>';
}
else
{
var document_list = ret_obj['document_list']['item'];
if(!jQuery.isArray(document_list)) document_list = [document_list];
for(var x in document_list)
{
var objDocument = document_list[x];
htmlListBuffer += '<tr>' +
'<td class="title">'+ objDocument.variables.title +'</td>' +
'<td>'+ objDocument.variables.nick_name +'</td>' +
'<td>'+ statusNameList[objDocument.variables.status] +'</td>' +
'</tr>'+
'<input type="hidden" name="cart[]" value="'+objDocument.document_srl+'" />';
}
}
jQuery('#documentManageListTable>tbody').html(htmlListBuffer);
}
function getModuleList()
{
var params = new Array();
var response_tags = ['error', 'message'];
var response_tags = ['error', 'message', 'module_list'];
var formObj = jQuery("#manageForm").get(0);
exec_xml('document','procModuleAdminGetList',params, completeGetModuleList, response_tags);
params['site_keyword'] = formObj.site_keyword.value;
exec_xml('module','procModuleAdminGetList',params, completeGetModuleList, response_tags);
}
var module_list = '';
function completeGetModuleList(ret_obj, response_tags)
{
console.log(ret_obj['error']);
console.log(ret_obj['message']);
var formObj = jQuery("#manageForm").get(0);
module_list = ret_obj['module_list'];
var htmlListBuffer = '';
for(var x in module_list)
{
if(x == 'page') continue;
var moduleObject = module_list[x];
htmlListBuffer += '<option value="'+x+'">'+moduleObject.title+'</option>';
}
jQuery('#module_list').html(htmlListBuffer);
makeMidList(jQuery('#module_list').val());
}
jQuery(document).ready(function($){
$('#module_list').bind('change', function(e){
makeMidList($('#module_list').val());
});
$('#mid_list').bind('change', function(e){
doGetCategoryFromModule($('#mid_list').val());
});
});
function makeMidList(moduleName)
{
var mid_list = module_list[moduleName].list;
var htmlListBuffer = '';
for(var x in mid_list)
{
var moduleInstance = mid_list[x];
htmlListBuffer += '<option value="'+moduleInstance.module_srl+'">'+x+'</option>';
}
jQuery('#mid_list').html(htmlListBuffer);
doGetCategoryFromModule(jQuery('#mid_list').val());
}
/* 선택된 모듈의 카테고리 목록을 가져오는 함수 */
function doGetCategoryFromModule(module_srl) {
var params = new Array();
params['module_srl'] = module_srl;
var response_tags = ['error','message','categories'];
exec_xml('document','getDocumentCategories',params, completeGetCategoryFromModules, response_tags);
}
function completeGetCategoryFromModules(ret_obj, response_tags) {
var obj = jQuery('#target_category').get(0);
var length = obj.options.length;
for(var i=0;i<length;i++) obj.remove(0);
var categories = ret_obj['categories'];
if(!categories) return;
var depth_str = '-';
for(var i=0; i < 5; i++) depth_str += depth_str;
var category_list = categories.split("\n");
for(var i=0;i<category_list.length;i++) {
var item = category_list[i];
var pos = item.indexOf(',');
var category_srl = item.substr(0,pos);
var item = item.substr(pos+1, item.length);
var pos = item.indexOf(',');
var depth = item.substr(0,pos);
var category_title = item.substr(pos+1,item.length);
if(!category_srl || !category_title) continue;
if (depth > 0) category_title = depth_str.substr(0, depth) + ' ' + category_title;
var opt = new Option(category_title, category_srl, false, false);
obj.options[obj.options.length] = opt;
}
}

View file

@ -3,7 +3,7 @@
<grants />
<permissions />
<actions>
<action name="dispFileAdminList" type="view" admin_index="true" standalone="true" />
<action name="dispFileAdminList" type="view" admin_index="true" standalone="true" menu_name="file" menu_index="true" />
<action name="dispFileAdminConfig" type="view" standalone="true" />
<action name="getFileList" type="model" standalone="true" />
<action name="procFileUpload" type="controller" standalone="true" />

View file

@ -17,6 +17,48 @@
* @brief Get all the attachments in order by time descending (for administrators)
**/
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;
$oFileModel = &getModel('file');
foreach($output->data as $key => $file) {
$file->download_url = $oFileModel->getDownloadUrl($file->file_srl, $file->sid);
$output->data[$key] = $file;
}
return $output;
}
/**
* @brief Return number of attachments which belongs to a specific document
**/
function getFilesCountByGroupValid($obj) {
$this->_makeSearchParam($obj, $args);
$output = executeQueryArray('file.getFilesCountByGroupValid', $args);
return $output->data;
}
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'));
@ -57,35 +99,11 @@
case 'nick_name' :
$args->s_nick_name = $search_keyword;
break;
case 'isvalid' :
$args->isvalid = $search_keyword;
break;
}
}
// 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');
foreach($output->data as $key => $file) {
$file->download_url = $oFileModel->getDownloadUrl($file->file_srl, $file->sid);
$output->data[$key] = $file;
}
return $output;
}
}
}
?>

View file

@ -26,10 +26,10 @@
$args->isvalid = Context::get('isvalid');
$args->module_srl = Context::get('module_srl');
// Get a list
$oFileModel = &getAdminModel('file');
$oFileAdminModel = &getAdminModel('file');
$columnList = array('file_srl', 'upload_target_srl', 'upload_target_type', 'module_srl'
, 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress');
$output = $oFileModel->getFileList($args, $columnList);
$output = $oFileAdminModel->getFileList($args, $columnList);
// Get the document for looping a list
if($output->data) {
$oCommentModel = &getModel('comment');
@ -154,6 +154,17 @@
}
}
}
$countOutput = $oFileAdminModel->getFilesCountByGroupValid($args);
$validCount = array();
if(is_array($countOutput))
{
foreach($countOutput AS $key=>$value)
{
$validCount[$value->isvalid] = $value->count;
}
}
Context::set('file_list', $file_list);
Context::set('document_list', $document_list);
Context::set('comment_list', $comment_list);
@ -162,6 +173,7 @@
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
Context::set('page_navigation', $output->page_navigation);
Context::set('valid_count', $validCount);
// Set a template
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('file_list');

View file

@ -51,6 +51,7 @@
'user_name' => 'User Name',
'nick_name' => 'Nickname',
'ipaddress' => 'IP Address',
'isvalid' => 'Status',
);
$lang->msg_not_allowed_outlink = 'It is not allowed to download files from sites other than this.';
$lang->msg_not_permitted_create = 'Failed to create a file or directory.';

View file

@ -48,6 +48,7 @@
'nick_name' => 'Apodo',
'regdate' => 'La fecha registrada',
'ipaddress' => 'Dirección IP',
'isvalid' => 'Status',
);
$lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.';
$lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.';

View file

@ -48,6 +48,7 @@
'nick_name' => '닉네임',
'regdate' => 'Enrgistre',
'ipaddress' => 'Adresse IP',
'isvalid' => 'Status',
);
$lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.';
$lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.';

View file

@ -50,6 +50,7 @@
'nick_name' => 'ニックネーム',
'regdate' => '登録日',
'ipaddress' => 'IPアドレス',
'isvalid' => 'Status',
);
$lang->msg_not_allowed_outlink = '外部リンクからのダウンロードは許可されていません。';
$lang->msg_not_permitted_create = 'ファイルまたはディレクトリを生成できません。';

View file

@ -45,6 +45,7 @@
'nick_name' => '닉네임',
'regdate' => '등록일',
'ipaddress' => 'IP 주소',
'isvalid' => '상태',
);
$lang->msg_not_allowed_outlink = '외부링크에서 다운로드 할 수 없습니다.';
$lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.';

View file

@ -50,6 +50,7 @@
'nick_name' => 'Ник',
'regdate' => 'Дата регистрации',
'ipaddress' => 'IP-Адрес',
'isvalid' => 'Status',
);
$lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.';
$lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.';

View file

@ -51,6 +51,7 @@
'user_name' => 'Kullanıcı İsmi',
'nick_name' => 'Rumuz',
'ipaddress' => 'IP Adresi',
'isvalid' => 'Status',
);
$lang->msg_not_allowed_outlink = 'Bu siteden dosya indirimine izin verilmemektedir.';
$lang->msg_not_permitted_create = 'Dosya veya dizin oluşturma hatası.';

View file

@ -54,6 +54,7 @@
'user_name' => 'Tên Sử dụng',
'nick_name' => 'Nickname',
'ipaddress' => 'IP',
'isvalid' => 'Status',
);
$lang->msg_not_allowed_outlink = 'Không cho phép tải file từ những trang khác ngoài trang này.';
$lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.';

View file

@ -48,6 +48,7 @@
'nick_name' => '昵称',
'regdate' => '登录日期',
'ipaddress' => 'IP地址',
'isvalid' => 'Status',
);
$lang->msg_not_allowed_outlink = '此站不允许外链下载。';
$lang->msg_not_permitted_create = '无法生成文件或文件夹。';

View file

@ -50,6 +50,7 @@
'nick_name' => '暱稱',
'regdate' => '登錄日期',
'ipaddress' => 'IP位址',
'isvalid' => 'Status',
);
$lang->msg_not_allowed_outlink = '無法從網站下載檔案。';
$lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.';

View file

@ -0,0 +1,26 @@
<query id="getFilesCount" action="select">
<tables>
<table name="files" />
</tables>
<columns>
<column name="isvalid" />
<column name="count(*)" alias="count" />
</columns>
<conditions>
<condition operation="in" column="module_srl" var="s_module_srl" />
<condition operation="notin" column="module_srl" var="exclude_module_srl" pipe="and" />
<condition operation="equal" column="isvalid" var="isvalid" pipe="and" />
<condition operation="equal" column="direct_download" var="direct_download" pipe="and" />
<group pipe="and">
<condition operation="like" column="source_filename" var="s_filename" pipe="or" />
<condition operation="more" column="file_size" var="s_filesize_more" pipe="or" />
<condition operation="less" column="file_size" var="s_filesize_less" pipe="or" />
<condition operation="more" column="download_count" var="s_download_count" pipe="or" />
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="or" />
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
</group>
</conditions>
<groups>
<group column="isvalid" />
</groups>
</query>

View file

@ -1,136 +1,189 @@
<!--%import("css/file_list.css")-->
<!--#include("header.html")-->
<!-- 검색 -->
<div class="fl">
<div class="content" id="content">
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form ruleset="deleteChecked" action="./" method="get" class="adminSearch">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input type="hidden" name="module_srl" value="{$module_srl}" />
<form id="fo_list" action="./" method="post">
<input type="hidden" name="act" value="procFileAdminDeleteChecked" />
<input type="hidden" name="page" value="{$page}" />
<h1 class="h1">File</h1>
<div class="table">
<table width="100%" border="1" cellspacing="0">
<caption>
All({number_format($total_count)})
| <a href="{getUrl('search_target','isvalid','search_keyword','Y')}">{$lang->is_valid}({number_format((int)$valid_count['Y'])})</a>
| <a href="{getUrl('search_target','isvalid','search_keyword','N')}">{$lang->is_stand_by}({number_format((int)$valid_count['N'])})</a>
<span class="side"><span class="btn"><a href="#listManager" class="modalAnchor">선택한 파일 관리...</a></span></span>
</caption>
<thead>
<tr>
<th scope="col" class="text">{$lang->file}</th>
<th scope="col">{$lang->file_size}</th>
<th scope="col">{$lang->cmd_download}</th>
<th scope="col">{$lang->nick_name}</th>
<th scope="col">{$lang->date}</th>
<th scope="col">{$lang->ipaddress}</th>
<th scope="col">{$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">{$lang->file_size}</th>
<th scope="col">{$lang->cmd_download}</th>
<th scope="col">{$lang->nick_name}</th>
<th scope="col">{$lang->date}</th>
<th scope="col">{$lang->ipaddress}</th>
<th scope="col">{$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-->
<fieldset>
<select name="isvalid">
<option value="">{$lang->status}</option>
<option value="Y" <!--@if($isvalid=="Y")-->selected="selected"<!--@end-->>{$lang->is_valid}</option>
<option value="N" <!--@if($isvalid=="N")-->selected="selected"<!--@end-->>{$lang->is_stand_by}</option>
</select>
<!--@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>{FileHandler::filesize($val->file_size)}</td>
<td>{$val->download_count}</td>
<td>
<!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl])-->
<span class="member_{$document_list[$document_srl]->get('member_srl')}">{$document_list[$document_srl]->getNickName()}</span>
<!--@elseif($val->upload_target_type == 'com' && $comment_list[$val->upload_target_srl])-->
<span class="member_{$comment_list[$val->upload_target_srl]->get('member_srl')}">{$comment_list[$val->upload_target_srl]->getNickName()}</span>
<!--@end-->
</td>
<td>{zdate($val->regdate,"Y-m-d H:i")}</td>
<td><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
<td><!--@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>
<div class="btnArea">
<span class="btn"><a href="#listManager" class="modalAnchor">선택한 파일 관리...</a></span>
</div>
</form>
<div class="modal" id="listManager">
<form action="" class="fg form">
<h2 class="h2">선택한 파일 관리</h2>
<div class="table">
<table width="100%" border="1" cellspacing="0">
<caption>선택한 파일 <strong>8</strong></caption>
<thead>
<tr>
<th scope="col" class="text">Title/File</th>
<th scope="col">File Size</th>
<th scope="col">Author</th>
<th scope="col">Status</th>
<th scope="col">
<input type="checkbox" checked="checked" title="Check All" />
</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="5" class="text" scope="col"> The quick brown fox jumps over the lazy dog.
</td>
</th>
</tr>
<tr>
<td class="text">489d9886e52ea5227a8edb74dcc8124e.jpg</td>
<td>123.4KB</td>
<td>정찬명</td>
<td>Valid</td>
<td>
<input type="checkbox" checked="checked" />
</td>
</tr>
<tr>
<th colspan="5" class="text" scope="col"> The quick brown fox jumps over the lazy dog.
</td>
</th>
</tr>
<tr>
<td class="text">attendance_1.5.19.tar.gz</td>
<td>456Byte</td>
<td>김태곤</td>
<td>Standby</td>
<td>
<input type="checkbox" checked="checked" />
</td>
</tr>
<tr>
<td class="text">attendance_1.5.19.tar.gz</td>
<td>456Byte</td>
<td>김태곤</td>
<td>Standby</td>
<td>
<input type="checkbox" checked="checked" />
</td>
</tr>
</tbody>
</table>
</div>
<p class="q">선택한 파일의 상태를 변경.</p>
<p>
<input type="radio" name="status" id="valid" /> <label for="valid">Valid</label>
<input type="radio" name="status" id="standby" /> <label for="standby">Standby</label>
</p>
<div class="btnArea">
<span class="btn"><input type="submit" value="Modify" /></span>
<span class="btn"><input type="submit" value="Trash" /></span>
<span class="btn"><input type="submit" value="Delete" class="delete" /></span>
</div>
</form>
</div>
<div class="search">
<!-- page navigation -->
<form action="./" method="get">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input type="hidden" name="module_srl" value="{$module_srl}" />
<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)}" class="inputTypeText" />
<span class="button blue"><input type="submit" value="{$lang->cmd_search}" /></span>
<a href="{getUrl('','module',$module,'act',$act)}" class="button black"><span>{$lang->cmd_cancel}</span></a>
</fieldset>
</form>
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
<input type="submit" value="{$lang->cmd_search}" />
<a href="#">Cancel</a>
</form>
</div>
</div>
<form id="fo_list" action="./" method="post">
<input type="hidden" name="act" value="procFileAdminDeleteChecked" />
<input type="hidden" name="page" value="{$page}" />
<!-- 모듈 선택 -->
<div class="fr">
<a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module','type','single')}" onclick="popopen(this.href,'ModuleSelect');return false;" class="button green"><span>{$lang->cmd_find_module}</span></a>
<span class="button red"><input type="submit" value="{$lang->cmd_delete_checked_file}" /></span>
</div>
<!-- 목록 -->
<table cellspacing="0" class="crossTable clear">
<caption>Total {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}</caption>
<thead>
<tr>
<th scope="col"><div>{$lang->no}</div></th>
<th scope="col"><div><input type="checkbox" onclick="XE.checkboxToggleAll(); return false;" /></div></th>
<th scope="col" class="wide"><div>{$lang->file}</div></th>
<th scope="col"><div>{$lang->file_size}</div></th>
<th scope="col"><div>{$lang->status}</div></th>
<th scope="col"><div>{$lang->cmd_download}</div></th>
<th scope="col"><div>{$lang->date}</div></th>
<th scope="col"><div>{$lang->ipaddress}</div></th>
<th scope="col"><div>{$lang->nick_name}</div></th>
</tr>
</thead>
<tbody>
<!--@foreach($file_list as $no => $val)-->
<!--@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 class="row{$cycle_idx} bg1">
<th colspan="9">
<!--@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)}" onclick="window.open(this.href);return false;">{$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}" onclick="window.open(this.href);return false;">{$document_list[$document_srl]->getTitle()}</a><!--@else-->{$document_list[$document_srl]->getTitle()}<!--@end-->
<!--@end-->
<!--@end-->
</th>
</tr>
<!--@endif-->
<tr>
<td class="tCenter number">{$no}</td>
<td class="tCenter"><input type="checkbox" name="cart[]" value="{$val->file_srl}" /></td>
<td class="wide"><a href="{$val->download_url}" class="red">{htmlspecialchars($val->source_filename)}</a></td>
<td class="number tRight">{FileHandler::filesize($val->file_size)}</td>
<td class="tCenter">
<!--@if($val->isvalid=='Y')-->
{$lang->is_valid}
<!--@else-->
{$lang->is_stand_by}
<!--@end-->
</td>
<td class="number tCenter">{$val->download_count}</td>
<td class="date tCenter nowrap" title="{zdate($val->regdate,"Y-m-d H:i:s")}">{zdate($val->regdate,"Y-m-d")}</td>
<td class="number tCenter nowrap"><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
<td class="nowrap">
<!--@if($val->upload_target_type == 'doc' && $document_list[$document_srl])-->
<span class="member_{$document_list[$document_srl]->get('member_srl')}">{$document_list[$document_srl]->getNickName()}</span>
<!--@elseif($val->upload_target_type == 'com' && $comment_list[$val->upload_target_srl])-->
<span class="member_{$comment_list[$val->upload_target_srl]->get('member_srl')}">{$comment_list[$val->upload_target_srl]->getNickName()}</span>
<!--@end-->
</td>
</tr>
<!--@endforeach-->
</tbody>
</table>
</form>
<!-- 페이지 네비게이션 -->
<div class="pagination a1">
<a href="{getUrl('page','')}" class="prevEnd">{$lang->first_page}</a>
<!--@while($page_no = $page_navigation->getNextPage())-->
<!--@if($page == $page_no)-->
<strong>{$page_no}</strong>
<!--@else-->
<a href="{getUrl('page',$page_no)}">{$page_no}</a>
<!--@end-->
<!--@end-->
<a href="{getUrl('page',$page_navigation->last_page)}" class="nextEnd">{$lang->last_page}</a>
</div>

View file

@ -473,28 +473,28 @@
// Get a list of modules at the site
$output = executeQueryArray('module.getSiteModules', $args);
$category_list = $mid_list = array();
$mid_list = array();
if(count($output->data)) {
foreach($output->data as $key => $val) {
/*$module = trim($val->module);
$module = trim($val->module);
if(!$module) continue;
$category = $val->category;
$obj = null;
$obj->module_srl = $val->module_srl;
$obj->browser_title = $val->browser_title;
$mid_list[$module]->list[$category][$val->mid] = $obj;*/
$mid_list[$module]->list[$val->mid] = $obj;
}
}
/*$selected_module = Context::get('selected_module');
$selected_module = Context::get('selected_module');
if(count($mid_list)) {
foreach($mid_list as $module => $val) {
if(!$selected_module) $selected_module = $module;
$xml_info = $oModuleModel->getModuleInfoXml($module);
$mid_list[$module]->title = $xml_info->title;
}
}*/
}
$this->add('module_list', $mid_list);
}
/**