git-svn-id: http://xe-core.googlecode.com/svn/trunk@278 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-06 03:19:02 +00:00
parent 87cd70b321
commit 9a7eee1f4f
5 changed files with 57 additions and 16 deletions

View file

@ -211,7 +211,5 @@
$this->setMessage( sprintf(Context::getLang('msg_checked_comment_is_deleted'), $comment_count) );
}
}
?>

View file

@ -164,5 +164,26 @@
exit();
}
/**
* @brief 관리자 페이지에서 선택된 파일들을 삭제
**/
function procDeleteChecked() {
// 선택된 글이 없으면 오류 표시
$cart = Context::get('cart');
if(!$cart) return $this->stop('msg_cart_is_null');
$file_srl_list= explode('|@|', $cart);
$file_count = count($file_srl_list);
if(!$file_count) return $this->stop('msg_cart_is_null');
// 글삭제
for($i=0;$i<$file_count;$i++) {
$file_srl = trim($file_srl_list[$i]);
if(!$file_srl) continue;
$this->deleteFile($file_srl, true);
}
$this->setMessage( sprintf(Context::getLang('msg_checked_file_is_deleted'), $file_count) );
}
}
?>

View file

@ -0,0 +1,19 @@
<?php
/**
* @file modules/file/lang/ko.lang.php
* @author zero <zero@nzeo.com>
* @brief 첨부파일(file) 모듈의 기본 언어팩
**/
$lang->module = '모듈';
$lang->file_name = '파일이름';
$lang->file_size = '파일크기';
$lang->download_count = '다운로드 받은 수';
$lang->cmd_delete_checked_file = '선택항목 삭제';
$lang->cmd_move_to_document = '문서로 이동';
$lang->cmd_download = '다운로드';
$lang->msg_cart_is_null = '삭제할 글을 선택해주세요';
$lang->msg_checked_file_is_deleted = '%d개의 첨부파일이 삭제되었습니다';
?>

View file

@ -1,7 +1,6 @@
<!--%import("filter/delete_checked.xml")-->
<!--#include("header.html")-->
<!-- 게시판 정보 -->
<div>
{$lang->total_count} : {number_format($total_count)},
{$lang->page_count} : {number_format($page)} / {number_format($total_page)}
@ -16,20 +15,24 @@
<tr>
<th colspan="2">{$lang->no}</th>
<th>{$lang->module}</th>
<th>{$lang->user_name}</th>
<th>{$lang->content}</th>
<th>{$lang->file_name}</th>
<th>{$lang->file_size}</th>
<th>{$lang->download_count}</th>
<th>{$lang->date}</th>
<th>{$lang->cmd_move}</th>
<th>{$lang->cmd_move_to_document}</th>
<th>{$lang->cmd_download}</th>
</tr>
<!--@foreach($comment_list as $no => $val)-->
<!--@foreach($file_list as $no => $val)-->
<tr>
<td>{$no}</td>
<td><input type="checkbox" name="cart" value="{$val->comment_srl}" /></td>
<td><input type="checkbox" name="cart" value="{$val->file_srl}" /></td>
<td><a href="#" onclick="window.open('./?mid={$val->mid}');return false">{$module_list[$val->module_srl]->browser_title}</a></td>
<td>{$val->user_name}</td>
<td>{$val->content}</td>
<td>{$val->source_filename}</td>
<td>{$val->file_size}</td>
<td>{$val->downloaded_count}</td>
<td>{zdate($val->regdate,"Y-m-d")}</td>
<td><a href="#" onclick="window.open('./?document_srl={$val->document_srl}&amp;#comment_{$val->comment_srl}');return false">{$lang->cmd_move}</a></td>
<td><a href="#" onclick="window.open('./?document_srl={$val->document_srl}');return false">{$lang->cmd_move}</a></td>
<td><a href="./?mid={$val->mid}&amp;act=procDownloadFile&amp;file_srl={$val->file_srl}&amp;sid={$val->sid}&amp;document_srl={$val->document_srl}">{$lang->cmd_download}</a></td>
</tr>
<!--@end-->
</table>
@ -37,22 +40,22 @@
<!-- 버튼 -->
<div>
<input type="submit" value="{$lang->cmd_delete_checked_comment}" />
<input type="submit" value="{$lang->cmd_delete_checked_file}" />
</div>
</form>
<!-- 페이지 네비게이션 -->
<div>
<a href="{getUrl('page','','comment_srl','')}">[{$lang->first_page}]</a>
<a href="{getUrl('page','','file_srl','')}">[{$lang->first_page}]</a>
<!--@while($page_no = $page_navigation->getNextPage())-->
<!--@if($page == $page_no)-->
{$page_no}
<!--@else-->
<a href="{getUrl('page',$page_no,'comment_srl','')}">[{$page_no}]</a>
<a href="{getUrl('page',$page_no,'file_srl','')}">[{$page_no}]</a>
<!--@end-->
<!--@end-->
<a href="{getUrl('page',$page_navigation->last_page,'comment_srl','')}">[{$lang->last_page}]</a>
<a href="{getUrl('page',$page_navigation->last_page,'file_srl','')}">[{$lang->last_page}]</a>
</div>

View file

@ -1,4 +1,4 @@
<filter name="delete_checked" module="comment" act="procDeleteChecked" confirm_msg_code="confirm_delete">
<filter name="delete_checked" module="file" act="procDeleteChecked" confirm_msg_code="confirm_delete">
<form>
<node target="cart" required="true" />
</form>