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

This commit is contained in:
zero 2007-03-06 03:02:57 +00:00
parent 5bff3824ca
commit ba8e048039
7 changed files with 30 additions and 38 deletions

View file

@ -15,7 +15,7 @@
$lang->version = "버전";
$lang->author = "제작자";
$lang->table_count = "테이블수";
$lang->date = "제작";
$lang->date = "";
$lang->installed_path = "설치경로";
$lang->msg_is_not_administrator = '관리자만 접속이 가능합니다';

View file

@ -190,5 +190,28 @@
return $output;
}
/**
* @brief 관리자 페이지에서 선택된 댓글들을 삭제
**/
function procDeleteChecked() {
// 선택된 글이 없으면 오류 표시
$cart = Context::get('cart');
if(!$cart) return $this->stop('msg_cart_is_null');
$comment_srl_list= explode('|@|', $cart);
$comment_count = count($comment_srl_list);
if(!$comment_count) return $this->stop('msg_cart_is_null');
// 글삭제
for($i=0;$i<$comment_count;$i++) {
$comment_srl = trim($comment_srl_list[$i]);
if(!$comment_srl) continue;
$this->deleteComment($comment_srl, true);
}
$this->setMessage( sprintf(Context::getLang('msg_checked_comment_is_deleted'), $comment_count) );
}
}
?>

View file

@ -10,5 +10,5 @@
$lang->cmd_delete_checked_comment = '선택항목 삭제';
$lang->msg_cart_is_null = '삭제할 글을 선택해주세요';
$lang->msg_checked_comment_is_deleted = '%d개의 글이 삭제되었습니다';
$lang->msg_checked_comment_is_deleted = '%d개의 글이 삭제되었습니다';
?>

View file

@ -1,6 +1,4 @@
<!--%import("filter/search.xml")-->
<!--%import("filter/delete_checked.xml")-->
<!--%import("js/comment.js")-->
<!--#include("header.html")-->
<!-- 게시판 정보 -->
@ -18,30 +16,20 @@
<tr>
<th colspan="2">{$lang->no}</th>
<th>{$lang->module}</th>
<th>{$lang->title}</th>
<th>{$lang->user_name}</th>
<th>{$lang->readed_count}</th>
<th>{$lang->voted_count}</th>
<th>{$lang->content}</th>
<th>{$lang->date}</th>
<th>{$lang->cmd_move}</th>
</tr>
<!--@foreach($comment_list as $no => $val)-->
<tr>
<td>{$no}</td>
<td><input type="checkbox" name="cart" value="{$val->comment_srl}" /></td>
<td><a href="#" onclick="window.open('./?mid={$val->mid}');return false">{$module_list[$val->module_srl]->browser_title}</a></td>
<td>
<a href="#" onclick="window.open('./?comment_srl={$val->comment_srl}');return false">{$val->title}</a>
<!--@if($val->comment_count>0)-->
[{$val->comment_count}]
<!--@end-->
<!--@if($val->trackback_count>0)-->
[{$val->trackback_count}]
<!--@end-->
</td>
<td>{$val->user_name}</td>
<td>{$val->readed_count}</td>
<td>{$val->voted_count}</td>
<td>{$val->content}</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>
</tr>
<!--@end-->
</table>
@ -54,23 +42,6 @@
</form>
<!-- 검색 -->
<div>
<form action="./" method="get" onsubmit="return procFilter(this, search)">
<input type="hidden" name="module" value="admin" />
<input type="hidden" name="mo" value="comment" />
<input type="hidden" name="act" value="dispList" />
<select name="search_target">
<!--@foreach($search_option as $key => $val)-->
<option value="{$key}" <!--@if($search_target==$key)-->selected="true"<!--@end-->>{$val}</option>
<!--@end-->
</select>
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
<input type="submit" value="{$lang->cmd_search}" />
<input type="button" value="{$lang->cmd_cancel}" onclick="location.href='{getUrl('search_target','','search_keyword','','page','1','comment_srl','')}'"/>
</form>
</div>
<!-- 페이지 네비게이션 -->
<div>
<a href="{getUrl('page','','comment_srl','')}">[{$lang->first_page}]</a>

View file

@ -1,10 +1,9 @@
<filter name="delete_checked" module="document" act="procDeleteChecked" confirm_msg_code="confirm_delete">
<filter name="delete_checked" module="comment" act="procDeleteChecked" confirm_msg_code="confirm_delete">
<form>
<node target="cart" required="true" />
</form>
<parameter>
<param name="cart" target="cart" />
<param name="search_keyword" target="search_keyword" />
</parameter>
<response>
<tag name="error" />

View file

@ -4,7 +4,6 @@
</form>
<parameter>
<param name="cart" target="cart" />
<param name="search_keyword" target="search_keyword" />
</parameter>
<response>
<tag name="error" />