신고된 게시글/댓글을 신고 취소 시키는 관리자 기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3192 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-12-07 07:05:41 +00:00
parent 7728d75d1f
commit 5cb4cf3d23
15 changed files with 80 additions and 2 deletions

View file

@ -43,6 +43,19 @@
$this->setMessage( sprintf(Context::getLang('msg_checked_comment_is_deleted'), $deleted_count) );
}
/**
* @brief 신고대상을 취소 시킴
**/
function procCommentAdminCancelDeclare() {
$comment_srl = trim(Context::get('comment_srl'));
if($comment_srl) {
$args->comment_srl = $comment_srl;
$output = executeQuery('comment.deleteDeclaredComments', $args);
if(!$output->toBool()) return $output;
}
}
/**
* @brief 특정 모듈의 모든 댓글 삭제
**/

View file

@ -9,6 +9,6 @@
<action name="procCommentVoteDown" type="controller" standalone="true" />
<action name="procCommentDeclare" type="controller" standalone="true" />
<action name="procCommentAdminDeleteChecked" type="controller" standalone="true" />
<action name="procCommentAdminDeleteChecked" type="controller" standalone="true" />
<action name="procCommentAdminCancelDeclare" type="controller" standalone="true" />
</actions>
</module>

View file

@ -45,6 +45,9 @@
</table>
<!-- 버튼 -->
<div class="fl gap1">
<a href="#" onclick="doCancelDeclare();return false;" class="button"><span>{$lang->cmd_cancel_declare}</span></a>
</div>
<div class="fr gap1">
<a href="javascript:checkboxSelectAll('fo_list', 'cart', true)" class="button"><span>{$lang->cmd_select_all}</span></a>
<a href="javascript:checkboxSelectAll('fo_list', 'cart')" class="button"><span>{$lang->cmd_reverse_all}</span></a>
@ -53,6 +56,7 @@
</form>
<!-- 페이지 네비게이션 -->
<div class="clear"></div>
<div class="pageNavigation">
<a href="{getUrl('page','','module_srl','')}" class="goToFirst"><img src="../../admin/tpl/images/bottomGotoFirst.gif" alt="{$lang->first_page}" width="7" height="5" /></a>
<!--@while($page_no = $page_navigation->getNextPage())-->

View file

@ -6,4 +6,22 @@ function doCheckAll(bToggle) {
if( !fo_obj[i].checked || !bToggle) fo_obj[i].checked = true; else fo_obj[i].checked = false;
}
}
}
}
function doCancelDeclare() {
var fo_obj = xGetElementById('fo_list');
var comment_srl = new Array();
for(var i=0;i<fo_obj.cart.length;i++) {
if(fo_obj.cart[i].checked) comment_srl[comment_srl.length] = fo_obj.cart[i].value;
}
if(comment_srl.length<1) return;
var params = new Array();
params['comment_srl'] = comment_srl.join(',');
exec_xml('comment','procCommentAdminCancelDeclare', params, completeCancelDeclare);
}
function completeCancelDeclare(ret_obj) {
location.reload();
}

View file

@ -30,5 +30,6 @@
<action name="procDocumentAdminDeleteChecked" type="controller" standalone="true" />
<action name="procDocumentAdminInsertConfig" type="controller" standalone="true" />
<action name="procDocumentAdminDeleteAllThumbnail" type="controller" standalone="true" />
<action name="procDocumentAdminCancelDeclare" type="controller" standalone="true" />
</actions>
</module>

View file

@ -261,6 +261,19 @@
return $output;
}
/**
* @brief 선택된 글들에 대해 신고 취소
**/
function procDocumentAdminCancelDeclare() {
$document_srl = trim(Context::get('document_srl'));
if($document_srl) {
$args->document_srl = $document_srl;
$output = executeQuery('document.deleteDeclaredDocuments', $args);
if(!$output->toBool()) return $output;
}
}
/**
* @brief 모든 생성된 썸네일 삭제
**/

View file

@ -60,6 +60,9 @@
</table>
<!-- 버튼 -->
<div class="fl gap1">
<a href="#" onclick="doCancelDeclare();return false;" class="button"><span>{$lang->cmd_cancel_declare}</span></a>
</div>
<div class="fr gap1">
<a href="{getUrl('','module','document','act','dispDocumentAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
</div>
@ -67,6 +70,7 @@
</form>
<!-- 페이지 네비게이션 -->
<div class="clear"></div>
<div class="pageNavigation">
<a href="{getUrl('page','','module_srl','')}" class="goToFirst"><img src="../../admin/tpl/images/bottomGotoFirst.gif" alt="{$lang->first_page}" width="7" height="5" /></a>
<!--@while($page_no = $page_navigation->getNextPage())-->

View file

@ -69,3 +69,21 @@ function completeGetCategoryFromModules(ret_obj, response_tags) {
obj.options[obj.options.length] = opt;
}
}
function doCancelDeclare() {
var fo_obj = xGetElementById('fo_list');
var document_srl = new Array();
for(var i=0;i<fo_obj.cart.length;i++) {
if(fo_obj.cart[i].checked) document_srl[document_srl.length] = fo_obj.cart[i].value;
}
if(document_srl.length<1) return;
var params = new Array();
params['document_srl'] = document_srl.join(',');
exec_xml('document','procDocumentAdminCancelDeclare', params, completeCancelDeclare);
}
function completeCancelDeclare(ret_obj) {
location.reload();
}