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

This commit is contained in:
zero 2007-03-15 00:48:19 +00:00
parent 06959950e7
commit 42a7f88449
22 changed files with 849 additions and 0 deletions

View file

@ -0,0 +1,32 @@
<?php
/**
* @class comment
* @author zero (zero@nzeo.com)
* @brief comment 모듈의 high class
**/
class comment extends ModuleObject {
/**
* @brief 설치시 추가 작업이 필요할시 구현
**/
function moduleInstall() {
return new Object();
}
/**
* @brief 설치가 이상이 없는지 체크하는 method
**/
function moduleIsInstalled() {
return new Object();
}
/**
* @brief 업데이트 실행
**/
function moduleUpdate() {
return new Object();
}
}
?>

View file

@ -0,0 +1,215 @@
<?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) {
// document_srl에 해당하는 글이 있는지 확인
$document_srl = $obj->document_srl;
if(!$document_srl) return new Object(-1,'msg_invalid_document');
// document model 객체 생성
$oDocumentModel = &getModel('document');
// 원본글을 가져옴
$document = $oDocumentModel->getDocument($document_srl);
if($document_srl != $document->document_srl) return new Object(-1,'msg_invalid_document');
if($document->lock_comment=='Y') return new Object(-1,'msg_invalid_request');
$oDB = &DB::getInstance();
$obj->comment_srl = $oDB->getNextSequence();
$obj->list_order = $obj->comment_srl * -1;
if($obj->password) $obj->password = md5($obj->password);
// 로그인 된 회원일 경우 회원의 정보를 입력
if(Context::get('is_logged')) {
$logged_info = Context::get('logged_info');
$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;
}
// 댓글을 입력
$output = $oDB->executeQuery('comment.insertComment', $obj);
// 입력에 이상이 없으면 해당 글의 댓글 수를 올림
if(!$output->toBool()) return $output;
// comment model객체 생성
$oCommentModel = &getModel('comment');
// 해당 글의 전체 댓글 수를 구해옴
$comment_count = $oCommentModel->getCommentCount($document_srl);
// document의 controller 객체 생성
$oDocumentController = &getController('document');
// 해당글의 댓글 수를 업데이트
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count);
// 댓글의 권한을 부여
$this->addGrant($obj->comment_srl);
$output->add('comment_srl', $obj->comment_srl);
return $output;
}
/**
* @brief 댓글 수정
**/
function updateComment($obj, $is_admin = false) {
// 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');
$oDB = &DB::getInstance();
if($obj->password) $obj->password = md5($obj->password);
// 로그인 되어 있고 작성자와 수정자가 동일하면 수정자의 정보를 세팅
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;
}
}
// 로그인한 유저가 작성한 글인데 user_name이 없을 경우
if($source_obj->member_srl && !$obj->user_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;
}
// 업데이트
$output = $oDB->executeQuery('comment.updateComment', $obj);
$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');
// 삭제
$oDB = &DB::getInstance();
$args->comment_srl = $comment_srl;
$output = $oDB->executeQuery('comment.deleteComment', $args);
if(!$output->toBool()) return new Object(-1, 'msg_error_occured');
// 댓글 수를 구해서 업데이트
$comment_count = $oCommentModel->getCommentCount($document_srl);
// document의 controller 객체 생성
$oDocumentController = &getController('document');
// 해당글의 댓글 수를 업데이트
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count);
$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');
// 삭제
$oDB = &DB::getInstance();
$args->document_srl = $document_srl;
$output = $oDB->executeQuery('comment.deleteComments', $args);
return $output;
}
/**
* @brief 특정 모듈의 모든 댓글 삭제
**/
function deleteModuleComments($module_srl) {
$oDB = &DB::getInstance();
$args->module_srl = $module_srl;
$output = $oDB->executeQuery('comment.deleteModuleComments', $args);
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

@ -0,0 +1,204 @@
<?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) {
$oDB = &DB::getInstance();
$args->comment_srl = $comment_srl;
$output = $oDB->executeQuery('comment.getChildCommentCount', $args);
return (int)$output->data->count;
}
/**
* @brief 댓글 가져오기
**/
function getComment($comment_srl, $is_admin = false) {
// DB에서 가져옴
$oDB = &DB::getInstance();
$args->comment_srl = $comment_srl;
$output = $oDB->executeQuery('comment.getComment', $args);
$comment = $output->data;
// 로그인 사용자의 경우 로그인 정보를 일단 구해 놓음
$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);
$oDB = &DB::getInstance();
$args->comment_srls = $comment_srls;
$output = $oDB->executeQuery('comment.getComments', $args);
return $output->data;
}
/**
* @brief document_srl 해당하는 댓글의 전체 갯수를 가져옴
**/
function getCommentCount($document_srl) {
$oDB = &DB::getInstance();
$args->document_srl = $document_srl;
$output = $oDB->executeQuery('comment.getCommentCount', $args);
$total_count = $output->data->count;
return (int)$total_count;
}
/**
* @brief document_srl에 해당하는 문서의 댓글 목록을 가져옴
**/
function getCommentList($document_srl, $is_admin = false) {
$oDB = &DB::getInstance();
$args->document_srl = $document_srl;
$args->list_order = 'list_order';
$output = $oDB->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');
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;
$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) {
// DB 객체 생성
$oDB = &DB::getInstance();
$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;
// 검색 옵션 정리
$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 = $oDB->executeQuery($query_id, $args);
// 결과가 없거나 오류 발생시 그냥 return
if(!$output->toBool()||!count($output->data)) return $output;
return $output;
}
}
?>

View file

@ -0,0 +1,64 @@
<?php
/**
* @class commentView
* @author zero (zero@nzeo.com)
* @brief comment 모듈의 view 클래스
**/
class commentView extends comment {
/**
* @brief 초기화
**/
function init() {
}
/**
* @brief 목록 출력 (관리자용)
**/
function dispList() {
// 목록을 구하기 위한 옵션
$args->page = Context::get('page'); ///< 페이지
$args->list_count = 50; ///< 한페이지에 보여줄 글 수
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
$args->sort_index = 'list_order'; ///< 소팅 값
// 목록 구함, comment->getCommentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
$oCommentModel = &getModel('comment');
$output = $oCommentModel->getTotalCommentList($args);
// 목록의 loop를 돌면서 mid를 구하기 위한 module_srl값을 구함
$comment_count = count($output->data);
if($comment_count) {
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)) {
$oDB = &DB::getInstance();
$args->module_srls = implode(',',$module_srl_list);
$mid_output = $oDB->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.admin');
$this->setTemplateFile('comment_list');
}
}
?>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<module version="0.1">
<title xml:lang="ko">댓글</title>
<title xml:lang="en">comment</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="en">zero</name>
<description xml:lang="ko">댓글 모듈</description>
<description xml:lang="en">comment</description>
</author>
</module>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<module>
<grants />
<actions>
<action name="dispList" type="view" admin_index="true" standalone="true" />
<action name="procDeleteChecked" type="controller" standalone="true" />
</actions>
</module>

View file

@ -0,0 +1,26 @@
<?php
/**
* @file modules/comment/lang/ko.lang.php
* @author zero <zero@nzeo.com>
* @brief 댓글(comment) 모듈의 기본 언어팩
**/
$lang->module = '모듈';
$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 주소',
);
?>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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" order="asc" />
</navigation>
</query>

View 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>

View file

@ -0,0 +1,24 @@
<query id="getTotalCommentList" action="select">
<tables>
<table name="comments" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="like" column="content" var="s_content" />
<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" />
</conditions>
<navigation>
<index var="sort_index" order="asc" />
<list_count var="list_count" default="20" />
<page_count var="page_count" default="10" />
<page var="page" default="1" />
</navigation>
</query>

View 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" order="asc" />
<list_count var="list_count" default="20" />
<page_count var="page_count" default="10" />
<page var="page" default="1" />
</navigation>
</query>

View file

@ -0,0 +1,21 @@
<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" minlength="2" maxlength="250" />
<column name="password" var="password" minlength="2" maxlength="60" />
<column name="nick_name" var="nick_name" minlength="2" maxlength="40" />
<column name="user_name" var="user_name" default="" minlength="1" maxlength="80" />
<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="regdate" var="regdate" default="curdate()" />
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
<column name="list_order" var="list_order" default="0" />
</columns>
</query>

View file

@ -0,0 +1,20 @@
<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" minlength="2" maxlength="250" />
<column name="password" var="password" minlength="2" maxlength="60" />
<column name="user_name" var="user_name" default="" minlength="1" maxlength="80" />
<column name="nick_name" var="nick_name" minlength="2" maxlength="40" />
<column name="email_address" var="email_address" filter="email" maxlength="250" />
<column name="homepage" var="homepage" filter="homepage" maxlength="250" />
<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>

View file

@ -0,0 +1,18 @@
<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="text" notnull="notnull" />
<column name="password" type="varchar" size="60" />
<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="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>

View file

@ -0,0 +1,83 @@
<!--%import("filter/delete_checked.xml")-->
<!-- 게시판 정보 -->
<div>
{$lang->total_count} : {number_format($total_count)},
{$lang->page_count} : {number_format($page)} / {number_format($total_page)}
</div>
<form action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
<input type="hidden" name="page" value="{$page}" />
<!-- 목록 -->
<div>
<table>
<tr>
<th colspan="2">{$lang->no}</th>
<th>{$lang->module}</th>
<th>{$lang->user_name}</th>
<th>{$lang->content}</th>
<th>{$lang->date}</th>
<th>{$lang->last_update}</th>
<th>{$lang->ipaddress}</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>{$val->user_name}</td>
<td>{$val->content}</td>
<td>{zdate($val->regdate,"Y-m-d")}</td>
<td><!--@if($val->last_upgdate)-->{zdate($val->last_upgdate,"Y-m-d")}<!--@end--></td>
<td>{$val->ipaddress}</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>
</div>
<!-- 버튼 -->
<div>
<input type="submit" value="{$lang->cmd_delete_checked_comment}" />
</div>
</form>
<!-- 검색 -->
<div>
<form action="./" method="get">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="mo" value="{$mo}" />
<input type="hidden" name="act" value="{$act}" />
<div>
<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="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('','module',$module,'mo',$mo,'act',$act)}'"/>
</div>
</form>
</div>
<!-- 페이지 네비게이션 -->
<div>
<a href="{getUrl('page','','comment_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>
<!--@end-->
<!--@end-->
<a href="{getUrl('page',$page_navigation->last_page,'comment_srl','')}">[{$lang->last_page}]</a>
</div>

View file

@ -0,0 +1,12 @@
<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" />
</parameter>
<response>
<tag name="error" />
<tag name="message" />
</response>
</filter>