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@274 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4b8ef42252
commit
90d8971c4a
6 changed files with 55 additions and 17 deletions
|
|
@ -132,5 +132,28 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모든 코멘트를 시간 역순으로 가져옴 (관리자용)
|
||||
**/
|
||||
function getTotalCommentList($obj) {
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 변수 설정
|
||||
$args->sort_index = $obj->sort_index;
|
||||
$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;
|
||||
|
||||
// document.getDocumentList 쿼리 실행
|
||||
$output = $oDB->executeQuery('comment.getTotalCommentList', $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
**/
|
||||
function dispList() {
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->page = $page; ///< 페이지
|
||||
$args->page = Context::get('page'); ///< 페이지
|
||||
$args->list_count = 50; ///< 한페이지에 보여줄 글 수
|
||||
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
// 목록 구함, comment->getCommentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
||||
$oCommentModel = &getModel('comment');
|
||||
$output = $oCommentModel->getCommentList($args);
|
||||
$output = $oCommentModel->getTotalCommentList($args);
|
||||
|
||||
// 목록의 loop를 돌면서 mid를 구하기 위한 module_srl값을 구함
|
||||
$comment_count = count($output->data);
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
if(count($module_srl_list)) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module_srls = implode(',',$module_srl_list);
|
||||
$mid_output = $oDB->executeQuery('comment.getModuleInfoByModuleSrl', $args);
|
||||
$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];
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 템플릿에 쓰기 위해서 comment_model::getCommentList() 의 return object에 있는 값들을 세팅
|
||||
// 템플릿에 쓰기 위해서 comment_model::getTotalCommentList() 의 return object에 있는 값들을 세팅
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
|
|
|
|||
14
modules/comment/lang/ko.lang.php
Normal file
14
modules/comment/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?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개의 글이 삭제되었습니다';
|
||||
?>
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
<!--%import("filter/search.xml")-->
|
||||
<!--%import("filter/delete_checked.xml")-->
|
||||
<!--%import("js/document.js")-->
|
||||
<!--%import("js/comment.js")-->
|
||||
<!--#include("header.html")-->
|
||||
|
||||
<!-- 게시판 정보 -->
|
||||
<div>
|
||||
{$lang->document_count} : {number_format($total_count)},
|
||||
{$lang->total_count} : {number_format($total_count)},
|
||||
{$lang->page_count} : {number_format($page)} / {number_format($total_page)}
|
||||
</div>
|
||||
|
||||
|
|
@ -24,13 +24,13 @@
|
|||
<th>{$lang->voted_count}</th>
|
||||
<th>{$lang->date}</th>
|
||||
</tr>
|
||||
<!--@foreach($document_list as $no => $val)-->
|
||||
<!--@foreach($comment_list as $no => $val)-->
|
||||
<tr>
|
||||
<td>{$no}</td>
|
||||
<td><input type="checkbox" name="cart" value="{$val->document_srl}" /></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('./?document_srl={$val->document_srl}');return false">{$val->title}</a>
|
||||
<a href="#" onclick="window.open('./?comment_srl={$val->comment_srl}');return false">{$val->title}</a>
|
||||
<!--@if($val->comment_count>0)-->
|
||||
[{$val->comment_count}]
|
||||
<!--@end-->
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<!-- 버튼 -->
|
||||
<div>
|
||||
<input type="submit" value="{$lang->cmd_delete_checked_document}" />
|
||||
<input type="submit" value="{$lang->cmd_delete_checked_comment}" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
<div>
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, search)">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="mo" value="document" />
|
||||
<input type="hidden" name="mo" value="comment" />
|
||||
<input type="hidden" name="act" value="dispList" />
|
||||
<select name="search_target">
|
||||
<!--@foreach($search_option as $key => $val)-->
|
||||
|
|
@ -67,21 +67,21 @@
|
|||
</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','document_srl','')}'"/>
|
||||
<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','','document_srl','')}">[{$lang->first_page}]</a>
|
||||
<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,'document_srl','')}">[{$page_no}]</a>
|
||||
<a href="{getUrl('page',$page_no,'comment_srl','')}">[{$page_no}]</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'document_srl','')}">[{$lang->last_page}]</a>
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'comment_srl','')}">[{$lang->last_page}]</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@
|
|||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief module_srl에 해당하는 문서의 전체 갯수를 가져옴
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
**/
|
||||
function dispList() {
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->page = $page; ///< 페이지
|
||||
$args->page = Context::get('page'); ///< 페이지
|
||||
$args->list_count = 50; ///< 한페이지에 보여줄 글 수
|
||||
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
if(count($module_srl_list)) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module_srls = implode(',',$module_srl_list);
|
||||
$mid_output = $oDB->executeQuery('document.getModuleInfoByModuleSrl', $args);
|
||||
$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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue