mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@389 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4a0d78077e
commit
7c8f6326a1
5 changed files with 136 additions and 14 deletions
|
|
@ -141,14 +141,59 @@
|
||||||
// DB 객체 생성
|
// DB 객체 생성
|
||||||
$oDB = &DB::getInstance();
|
$oDB = &DB::getInstance();
|
||||||
|
|
||||||
|
$query_id = 'comment.getTotalCommentList';
|
||||||
|
|
||||||
// 변수 설정
|
// 변수 설정
|
||||||
$args->sort_index = $obj->sort_index;
|
$args->sort_index = 'list_order';
|
||||||
$args->page = $obj->page?$obj->page:1;
|
$args->page = $obj->page?$obj->page:1;
|
||||||
$args->list_count = $obj->list_count?$obj->list_count:20;
|
$args->list_count = $obj->list_count?$obj->list_count:20;
|
||||||
$args->page_count = $obj->page_count?$obj->page_count:10;
|
$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 쿼리 실행
|
// comment.getTotalCommentList 쿼리 실행
|
||||||
$output = $oDB->executeQuery('comment.getTotalCommentList', $args);
|
$output = $oDB->executeQuery($query_id, $args);
|
||||||
|
|
||||||
// 결과가 없거나 오류 발생시 그냥 return
|
// 결과가 없거나 오류 발생시 그냥 return
|
||||||
if(!$output->toBool()||!count($output->data)) return $output;
|
if(!$output->toBool()||!count($output->data)) return $output;
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,16 @@
|
||||||
|
|
||||||
$lang->msg_cart_is_null = '삭제할 글을 선택해주세요';
|
$lang->msg_cart_is_null = '삭제할 글을 선택해주세요';
|
||||||
$lang->msg_checked_comment_is_deleted = '%d개의 댓글이 삭제되었습니다';
|
$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 주소',
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,24 @@
|
||||||
<query id="getTotalCommentList" action="select">
|
<query id="getTotalCommentList" action="select">
|
||||||
<tables>
|
<tables>
|
||||||
<table name="comments" />
|
<table name="comments" />
|
||||||
</tables>
|
</tables>
|
||||||
<columns>
|
<columns>
|
||||||
<column name="*" />
|
<column name="*" />
|
||||||
</columns>
|
</columns>
|
||||||
<navigation>
|
<conditions>
|
||||||
<index var="sort_index" order="asc" />
|
<condition operation="like" column="content" var="s_content" />
|
||||||
<list_count var="list_count" default="20" />
|
<condition operation="like" column="user_name" var="s_user_name" pipe="or" />
|
||||||
<page_count var="page_count" default="10" />
|
<condition operation="like" column="nick_name" var="s_nick_name" pipe="or" />
|
||||||
<page var="page" default="1" />
|
<condition operation="like" column="email_address" var="s_email_address" pipe="or" />
|
||||||
</navigation>
|
<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>
|
</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" order="asc" />
|
||||||
|
<list_count var="list_count" default="20" />
|
||||||
|
<page_count var="page_count" default="10" />
|
||||||
|
<page var="page" default="1" />
|
||||||
|
</navigation>
|
||||||
|
</query>
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
<th>{$lang->user_name}</th>
|
<th>{$lang->user_name}</th>
|
||||||
<th>{$lang->content}</th>
|
<th>{$lang->content}</th>
|
||||||
<th>{$lang->date}</th>
|
<th>{$lang->date}</th>
|
||||||
|
<th>{$lang->last_update}</th>
|
||||||
|
<th>{$lang->ipaddress}</th>
|
||||||
<th>{$lang->cmd_move}</th>
|
<th>{$lang->cmd_move}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<!--@foreach($comment_list as $no => $val)-->
|
<!--@foreach($comment_list as $no => $val)-->
|
||||||
|
|
@ -28,6 +30,8 @@
|
||||||
<td>{$val->user_name}</td>
|
<td>{$val->user_name}</td>
|
||||||
<td>{$val->content}</td>
|
<td>{$val->content}</td>
|
||||||
<td>{zdate($val->regdate,"Y-m-d")}</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}&#comment_{$val->comment_srl}');return false">{$lang->cmd_move}</a></td>
|
<td><a href="#" onclick="window.open('./?document_srl={$val->document_srl}&#comment_{$val->comment_srl}');return false">{$lang->cmd_move}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
@ -41,6 +45,28 @@
|
||||||
|
|
||||||
</form>
|
</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>
|
<div>
|
||||||
<a href="{getUrl('page','','comment_srl','')}">[{$lang->first_page}]</a>
|
<a href="{getUrl('page','','comment_srl','')}">[{$lang->first_page}]</a>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue