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@571 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
742ebb99c9
commit
0f62d5b189
6 changed files with 49 additions and 0 deletions
|
|
@ -30,6 +30,16 @@
|
|||
<th>ipaddress</th>
|
||||
<td>{$val->ipaddress}</td>
|
||||
</tr>
|
||||
<!--@if($val->uploaded_count && $val->uploaded_list)-->
|
||||
<tr>
|
||||
<th>{$lang->uploaded_file}</th>
|
||||
<td>
|
||||
<!--@foreach($val->uploaded_list as $key => $file)-->
|
||||
<div><a href="{$file->download_url}">{$file->source_filename} ({FileHandler::filesize($file->file_size)})</a> ({number_format($file->download_count)})</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="{getUrl('act','dispReplyComment','comment_srl',$val->comment_srl)}">[{$lang->cmd_reply}]</a>
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@
|
|||
$obj->homepage = $logged_info->homepage;
|
||||
}
|
||||
|
||||
// file의 Model객체 생성
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
// 첨부 파일의 갯수를 구함
|
||||
$obj->uploaded_count = $oFileModel->getFilesCount($obj->comment_srl);
|
||||
|
||||
// 댓글을 입력
|
||||
$output = $oDB->executeQuery('comment.insertComment', $obj);
|
||||
|
||||
|
|
@ -116,6 +122,12 @@
|
|||
$obj->homepage = $source_obj->homepage;
|
||||
}
|
||||
|
||||
// file의 Model객체 생성
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
// 첨부 파일의 갯수를 구함
|
||||
$obj->uploaded_count = $oFileModel->getFilesCount($obj->document_srl);
|
||||
|
||||
// 업데이트
|
||||
$output = $oDB->executeQuery('comment.updateComment', $obj);
|
||||
|
||||
|
|
@ -149,6 +161,12 @@
|
|||
$output = $oDB->executeQuery('comment.deleteComment', $args);
|
||||
if(!$output->toBool()) return new Object(-1, 'msg_error_occured');
|
||||
|
||||
// 첨부 파일 삭제
|
||||
if($comment->uploaded_count) {
|
||||
$oFileController = &getController('file');
|
||||
$oFileController->deleteFiles($comment->module_srl, $comment_srl);
|
||||
}
|
||||
|
||||
// 댓글 수를 구해서 업데이트
|
||||
$comment_count = $oCommentModel->getCommentCount($document_srl);
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,13 @@
|
|||
$output = $oDB->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');
|
||||
|
||||
|
|
@ -95,6 +102,10 @@
|
|||
// 로그인 사용자의 경우 로그인 정보를 일단 구해 놓음
|
||||
$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;
|
||||
|
|
@ -103,6 +114,13 @@
|
|||
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<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" />
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<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="uploaded_count" var="uploaded_count" default="0" />
|
||||
<column name="last_update" var="last_update" default="curdate()" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
</columns>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<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"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue