mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
삭제
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
commit
8326004cb2
2773 changed files with 91485 additions and 0 deletions
52
modules/comment/comment.admin.controller.php
Normal file
52
modules/comment/comment.admin.controller.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
/**
|
||||
* @class commentAdminController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief comment 모듈의 admin controller class
|
||||
**/
|
||||
|
||||
class commentAdminController extends comment {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 페이지에서 선택된 댓글들을 삭제
|
||||
**/
|
||||
function procCommentAdminDeleteChecked() {
|
||||
|
||||
// 선택된 글이 없으면 오류 표시
|
||||
$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');
|
||||
|
||||
$oCommentController = &getController('comment');
|
||||
|
||||
// 글삭제
|
||||
for($i=0;$i<$comment_count;$i++) {
|
||||
$comment_srl = trim($comment_srl_list[$i]);
|
||||
if(!$comment_srl) continue;
|
||||
|
||||
$output = $oCommentController->deleteComment($comment_srl, true);
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
$this->setMessage( sprintf(Context::getLang('msg_checked_comment_is_deleted'), $comment_count) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 모든 댓글 삭제
|
||||
**/
|
||||
function deleteModuleComments($module_srl) {
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('comment.deleteModuleComments', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
71
modules/comment/comment.admin.view.php
Normal file
71
modules/comment/comment.admin.view.php
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/**
|
||||
* @class commentAdminView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief comment 모듈의 admin view 클래스
|
||||
**/
|
||||
|
||||
class commentAdminView extends comment {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 목록 출력 (관리자용)
|
||||
**/
|
||||
function dispCommentAdminList() {
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->page = Context::get('page'); ///< 페이지
|
||||
$args->list_count = 50; ///< 한페이지에 보여줄 글 수
|
||||
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
$args->sort_index = 'list_order'; ///< 소팅 값
|
||||
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
|
||||
// mid목록을 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
$mid_list = $oModuleModel->getMidList();
|
||||
Context::set('mid_list', $mid_list);
|
||||
|
||||
// 목록 구함, comment->getCommentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
||||
$oCommentModel = &getModel('comment');
|
||||
$output = $oCommentModel->getTotalCommentList($args);
|
||||
|
||||
// 목록의 loop를 돌면서 mid를 구하기 위한 module_srl값을 구함
|
||||
$comment_count = count($output->data);
|
||||
if($comment_count) {
|
||||
$module_srl_list = array();
|
||||
foreach($output->data as $key => $val) {
|
||||
$module_srl = $val->module_srl;
|
||||
if(!in_array($module_srl, $module_srl_list)) $module_srl_list[] = $module_srl;
|
||||
}
|
||||
if(count($module_srl_list)) {
|
||||
$args->module_srls = implode(',',$module_srl_list);
|
||||
$mid_output = executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
if($mid_output->data && !is_array($mid_output->data)) $mid_output->data = array($mid_output->data);
|
||||
for($i=0;$i<count($mid_output->data);$i++) {
|
||||
$mid_info = $mid_output->data[$i];
|
||||
$module_list[$mid_info->module_srl] = $mid_info;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 템플릿에 쓰기 위해서 comment_model::getTotalCommentList() 의 return object에 있는 값들을 세팅
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('comment_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('comment_list');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
36
modules/comment/comment.class.php
Normal file
36
modules/comment/comment.class.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* @class comment
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief comment 모듈의 high class
|
||||
**/
|
||||
|
||||
class comment extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('comment', 'view', 'dispCommentAdminList');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
244
modules/comment/comment.controller.php
Normal file
244
modules/comment/comment.controller.php
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
<?php
|
||||
/**
|
||||
* @class commentController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief comment 모듈의 controller class
|
||||
**/
|
||||
|
||||
class commentController extends comment {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 코멘트의 권한 부여
|
||||
* 세션값으로 현 접속상태에서만 사용 가능
|
||||
**/
|
||||
function addGrant($comment_srl) {
|
||||
$_SESSION['own_comment'][$comment_srl] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글 입력
|
||||
**/
|
||||
function insertComment($obj, $manual_inserted = false) {
|
||||
$obj->content = removeHackTag($obj->content);
|
||||
|
||||
// document_srl에 해당하는 글이 있는지 확인
|
||||
$document_srl = $obj->document_srl;
|
||||
if(!$document_srl) return new Object(-1,'msg_invalid_document');
|
||||
|
||||
// document model 객체 생성
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
|
||||
// 원본글을 가져옴
|
||||
if(!$manual_inserted) {
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
if($document_srl != $oDocument->document_srl) return new Object(-1,'msg_invalid_document');
|
||||
if($oDocument->isLocked()) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
if($obj->password) $obj->password = md5($obj->password);
|
||||
if($obj->homepage && !eregi('^http:\/\/',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
|
||||
|
||||
// 로그인 된 회원일 경우 회원의 정보를 입력
|
||||
if(Context::get('is_logged')) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$obj->member_srl = $logged_info->member_srl;
|
||||
$obj->user_id = $logged_info->user_id;
|
||||
$obj->user_name = $logged_info->user_name;
|
||||
$obj->nick_name = $logged_info->nick_name;
|
||||
$obj->email_address = $logged_info->email_address;
|
||||
$obj->homepage = $logged_info->homepage;
|
||||
}
|
||||
}
|
||||
$obj->list_order = $obj->comment_srl * -1;
|
||||
|
||||
// begin transaction
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// file의 Model객체 생성
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
// 첨부 파일의 갯수를 구함
|
||||
$obj->uploaded_count = $oFileModel->getFilesCount($obj->comment_srl);
|
||||
|
||||
// 댓글을 입력
|
||||
$output = executeQuery('comment.insertComment', $obj);
|
||||
|
||||
// 입력에 이상이 없으면 해당 글의 댓글 수를 올림
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(!$manual_inserted) {
|
||||
// comment model객체 생성
|
||||
$oCommentModel = &getModel('comment');
|
||||
|
||||
// 해당 글의 전체 댓글 수를 구해옴
|
||||
$comment_count = $oCommentModel->getCommentCount($document_srl);
|
||||
|
||||
// document의 controller 객체 생성
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
// 해당글의 댓글 수를 업데이트
|
||||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, true);
|
||||
|
||||
// 댓글의 권한을 부여
|
||||
$this->addGrant($obj->comment_srl);
|
||||
}
|
||||
|
||||
// commit
|
||||
$oDB->commit();
|
||||
|
||||
// 원본글에 알림(notify_message)가 설정되어 있으면 메세지 보냄
|
||||
if(!$manual_inserted) $oDocument->notify(Context::getLang('comment'), $obj->content);
|
||||
|
||||
$output->add('comment_srl', $obj->comment_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글 수정
|
||||
**/
|
||||
function updateComment($obj, $is_admin = false) {
|
||||
$obj->content = removeHackTag($obj->content);
|
||||
|
||||
// comment model 객체 생성
|
||||
$oCommentModel = &getModel('comment');
|
||||
|
||||
// 원본 데이터를 가져옴
|
||||
$source_obj = $oCommentModel->getComment($obj->comment_srl);
|
||||
|
||||
// 권한이 있는지 확인
|
||||
if(!$is_admin && !$source_obj->is_granted) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
if($obj->password) $obj->password = md5($obj->password);
|
||||
if($obj->homepage && !eregi('^http:\/\/',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
|
||||
|
||||
// 로그인 되어 있고 작성자와 수정자가 동일하면 수정자의 정보를 세팅
|
||||
if(Context::get('is_logged')) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($source_obj->member_srl == $logged_info->member_srl) {
|
||||
$obj->member_srl = $logged_info->member_srl;
|
||||
$obj->user_name = $logged_info->user_name;
|
||||
$obj->nick_name = $logged_info->nick_name;
|
||||
$obj->email_address = $logged_info->email_address;
|
||||
$obj->homepage = $logged_info->homepage;
|
||||
}
|
||||
}
|
||||
|
||||
// 로그인한 유저가 작성한 글인데 nick_name이 없을 경우
|
||||
if($source_obj->member_srl && !$obj->nick_name) {
|
||||
$obj->member_srl = $source_obj->member_srl;
|
||||
$obj->user_name = $source_obj->user_name;
|
||||
$obj->nick_name = $source_obj->nick_name;
|
||||
$obj->email_address = $source_obj->email_address;
|
||||
$obj->homepage = $source_obj->homepage;
|
||||
}
|
||||
|
||||
// file의 Model객체 생성
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
// 첨부 파일의 갯수를 구함
|
||||
$obj->uploaded_count = $oFileModel->getFilesCount($obj->document_srl);
|
||||
|
||||
// begin transaction
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// 업데이트
|
||||
$output = executeQuery('comment.updateComment', $obj);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// commit
|
||||
$oDB->commit();
|
||||
|
||||
$output->add('comment_srl', $obj->comment_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글 삭제
|
||||
**/
|
||||
function deleteComment($comment_srl, $is_admin = false) {
|
||||
// comment model 객체 생성
|
||||
$oCommentModel = &getModel('comment');
|
||||
|
||||
// 기존 댓글이 있는지 확인
|
||||
$comment = $oCommentModel->getComment($comment_srl);
|
||||
if($comment->comment_srl != $comment_srl) return new Object(-1, 'msg_invalid_request');
|
||||
$document_srl = $comment->document_srl;
|
||||
|
||||
// 해당 댓글에 child가 있는지 확인
|
||||
$child_count = $oCommentModel->getChildCommentCount($comment_srl);
|
||||
if($child_count>0) return new Object(-1, 'fail_to_delete_have_children');
|
||||
|
||||
// 권한이 있는지 확인
|
||||
if(!$is_admin && !$comment->is_granted) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// begin transaction
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// 삭제
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = executeQuery('comment.deleteComment', $args);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// 첨부 파일 삭제
|
||||
if($comment->uploaded_count) {
|
||||
$oFileController = &getController('file');
|
||||
$oFileController->deleteFiles($comment->module_srl, $comment_srl);
|
||||
}
|
||||
|
||||
// 댓글 수를 구해서 업데이트
|
||||
$comment_count = $oCommentModel->getCommentCount($document_srl);
|
||||
|
||||
// document의 controller 객체 생성
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
// 해당글의 댓글 수를 업데이트
|
||||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// commit
|
||||
$oDB->commit();
|
||||
|
||||
$output->add('document_srl', $document_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 글의 모든 댓글 삭제
|
||||
**/
|
||||
function deleteComments($document_srl) {
|
||||
// document model객체 생성
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 권한이 있는지 확인
|
||||
if(!$oDocumentModel->isGranted($document_srl)) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 삭제
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQuery('comment.deleteComments', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
233
modules/comment/comment.model.php
Normal file
233
modules/comment/comment.model.php
Normal file
|
|
@ -0,0 +1,233 @@
|
|||
<?php
|
||||
/**
|
||||
* @class commentModel
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief comment 모듈의 model class
|
||||
**/
|
||||
|
||||
class commentModel extends comment {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief comment_srl에 권한이 있는지 체크
|
||||
*
|
||||
* 세션 정보만 이용
|
||||
**/
|
||||
function isGranted($comment_srl) {
|
||||
return $_SESSION['own_comment'][$comment_srl];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 자식 답글의 갯수 리턴
|
||||
**/
|
||||
function getChildCommentCount($comment_srl) {
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = executeQuery('comment.getChildCommentCount', $args);
|
||||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글 가져오기
|
||||
**/
|
||||
function getComment($comment_srl, $is_admin = false) {
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = executeQuery('comment.getComment', $args);
|
||||
$comment = $output->data;
|
||||
|
||||
// 첨부파일 가져오기
|
||||
if($comment->uploaded_count) {
|
||||
$oFileModel = &getModel('file');
|
||||
$file_list = $oFileModel->getFiles($comment_srl, $is_admin);
|
||||
$comment->uploaded_list = $file_list;
|
||||
}
|
||||
|
||||
// 로그인 사용자의 경우 로그인 정보를 일단 구해 놓음
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
if($is_admin || $this->isGranted($comment_srl) || $comment->member_srl == $logged_info->member_srl) $comment->is_granted = true;
|
||||
return $comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 여러개의 댓글들을 가져옴 (페이징 아님)
|
||||
**/
|
||||
function getComments($comment_srl_list) {
|
||||
if(is_array($comment_srl_list)) $comment_srls = implode(',',$comment_srl_list);
|
||||
|
||||
$args->comment_srls = $comment_srls;
|
||||
$output = executeQuery('comment.getComments', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief document_srl 에 해당하는 댓글의 전체 갯수를 가져옴
|
||||
**/
|
||||
function getCommentCount($document_srl) {
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQuery('comment.getCommentCount', $args);
|
||||
$total_count = $output->data->count;
|
||||
return (int)$total_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief mid 에 해당하는 댓글을 가져옴
|
||||
**/
|
||||
function getNewestCommentList($obj) {
|
||||
if($obj->mid) {
|
||||
$oModuleModel = &getModel('module');
|
||||
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
|
||||
unset($obj->mid);
|
||||
}
|
||||
|
||||
// 넘어온 module_srl은 array일 수도 있기에 array인지를 체크
|
||||
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
|
||||
else $args->module_srl = $obj->module_srl;
|
||||
$args->list_count = $obj->list_count;
|
||||
|
||||
$output = executeQuery('comment.getNewestCommentList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief document_srl에 해당하는 문서의 댓글 목록을 가져옴
|
||||
**/
|
||||
function getCommentList($document_srl, $is_admin = false) {
|
||||
$args->document_srl = $document_srl;
|
||||
$args->list_order = 'list_order';
|
||||
$output = executeQuery('comment.getCommentList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$source_list= $output->data;
|
||||
if(!is_array($source_list)) $source_list = array($source_list);
|
||||
|
||||
// 댓글를 계층형 구조로 정렬
|
||||
$comment_count = count($source_list);
|
||||
|
||||
$root = NULL;
|
||||
$list = NULL;
|
||||
|
||||
// 로그인 사용자의 경우 로그인 정보를 일단 구해 놓음
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 첨부파일이 있을 경우를 대비한 File 모듈의 model객체 미리 생성
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
// loop를 돌면서 코멘트의 계층 구조 만듬
|
||||
for($i=$comment_count-1;$i>=0;$i--) {
|
||||
$comment_srl = $source_list[$i]->comment_srl;
|
||||
$parent_srl = $source_list[$i]->parent_srl;
|
||||
$member_srl = $source_list[$i]->member_srl;
|
||||
if(!$comment_srl) continue;
|
||||
|
||||
if($is_admin || $this->isGranted($comment_srl) || $member_srl == $logged_info->member_srl) $source_list[$i]->is_granted = true;
|
||||
|
||||
// 첨부파일 가져오기
|
||||
if($source_list[$i]->uploaded_count) {
|
||||
$file_list = $oFileModel->getFiles($comment_srl, $is_admin);
|
||||
$source_list[$i]->uploaded_list = $file_list;
|
||||
}
|
||||
|
||||
// 목록을 만듬
|
||||
$list[$comment_srl] = $source_list[$i];
|
||||
|
||||
if($parent_srl) {
|
||||
$list[$parent_srl]->child[] = &$list[$comment_srl];
|
||||
} else {
|
||||
$root->child[] = &$list[$comment_srl];
|
||||
}
|
||||
}
|
||||
$this->_arrangeComment($comment_list, $root->child, 0);
|
||||
return $comment_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 댓글을 계층형으로 재배치
|
||||
**/
|
||||
function _arrangeComment(&$comment_list, $list, $depth) {
|
||||
if(!count($list)) return;
|
||||
foreach($list as $key => $val) {
|
||||
if($val->child) {
|
||||
$tmp = $val;
|
||||
$tmp->depth = $depth;
|
||||
$comment_list[$tmp->comment_srl] = $tmp;
|
||||
$this->_arrangeComment($comment_list,$val->child,$depth+1);
|
||||
} else {
|
||||
$val->depth = $depth;
|
||||
$comment_list[$val->comment_srl] = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모든 댓글를 시간 역순으로 가져옴 (관리자용)
|
||||
**/
|
||||
function getTotalCommentList($obj) {
|
||||
$query_id = 'comment.getTotalCommentList';
|
||||
|
||||
// 변수 설정
|
||||
$args->sort_index = 'list_order';
|
||||
$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;
|
||||
|
||||
// 검색 옵션 정리
|
||||
$search_target = trim(Context::get('search_target'));
|
||||
$search_keyword = trim(Context::get('search_keyword'));
|
||||
if($search_target && $search_keyword) {
|
||||
switch($search_target) {
|
||||
case 'content' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_content = $search_keyword;
|
||||
break;
|
||||
case 'user_id' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_user_id = $search_keyword;
|
||||
$query_id = 'comment.getTotalCommentListWithinMember';
|
||||
$args->sort_index = 'comments.list_order';
|
||||
break;
|
||||
case 'user_name' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_user_name = $search_keyword;
|
||||
break;
|
||||
case 'nick_name' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_nick_name = $search_keyword;
|
||||
break;
|
||||
case 'email_address' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_email_address = $search_keyword;
|
||||
break;
|
||||
case 'homepage' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_homepage = $search_keyword;
|
||||
break;
|
||||
case 'regdate' :
|
||||
$args->s_regdate = $search_keyword;
|
||||
break;
|
||||
case 'last_update' :
|
||||
$args->s_last_upate = $search_keyword;
|
||||
break;
|
||||
case 'ipaddress' :
|
||||
$args->s_ipaddress= $search_keyword;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// comment.getTotalCommentList 쿼리 실행
|
||||
$output = executeQuery($query_id, $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
20
modules/comment/conf/info.xml
Normal file
20
modules/comment/conf/info.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module version="0.1">
|
||||
<title xml:lang="ko">댓글</title>
|
||||
<title xml:lang="jp">コメント</title>
|
||||
<title xml:lang="zh-CN">评论</title>
|
||||
<title xml:lang="en">Comment</title>
|
||||
<title xml:lang="es">Commentarios</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="jp">Zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<description xml:lang="ko">게시판이나 블로그등의 댓글을 관리하는 모듈입니다.</description>
|
||||
<description xml:lang="jp">掲示板やブログなどのコメントを管理するモジュールです。</description>
|
||||
<description xml:lang="zh-CN">管理版面或博客评论的模块。</description>
|
||||
<description xml:lang="en">Module for managing board/blog's comments</description>
|
||||
<description xml:lang="es">Es el módulo para manejar commentarios en blog o boletínes.</description>
|
||||
</author>
|
||||
</module>
|
||||
8
modules/comment/conf/module.xml
Normal file
8
modules/comment/conf/module.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispCommentAdminList" type="view" admin_index="true" standalone="true" />
|
||||
<action name="procCommentAdminDeleteChecked" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
23
modules/comment/lang/en.lang.php
Normal file
23
modules/comment/lang/en.lang.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/comment/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief comment module's basic language pack
|
||||
**/
|
||||
$lang->cmd_delete_checked_comment = 'Delete selected item';
|
||||
|
||||
$lang->msg_cart_is_null = 'Please select an article to delete';
|
||||
$lang->msg_checked_comment_is_deleted = '%d comments were deleted successfully';
|
||||
|
||||
$lang->search_target_list = array(
|
||||
'content' => 'Content',
|
||||
'user_id' => 'ID',
|
||||
'user_name' => 'Name',
|
||||
'nick_name' => 'Nickname',
|
||||
'email_address' => 'Email',
|
||||
'homepage' => 'Homepage',
|
||||
'regdate' => 'Date',
|
||||
'last_update' => 'Last update',
|
||||
'ipaddress' => 'IP Address',
|
||||
);
|
||||
?>
|
||||
23
modules/comment/lang/es.lang.php
Normal file
23
modules/comment/lang/es.lang.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/comment/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief Paquete lingual de módulo commentario.
|
||||
**/
|
||||
$lang->cmd_delete_checked_comment = 'Eliminar la selección';
|
||||
|
||||
$lang->msg_cart_is_null = 'Seleccióna el commentario desea eliminar';
|
||||
$lang->msg_checked_comment_is_deleted = '%d commentarios ha eliminado.';
|
||||
|
||||
$lang->search_target_list = array(
|
||||
'content' => 'Contenido',
|
||||
'user_id' => 'ID',
|
||||
'user_name' => 'Nombre',
|
||||
'nick_name' => 'Apodo',
|
||||
'email_address' => 'Correo Electrónico',
|
||||
'homepage' => 'Pagina de web',
|
||||
'regdate' => 'Fecha de registro',
|
||||
'last_update' => 'Ultima actualización',
|
||||
'ipaddress' => 'Dirección IP',
|
||||
);
|
||||
?>
|
||||
23
modules/comment/lang/jp.lang.php
Normal file
23
modules/comment/lang/jp.lang.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/comment/lang/jp.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa
|
||||
* @brief コメント(comment) モジュールの基本言語パッケージ
|
||||
**/
|
||||
$lang->cmd_delete_checked_comment = '選択項目削除';
|
||||
|
||||
$lang->msg_cart_is_null = '削除するコメントを選択してください';
|
||||
$lang->msg_checked_comment_is_deleted = '%d個のコメントを削除しました';
|
||||
|
||||
$lang->search_target_list = array(
|
||||
'content' => '内容',
|
||||
'user_id' => 'ユーザID',
|
||||
'user_name' => '名前',
|
||||
'nick_name' => 'ニックネーム',
|
||||
'email_address' => 'メールアドレス',
|
||||
'homepage' => 'ホームページ',
|
||||
'regdate' => '登録日',
|
||||
'last_update' => '最終更新日 ',
|
||||
'ipaddress' => 'IPアドレス',
|
||||
);
|
||||
?>
|
||||
23
modules/comment/lang/ko.lang.php
Normal file
23
modules/comment/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/comment/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 댓글(comment) 모듈의 기본 언어팩
|
||||
**/
|
||||
$lang->cmd_delete_checked_comment = '선택항목 삭제';
|
||||
|
||||
$lang->msg_cart_is_null = '삭제할 글을 선택해주세요';
|
||||
$lang->msg_checked_comment_is_deleted = '%d개의 댓글이 삭제되었습니다';
|
||||
|
||||
$lang->search_target_list = array(
|
||||
'content' => '내용',
|
||||
'user_id' => '아이디',
|
||||
'user_name' => '이름',
|
||||
'nick_name' => '닉네임',
|
||||
'email_address' => '이메일주소',
|
||||
'homepage' => '홈페이지',
|
||||
'regdate' => '등록일',
|
||||
'last_update' => '최근수정일 ',
|
||||
'ipaddress' => 'IP 주소',
|
||||
);
|
||||
?>
|
||||
23
modules/comment/lang/zh-CN.lang.php
Normal file
23
modules/comment/lang/zh-CN.lang.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/comment/lang/zh-CN.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 评论(comment)模块语言包
|
||||
**/
|
||||
$lang->cmd_delete_checked_comment = '删除所选项目';
|
||||
|
||||
$lang->msg_cart_is_null = '请选择要删除的评论。';
|
||||
$lang->msg_checked_comment_is_deleted = '已删除%d个评论。';
|
||||
|
||||
$lang->search_target_list = array(
|
||||
'content' => '内容',
|
||||
'user_id' => 'I D',
|
||||
'user_name' => '姓名',
|
||||
'nick_name' => '昵称',
|
||||
'email_address' => '电子信箱',
|
||||
'homepage' => '主页',
|
||||
'regdate' => '日期',
|
||||
'last_update' => '最后更新 ',
|
||||
'ipaddress' => 'IP 地址',
|
||||
);
|
||||
?>
|
||||
8
modules/comment/queries/deleteComment.xml
Normal file
8
modules/comment/queries/deleteComment.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteComment" action="delete">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="comment_srl" var="comment_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/comment/queries/deleteComments.xml
Normal file
8
modules/comment/queries/deleteComments.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteComments" action="delete">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/comment/queries/deleteModuleComments.xml
Normal file
8
modules/comment/queries/deleteModuleComments.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteComments" action="delete">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/comment/queries/getChildCommentCount.xml
Normal file
11
modules/comment/queries/getChildCommentCount.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getChildCommentCount" action="select">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="parent_srl" var="comment_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/comment/queries/getComment.xml
Normal file
11
modules/comment/queries/getComment.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getComment" action="select">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="comment_srl" var="comment_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/comment/queries/getCommentCount.xml
Normal file
11
modules/comment/queries/getCommentCount.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getCommentCount" action="select">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
14
modules/comment/queries/getCommentList.xml
Normal file
14
modules/comment/queries/getCommentList.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="getCommentList" action="select">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="list_order" default="list_order" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
11
modules/comment/queries/getComments.xml
Normal file
11
modules/comment/queries/getComments.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getComments" action="select">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="comment_srl" var="comment_srls" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
15
modules/comment/queries/getNewestCommentList.xml
Normal file
15
modules/comment/queries/getNewestCommentList.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<query id="getNewestCommentList" action="select">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
</navigation>
|
||||
</query>
|
||||
27
modules/comment/queries/getTotalCommentList.xml
Normal file
27
modules/comment/queries/getTotalCommentList.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<query id="getTotalCommentList" action="select">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="s_module_srl" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="content" var="s_content" pipe="or" />
|
||||
<condition operation="like" column="user_name" var="s_user_name" pipe="or" />
|
||||
<condition operation="like" column="nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="email_address" var="s_email_address" pipe="or" />
|
||||
<condition operation="like" column="homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="or" />
|
||||
<condition operation="like_prefix" column="last_update" var="s_last_upate" pipe="or" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
29
modules/comment/queries/getTotalCommentListWithinMember.xml
Normal file
29
modules/comment/queries/getTotalCommentListWithinMember.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<query id="getTotalCommentListWithinMember" action="select">
|
||||
<tables>
|
||||
<table name="comments" alias="comments" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="like" column="member.user_id" var="s_user_id" notnull="notnull" />
|
||||
<condition operation="equal" column="member.member_srl" var="comments.member_srl" notnull="notnull" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="comments.content" var="s_content" />
|
||||
<condition operation="like" column="comments.user_name" var="s_user_name" pipe="or" />
|
||||
<condition operation="like" column="comments.nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="comments.email_address" var="s_email_address" pipe="or" />
|
||||
<condition operation="like" column="comments.homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="like_prefix" column="comments.regdate" var="s_regdate" pipe="or" />
|
||||
<condition operation="like_prefix" column="comments.last_update" var="s_last_upate" pipe="or" />
|
||||
<condition operation="like_prefix" column="comments.ipaddress" var="s_ipaddress" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="comments.list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
23
modules/comment/queries/insertComment.xml
Normal file
23
modules/comment/queries/insertComment.xml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<query id="insertComment" action="insert">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="comment_srl" var="comment_srl" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="parent_srl" var="parent_srl" filter="number" default="0" />
|
||||
<column name="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
<column name="content" var="content" notnull="notnull" />
|
||||
<column name="password" var="password" minlength="2" maxlength="60" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="user_id" var="user_id" default="" />
|
||||
<column name="user_name" var="user_name" default="" />
|
||||
<column name="member_srl" var="member_srl" default="0" filter="number" />
|
||||
<column name="email_address" var="email_address" filter="email" maxlength="250" />
|
||||
<column name="homepage" var="homepage" filter="homepage" maxlength="250" />
|
||||
<column name="uploaded_count" var="uploaded_count" default="0" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
<column name="list_order" var="list_order" default="0" />
|
||||
</columns>
|
||||
</query>
|
||||
21
modules/comment/queries/updateComment.xml
Normal file
21
modules/comment/queries/updateComment.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<query id="updateComment" action="update">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" />
|
||||
<column name="parent_srl" var="parent_srl" filter="number" default="0" />
|
||||
<column name="content" var="content" notnull="notnull" />
|
||||
<column name="password" var="password" minlength="2" maxlength="60" />
|
||||
<column name="user_name" var="user_name" default="" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="email_address" var="email_address" filter="email" maxlength="250" />
|
||||
<column name="homepage" var="homepage" filter="homepage" maxlength="250" />
|
||||
<column name="uploaded_count" var="uploaded_count" default="0" />
|
||||
<column name="last_update" var="last_update" default="curdate()" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="comment_srl" var="comment_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/comment/queries/updateCommentModule.xml
Normal file
11
modules/comment/queries/updateCommentModule.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="updateCommentModule" action="update">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="document_srl" var="document_srls" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
20
modules/comment/schemas/comments.xml
Normal file
20
modules/comment/schemas/comments.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<table name="comments">
|
||||
<column name="comment_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="module_srl" type="number" size="11" default="0" notnull="notnull" index="idx_module_srl" />
|
||||
<column name="document_srl" type="number" size="11" default="0" notnull="notnull" index="idx_document_srl" />
|
||||
<column name="parent_srl" type="number" size="11" default="0" notnull="notnull" />
|
||||
<column name="is_secret" type="char" size="1" default="N" notnull="notnull" />
|
||||
<column name="content" type="bigtext" notnull="notnull" />
|
||||
<column name="password" type="varchar" size="60" />
|
||||
<column name="user_id" type="varchar" size="80" />
|
||||
<column name="user_name" type="varchar" size="80" notnull="notnull" />
|
||||
<column name="nick_name" type="varchar" size="80" notnull="notnull" />
|
||||
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
|
||||
<column name="email_address" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="homepage" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="uploaded_count" type="number" size="11" default="0" notnull="notnull" index="idx_uploaded_count" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="last_update" type="date" index="idx_last_update" />
|
||||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress"/>
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||
</table>
|
||||
96
modules/comment/tpl/comment_list.html
Normal file
96
modules/comment/tpl/comment_list.html
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
<!--%import("filter/delete_checked.xml")-->
|
||||
<!--%import("js/comment_admin.js")-->
|
||||
|
||||
<h3>{$lang->comment} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<!-- 정보 -->
|
||||
<div class="tableSummaryType1">
|
||||
Total <strong>{number_format($total_count)}</strong>, Page <strong>{number_format($page)}</strong>/{number_format($total_page)}
|
||||
</div>
|
||||
|
||||
<form id="fo_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
|
||||
<!-- 목록 -->
|
||||
<table cellspacing="0" class="tableType4">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><input type="checkbox" onclick="doCheckAll(); return false;" /></th>
|
||||
<th scope="col">
|
||||
<div class="nowrap">
|
||||
<select name="module_srl" class="mid_list" id="module_srl">
|
||||
<option value="">{$lang->module}</option>
|
||||
<!--@foreach($mid_list as $key => $val)-->
|
||||
<option value="{$val->module_srl}" <!--@if($module_srl == $val->module_srl)-->selected="selected"<!--@end-->>{$val->browser_title}</option>
|
||||
<!--@end-->
|
||||
</select><a href="#" onclick="location.href=current_url.setQuery('module_srl',xGetElementById('module_srl').options[xGetElementById('module_srl').selectedIndex].value);return false;" class="button"><span>GO</span></a>
|
||||
</div>
|
||||
</th>
|
||||
<th scope="col">{$lang->user_name}</th>
|
||||
<th scope="col">{$lang->date}</th>
|
||||
<th scope="col">{$lang->last_update}</th>
|
||||
<th scope="col">{$lang->ipaddress}</th>
|
||||
<th scope="col">{$lang->cmd_move}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($comment_list as $no => $val)-->
|
||||
<tr>
|
||||
<td rowspan="2" class="tahoma">
|
||||
{$no}
|
||||
</td>
|
||||
<td class="blue"><a href="./?mid={$module_list[$val->module_srl]->mid}" onclick="window.open(this.href);return false">{htmlspecialchars($module_list[$val->module_srl]->browser_title)}</a></td>
|
||||
<td><div class="member_{$val->member_srl}">{htmlspecialchars($val->nick_name)}</div></td>
|
||||
<td class="tahoma">{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td class="tahoma"><!--@if($val->last_upgdate)-->{zdate($val->last_upgdate,"Y-m-d")}<!--@else--> <!--@end--></td>
|
||||
<td class="tahoma">{$val->ipaddress}</td>
|
||||
<td class="blue"><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" onclick="window.open(this.href);return false;">{$lang->cmd_move}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="left">
|
||||
<input type="checkbox" name="cart" value="{$val->comment_srl}" />
|
||||
{cut_str(htmlspecialchars(strip_tags($val->content)),100,'...')}
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 버튼 -->
|
||||
<div class="fr gap1">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_delete_checked_comment}" /></span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- 페이지 네비게이션 -->
|
||||
<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())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
<span class="current">{$page_no}</span>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="goToLast"><img src="../../admin/tpl/images/bottomGotoLast.gif" alt="{$lang->last_page}" width="7" height="5" /></a>
|
||||
</div>
|
||||
|
||||
<!-- 검색 -->
|
||||
<form 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}" />
|
||||
|
||||
<fieldset>
|
||||
<select name="search_target">
|
||||
<option value="">{$lang->search_target}</option>
|
||||
<!--@foreach($lang->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"><input type="submit" value="{$lang->cmd_search}" /></span>
|
||||
<a href="{getUrl('','module',$module,'act',$act)}" class="button"><span>{$lang->cmd_cancel}</span></a>
|
||||
</fieldset>
|
||||
</form>
|
||||
12
modules/comment/tpl/filter/delete_checked.xml
Normal file
12
modules/comment/tpl/filter/delete_checked.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<filter name="delete_checked" module="comment" act="procCommentAdminDeleteChecked" confirm_msg_code="confirm_delete">
|
||||
<form>
|
||||
<node target="cart" required="true" />
|
||||
</form>
|
||||
<parameter>
|
||||
<param name="cart" target="cart" />
|
||||
</parameter>
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
6
modules/comment/tpl/js/comment_admin.js
Normal file
6
modules/comment/tpl/js/comment_admin.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function doCheckAll() {
|
||||
var fo_obj = xGetElementById('fo_list');
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
if(fo_obj[i].name == 'cart') fo_obj[i].checked = true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue