mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
modify DB Queries
This commit is contained in:
parent
577ea49b92
commit
e7b8c1d1df
5 changed files with 53 additions and 29 deletions
|
|
@ -1147,12 +1147,16 @@ class boardView extends board
|
|||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
if($logged_info->member_srl != $oDocument->get('member_srl') || !$this->grant->manager)
|
||||
if($logged_info->member_srl != $oDocument->get('member_srl') && $this->grant->manager !== true)
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
$updatelog = $oDocumentModel->getDocumentUpdateLog($document_srl);
|
||||
Context::set('total_count', $updatelog->page_navigation->total_count);
|
||||
Context::set('total_page', $updatelog->page_navigation->total_page);
|
||||
Context::set('page', $updatelog->page);
|
||||
Context::set('page_navigation', $updatelog->page_navigation);
|
||||
Context::set('updatelog', $updatelog);
|
||||
|
||||
$this->setTemplateFile('update_list');
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ $lang->secret = '비밀글 기능';
|
|||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
$lang->update_log = '게시글 수정 내역';
|
||||
$lang->last_updater = '수정한사람';
|
||||
$lang->cmd_board_list = '게시판 목록';
|
||||
$lang->cmd_module_config = '게시판 공통 설정';
|
||||
$lang->cmd_board_info = '게시판 정보';
|
||||
|
|
|
|||
|
|
@ -1,27 +1,42 @@
|
|||
<include target="_header.html" />
|
||||
<div class="update-log" loop="$updatelog=>$val" cond="$updatelog">
|
||||
<div class="board_read" >
|
||||
<!-- READ HEADER -->
|
||||
<div class="read_header">
|
||||
<h1>
|
||||
<a href="{getUrl('category',$val->category_srl, 'document_srl', '')}" class="category" cond="$module_info->use_category=='Y' && $val->category_srl">{$category_list[$val->category_srl]->title}</a>
|
||||
<a>{$val->title}</a>
|
||||
</h1>
|
||||
<p class="meta">
|
||||
<span class="time">
|
||||
<i class="xi-time"></i> {zdate($val->regdate,'Y.m.d H:i:s')}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- READ BODY -->
|
||||
<div class="read_body">
|
||||
{$val->content}
|
||||
</div>
|
||||
<!-- /READ BODY -->
|
||||
</div>
|
||||
<div class="board_list" id="board_list">
|
||||
<table width="100%" border="1" cellspacing="0" summary="List of Articles">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title"><span>{$lang->title}</span></th>
|
||||
<th scope="col"><span>{$lang->writer}</span></th>
|
||||
<th scope="col"><span>{$lang->last_updater}</span></th>
|
||||
<th scope="col"><span>{$lang->last_post}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody cond="$updatelog->data">
|
||||
<tr loop="$updatelog->data=>$val">
|
||||
<td class="title">
|
||||
<a href="">{$val->title}</a>
|
||||
</td>
|
||||
<td class="author">
|
||||
{$val->update_nick_name}
|
||||
</td>
|
||||
<td class="author">
|
||||
{$val->nick_name}
|
||||
</td>
|
||||
<td class="time">
|
||||
{zdate($val->regdate, 'Y.m.d H:i:s')}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody cond="!$updatelog->data">
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center">{$lang->msg_dont_have_update_log}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination pagination-centered">
|
||||
<a href="{getUrl('page','','module_srl','')}" class="direction">« {$lang->first_page}</a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<strong cond="$page==$page_no">{$page_no}</strong>
|
||||
<a cond="$page!=$page_no" href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} »</a>
|
||||
</div>
|
||||
|
||||
<div class="update-log" cond="!$updatelog">
|
||||
{$lang->msg_dont_have_update_log}
|
||||
</div>
|
||||
|
|
@ -1554,9 +1554,8 @@ class documentModel extends document
|
|||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQueryArray('document.getDocumentUpdateLog', $args);
|
||||
$update_list = $output->data;
|
||||
|
||||
return $update_list;
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
/* End of file document.model.php */
|
||||
|
|
|
|||
|
|
@ -3,7 +3,12 @@
|
|||
<table name="document_update_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
<column name="nick_name" />
|
||||
<column name="update_nick_name" />
|
||||
<column name="regdate" />
|
||||
<column name="title" />
|
||||
<column name="module_srl" />
|
||||
<column name="update_id" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue