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@129 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
515e928b12
commit
969c831a18
18 changed files with 78 additions and 64 deletions
|
|
@ -37,14 +37,20 @@
|
||||||
$module = 'install';
|
$module = 'install';
|
||||||
$mid = NULL;
|
$mid = NULL;
|
||||||
|
|
||||||
// mid가 없이 document_srl만 있다면 document_srl로 mid를 찾음
|
// 설치가 되어 있을시에 요청받은 모듈을 확인 (없으면 기본 모듈, 기본 모듈도 없으면 에러 출력)
|
||||||
} elseif(!$module) {
|
} else {
|
||||||
|
|
||||||
// document_srl만 있다면 mid를 구해옴
|
// document_srl만 있다면 mid를 구해옴
|
||||||
if(!$mid && $document_srl) $module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl);
|
if(!$mid && $document_srl) $module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl);
|
||||||
|
|
||||||
// mid 값에 대한 모듈 정보를 추출
|
// document_srl에 의한 모듈 찾기가 안되었거나 document_srl이 없을시 처리
|
||||||
if(!$module_info) $module_info = $oModuleModel->getModuleInfoByMid($mid);
|
if(!$module_info) {
|
||||||
|
// mid 값이 있으면 모듈을 찾기
|
||||||
|
if($mid) $module_info = $oModuleModel->getModuleInfoByMid($mid);
|
||||||
|
|
||||||
|
// mid값이 없고 module지정이 없을시
|
||||||
|
elseif(!$module) $module_info = $oModuleModel->getModuleInfoByMid($mid);
|
||||||
|
}
|
||||||
|
|
||||||
// 모듈 정보에서 module 이름을 구해움
|
// 모듈 정보에서 module 이름을 구해움
|
||||||
$module = $module_info->module;
|
$module = $module_info->module;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@
|
||||||
* @brief 모듈의 정보 세팅
|
* @brief 모듈의 정보 세팅
|
||||||
**/
|
**/
|
||||||
function setModuleInfo($module_info, $xml_info) {
|
function setModuleInfo($module_info, $xml_info) {
|
||||||
|
|
||||||
// 기본 변수 설정
|
// 기본 변수 설정
|
||||||
$this->mid = $module_info->mid;
|
$this->mid = $module_info->mid;
|
||||||
$this->module = $module_info->module;
|
$this->module = $module_info->module;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ function filterAlertMessage(ret_obj) {
|
||||||
var message = ret_obj["message"];
|
var message = ret_obj["message"];
|
||||||
var redirect_url = ret_obj["redirect_url"];
|
var redirect_url = ret_obj["redirect_url"];
|
||||||
var url = location.href;
|
var url = location.href;
|
||||||
if(typeof(message)!='undefined'&&message) alert(message);
|
if(typeof(message)!='undefined'&&message&&message!='success') alert(message);
|
||||||
if(typeof(redirect_url)!='undefined'&&redirect_url) url = redirect_url;
|
if(typeof(redirect_url)!='undefined'&&redirect_url) url = redirect_url;
|
||||||
location.href = url;
|
location.href = url;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@
|
||||||
* @brief 초기화
|
* @brief 초기화
|
||||||
**/
|
**/
|
||||||
function init() {
|
function init() {
|
||||||
// 파일 업로드일 경우 $act값을 procUploadFile() 로 변경
|
|
||||||
if(Context::isUploaded() && $this->grant->fileupload) Context::set('act', 'procUploadFile');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -25,7 +23,8 @@
|
||||||
|
|
||||||
// member모듈 controller 객체 생성
|
// member모듈 controller 객체 생성
|
||||||
$oMemberController = &getController('member');
|
$oMemberController = &getController('member');
|
||||||
return $oMemberController->doLogin($user_id, $password);
|
$output = $oMemberController->doLogin($user_id, $password);
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -41,6 +40,7 @@
|
||||||
* @brief 문서 입력
|
* @brief 문서 입력
|
||||||
**/
|
**/
|
||||||
function procInsertDocument() {
|
function procInsertDocument() {
|
||||||
|
|
||||||
// 글작성시 필요한 변수를 세팅
|
// 글작성시 필요한 변수를 세팅
|
||||||
$obj = Context::getRequestVars();
|
$obj = Context::getRequestVars();
|
||||||
$obj->module_srl = $this->module_srl;
|
$obj->module_srl = $this->module_srl;
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
$oDocumentController = &getController('document');
|
$oDocumentController = &getController('document');
|
||||||
|
|
||||||
// 이미 존재하는 글인지 체크
|
// 이미 존재하는 글인지 체크
|
||||||
$document = $oDocumentModel->getDocument($obj->document_srl);
|
$document = $oDocumentModel->getDocument($obj->document_srl, $this->grant->manager);
|
||||||
|
|
||||||
// 이미 존재하는 경우 수정
|
// 이미 존재하는 경우 수정
|
||||||
if($document->document_srl == $obj->document_srl) {
|
if($document->document_srl == $obj->document_srl) {
|
||||||
|
|
@ -66,6 +66,7 @@
|
||||||
$msg_code = 'success_registed';
|
$msg_code = 'success_registed';
|
||||||
$obj->document_srl = $output->get('document_srl');
|
$obj->document_srl = $output->get('document_srl');
|
||||||
}
|
}
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
// 트랙백 발송
|
// 트랙백 발송
|
||||||
$trackback_url = Context::get('trackback_url');
|
$trackback_url = Context::get('trackback_url');
|
||||||
|
|
@ -75,10 +76,9 @@
|
||||||
$oTrackbackController->sendTrackback($obj, $trackback_url, $trackback_charset);
|
$oTrackbackController->sendTrackback($obj, $trackback_url, $trackback_charset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$output->toBool()) return $output;
|
|
||||||
$this->setMessage($msg_code);
|
|
||||||
$this->add('mid', Context::get('mid'));
|
$this->add('mid', Context::get('mid'));
|
||||||
$this->add('document_srl', $output->get('document_srl'));
|
$this->add('document_srl', $output->get('document_srl'));
|
||||||
|
$this->setMessage($msg_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -270,6 +270,9 @@
|
||||||
* @brief 첨부파일 업로드
|
* @brief 첨부파일 업로드
|
||||||
**/
|
**/
|
||||||
function procUploadFile() {
|
function procUploadFile() {
|
||||||
|
// 업로드 권한이 없거나 정보가 없을시 종료
|
||||||
|
if(!Context::isUploaded() || !$this->grant->fileupload) exit();
|
||||||
|
|
||||||
// 기본적으로 필요한 변수인 document_srl, module_srl을 설정
|
// 기본적으로 필요한 변수인 document_srl, module_srl을 설정
|
||||||
$document_srl = Context::get('document_srl');
|
$document_srl = Context::get('document_srl');
|
||||||
$module_srl = $this->module_srl;
|
$module_srl = $this->module_srl;
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
|
|
||||||
// 지정된 글이 없다면 (신규) 새로운 번호를 만든다
|
// 지정된 글이 없다면 (신규) 새로운 번호를 만든다
|
||||||
if($document_srl) {
|
if($document_srl) {
|
||||||
$document = $oDocumentModel->getDocument($document_srl);
|
$document = $oDocumentModel->getDocument($document_srl, $this->grant->manager);
|
||||||
if(!$document) {
|
if(!$document) {
|
||||||
unset($document_srl);
|
unset($document_srl);
|
||||||
Context::set('document_srl','');
|
Context::set('document_srl','');
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<a href="{getUrl('act','dispCommentModifyForm','comment_srl',$val->comment_srl)}">[{$lang->cmd_modify}]</a>
|
<a href="{getUrl('act','dispCommentModify','comment_srl',$val->comment_srl)}">[{$lang->cmd_modify}]</a>
|
||||||
<a href="{getUrl('act','dispCommentReplyForm','comment_srl',$val->comment_srl)}">[{$lang->cmd_reply}]</a>
|
<a href="{getUrl('act','dispCommentReply','comment_srl',$val->comment_srl)}">[{$lang->cmd_reply}]</a>
|
||||||
<a href="{getUrl('act','dispCommentDeleteForm','comment_srl',$val->comment_srl)}">[{$lang->cmd_delete}]</a>
|
<a href="{getUrl('act','dispCommentDelete','comment_srl',$val->comment_srl)}">[{$lang->cmd_delete}]</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--%import("filter/filter.delete_trackback.xml")-->
|
<!--%import("filter/delete_trackback.xml")-->
|
||||||
<!--#include("header.html")-->
|
<!--#include("header.html")-->
|
||||||
|
|
||||||
<form action="./" method="get" onsubmit="return procFormFilter(this, delete_trackback)">
|
<form action="./" method="get" onsubmit="return procFilter(this, delete_trackback)">
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="act" value="procDeleteTrackback" />
|
<input type="hidden" name="act" value="procDeleteTrackback" />
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
<input type="hidden" name="page" value="{$page}" />
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,7 @@
|
||||||
<filter name="logout" module="board" act="procLogout">
|
<filter name="logout" module="board" act="procLogout">
|
||||||
<form>
|
<form>
|
||||||
<node target="mid" required="true" />
|
<node target="mid" required="true" />
|
||||||
<node target="act" required="true" />
|
|
||||||
</form>
|
</form>
|
||||||
<parameter>
|
|
||||||
<param name="mid" target="mid" />
|
|
||||||
<param name="act" target="act" />
|
|
||||||
</parameter>
|
|
||||||
<response>
|
<response>
|
||||||
<tag name="error" />
|
<tag name="error" />
|
||||||
<tag name="message" />
|
<tag name="message" />
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,6 @@ function completeDocumentInserted(ret_obj) {
|
||||||
location.href = url;
|
location.href = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* 글 삭제 */
|
/* 글 삭제 */
|
||||||
function procDeleteDocument(ret_obj, response_tags) {
|
function procDeleteDocument(ret_obj, response_tags) {
|
||||||
var error = ret_obj['error'];
|
var error = ret_obj['error'];
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
<!--%import("filter/filter.login.xml")-->
|
<!--%import("filter/login.xml")-->
|
||||||
<!--#include("header.html")-->
|
<!--#include("header.html")-->
|
||||||
|
|
||||||
<form action="./" method="get" onsubmit="return procFilter(this, login)">
|
<form action="./" method="get" onsubmit="return procFilter(this, login)">
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="act" value="procLogin" />
|
|
||||||
<table>
|
<table>
|
||||||
<col width="120" />
|
<col width="120" />
|
||||||
<col width="*" />
|
<col width="*" />
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
<!--%import("filter/filter.logout.xml")-->
|
<!--%import("filter/logout.xml")-->
|
||||||
<!--#include("header.html")-->
|
<!--#include("header.html")-->
|
||||||
|
|
||||||
<form action="./" method="get" onsubmit="return procFilter(this, logout)">
|
<form action="./" method="get" onsubmit="return procFilter(this, logout)">
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="act" value="procLogout" />
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{$lang->cmd_logout}</th>
|
<th>{$lang->cmd_logout}</th>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<a href="{getUrl('act','dispTrackbackDeleteForm','trackback_srl',$val->trackback_srl)}">[{$lang->cmd_delete}]</a>
|
<a href="{getUrl('act','dispTrackbackDelete','trackback_srl',$val->trackback_srl)}">[{$lang->cmd_delete}]</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{$lang->content}</th>
|
<th>{$lang->content}</th>
|
||||||
<td height="100" valign="top">{Document::transContent($document->content)}</td>
|
<td height="100" valign="top">{$document->content}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
|
|
@ -92,8 +92,8 @@
|
||||||
<div>
|
<div>
|
||||||
<a href="{getUrl('document_srl','')}">[{$lang->cmd_list}]</a>
|
<a href="{getUrl('document_srl','')}">[{$lang->cmd_list}]</a>
|
||||||
<a href="#" onclick="doVote();return false;">[{$lang->cmd_vote}]</a>
|
<a href="#" onclick="doVote();return false;">[{$lang->cmd_vote}]</a>
|
||||||
<a href="{getUrl('act','dispWriteForm')}">[{$lang->cmd_modify}]</a>
|
<a href="{getUrl('act','dispWrite')}">[{$lang->cmd_modify}]</a>
|
||||||
<a href="{getUrl('act','dispDeleteForm')}">[{$lang->cmd_delete}]</a>
|
<a href="{getUrl('act','dispDelete')}">[{$lang->cmd_delete}]</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<form action="./" method="post" onsubmit="return procFilter(this, insert)" <!--@if($grant->fileupload)-->enctype="multipart/form-data"<!--@end-->>
|
<form action="./" method="post" onsubmit="return procFilter(this, insert)" <!--@if($grant->fileupload)-->enctype="multipart/form-data"<!--@end-->>
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="act" value="procInsertDocument" />
|
<input type="hidden" name="act" value="procUploadFile" />
|
||||||
<input type="hidden" name="content" value="{htmlspecialchars($document->content)}" />
|
<input type="hidden" name="content" value="{htmlspecialchars($document->content)}" />
|
||||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,8 @@
|
||||||
* @brief 문서 수정
|
* @brief 문서 수정
|
||||||
**/
|
**/
|
||||||
function updateDocument($source_obj, $obj) {
|
function updateDocument($source_obj, $obj) {
|
||||||
|
$oDB = &DB::getInstance();
|
||||||
|
|
||||||
// 기본 변수들 정리
|
// 기본 변수들 정리
|
||||||
if($obj->is_secret!='Y') $obj->is_secret = 'N';
|
if($obj->is_secret!='Y') $obj->is_secret = 'N';
|
||||||
if($obj->allow_comment!='Y') $obj->allow_comment = 'N';
|
if($obj->allow_comment!='Y') $obj->allow_comment = 'N';
|
||||||
|
|
@ -91,16 +93,18 @@
|
||||||
|
|
||||||
// 카테고리가 변경되었으면 검사후 없는 카테고리면 0으로 세팅
|
// 카테고리가 변경되었으면 검사후 없는 카테고리면 0으로 세팅
|
||||||
if($source_obj->category_srl!=$obj->category_srl) {
|
if($source_obj->category_srl!=$obj->category_srl) {
|
||||||
$category_list = $this->getCategoryList($obj->module_srl);
|
$oDocumentModel = &getModel('document');
|
||||||
|
$category_list = $oDocumentModel->getCategoryList($obj->module_srl);
|
||||||
if(!$category_list[$obj->category_srl]) $obj->category_srl = 0;
|
if(!$category_list[$obj->category_srl]) $obj->category_srl = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 태그 처리
|
// 태그 처리
|
||||||
$oTagController = &getController('tag');
|
if($source_obj->tags != $obj->tags) {
|
||||||
$obj->tags = $oTagController->insertTag($obj->module_srl, $obj->document_srl, $obj->tags);
|
$oTagController = &getController('tag');
|
||||||
|
$obj->tags = $oTagController->insertTag($obj->module_srl, $obj->document_srl, $obj->tags);
|
||||||
|
}
|
||||||
|
|
||||||
// 수정
|
// 수정
|
||||||
$oDB = &DB::getInstance();
|
|
||||||
$obj->update_order = $oDB->getNextSequence() * -1;
|
$obj->update_order = $oDB->getNextSequence() * -1;
|
||||||
|
|
||||||
// 공지사항일 경우 list_order에 무지막지한 값을, 그렇지 않으면 document_srl*-1값을
|
// 공지사항일 경우 list_order에 무지막지한 값을, 그렇지 않으면 document_srl*-1값을
|
||||||
|
|
@ -111,7 +115,6 @@
|
||||||
|
|
||||||
// DB에 입력
|
// DB에 입력
|
||||||
$output = $oDB->executeQuery('document.updateDocument', $obj);
|
$output = $oDB->executeQuery('document.updateDocument', $obj);
|
||||||
|
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
// 성공하였을 경우 category_srl이 있으면 카테고리 update
|
// 성공하였을 경우 category_srl이 있으면 카테고리 update
|
||||||
|
|
@ -189,14 +192,26 @@
|
||||||
$document_srl = $document->document_srl;
|
$document_srl = $document->document_srl;
|
||||||
|
|
||||||
// session에 정보로 조회수를 증가하였다고 생각하면 패스
|
// session에 정보로 조회수를 증가하였다고 생각하면 패스
|
||||||
if($_SESSION['readed_document'][$document_srl]) return;
|
if($_SESSION['readed_document'][$document_srl]) return false;
|
||||||
|
|
||||||
// member model 객체 생성
|
// 글의 작성 ip와 현재 접속자의 ip가 동일하면 패스
|
||||||
$oMemberModel = &getModel('member');
|
if($document->ipaddress == $_SERVER['REMOTE_ADDR']) {
|
||||||
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
$_SESSION['readed_document'][$document_srl] = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// 글쓴이와 현재 로그인 사용자의 정보가 일치하면 읽었다고 생각하고 세션 등록후 패스
|
// document의 작성자가 회원일때 조사
|
||||||
if($member_srl && $member_srl == $document->member_srl) return $_SESSION['readed_document'][$document_srl] = true;
|
if($document->member_srl) {
|
||||||
|
// member model 객체 생성
|
||||||
|
$oMemberModel = &getModel('member');
|
||||||
|
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
||||||
|
|
||||||
|
// 글쓴이와 현재 로그인 사용자의 정보가 일치하면 읽었다고 생각하고 세션 등록후 패스
|
||||||
|
if($member_srl && $member_srl == $document->member_srl) {
|
||||||
|
$_SESSION['readed_document'][$document_srl] = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// DB 객체 생성
|
// DB 객체 생성
|
||||||
$oDB = &DB::getInstance();
|
$oDB = &DB::getInstance();
|
||||||
|
|
@ -207,6 +222,7 @@
|
||||||
} else {
|
} else {
|
||||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||||
}
|
}
|
||||||
|
$args->document_srl = $document_srl;
|
||||||
$output = $oDB->executeQuery('document.getDocumentReadedLogInfo', $args);
|
$output = $oDB->executeQuery('document.getDocumentReadedLogInfo', $args);
|
||||||
|
|
||||||
// 로그 정보에 조회 로그가 있으면 세션 등록후 패스
|
// 로그 정보에 조회 로그가 있으면 세션 등록후 패스
|
||||||
|
|
@ -219,7 +235,7 @@
|
||||||
$output = $oDB->executeQuery('document.insertDocumentReadedLog', $args);
|
$output = $oDB->executeQuery('document.insertDocumentReadedLog', $args);
|
||||||
|
|
||||||
// 세션 정보에 남김
|
// 세션 정보에 남김
|
||||||
$_SESSION['readed_document'][$document_srl] = true;
|
return $_SESSION['readed_document'][$document_srl] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -30,20 +30,12 @@
|
||||||
$output = $oDB->executeQuery('document.getDocument', $args);
|
$output = $oDB->executeQuery('document.getDocument', $args);
|
||||||
$document = $output->data;
|
$document = $output->data;
|
||||||
|
|
||||||
if(!$get_extra_info) return $document;
|
|
||||||
|
|
||||||
// document controller 객체 생성
|
|
||||||
$oDocumentController = &getController('document');
|
|
||||||
|
|
||||||
// 조회수 업데이트
|
|
||||||
$oDocumentController->updateReadedCount($document);
|
|
||||||
|
|
||||||
// 이 문서에 대한 권한이 있는지 확인
|
// 이 문서에 대한 권한이 있는지 확인
|
||||||
if($this->isGranted($document->document_srl) || $is_admin) {
|
if($this->isGranted($document->document_srl) || $is_admin) {
|
||||||
$document->is_granted = true;
|
$document->is_granted = true;
|
||||||
} elseif($document->member_srl) {
|
} elseif($document->member_srl) {
|
||||||
$oMemberModel = &getMemberModel('member');
|
$oMemberModel = &getMemberModel('member');
|
||||||
$member_srl = $oMemberModel->getMemberSrl();
|
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
||||||
if($member_srl && $member_srl ==$document->member_srl) $document->is_granted = true;
|
if($member_srl && $member_srl ==$document->member_srl) $document->is_granted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -51,6 +43,18 @@
|
||||||
if($document->is_secret=='Y' && !$document->is_granted) {
|
if($document->is_secret=='Y' && !$document->is_granted) {
|
||||||
$document->title = $document->content = Context::getLang('msg_is_secret');
|
$document->title = $document->content = Context::getLang('msg_is_secret');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 내용 변경
|
||||||
|
$document->content = $this->transContent($document->content);
|
||||||
|
|
||||||
|
// 확장 정보(코멘트나 기타 등등) 플래그가 false이면 기본 문서 정보만 return
|
||||||
|
if(!$get_extra_info) return $document;
|
||||||
|
|
||||||
|
// document controller 객체 생성
|
||||||
|
$oDocumentController = &getController('document');
|
||||||
|
|
||||||
|
// 조회수 업데이트
|
||||||
|
if($buff = $oDocumentController->updateReadedCount($document)) $document->readed_count++;
|
||||||
|
|
||||||
// 댓글 가져오기
|
// 댓글 가져오기
|
||||||
if($document->comment_count && $document->allow_comment == 'Y') {
|
if($document->comment_count && $document->allow_comment == 'Y') {
|
||||||
|
|
@ -89,7 +93,7 @@
|
||||||
|
|
||||||
// 권한 체크
|
// 권한 체크
|
||||||
$oMemberModel = &getModel('member');
|
$oMemberModel = &getModel('member');
|
||||||
$member_srl = $oMemberModel->getMemberSrl();
|
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
||||||
|
|
||||||
$document_count = count($document_list);
|
$document_count = count($document_list);
|
||||||
for($i=0;$i<$document_count;$i++) {
|
for($i=0;$i<$document_count;$i++) {
|
||||||
|
|
@ -159,7 +163,7 @@
|
||||||
|
|
||||||
// 권한 체크
|
// 권한 체크
|
||||||
$oMemberModel = &getModel('member');
|
$oMemberModel = &getModel('member');
|
||||||
$member_srl = $oMemberModel->getMemberSrl();
|
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
||||||
|
|
||||||
foreach($output->data as $key => $document) {
|
foreach($output->data as $key => $document) {
|
||||||
$is_granted = false;
|
$is_granted = false;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<columns>
|
<columns>
|
||||||
<column name="document_srl" var="document_srl" filter="number" default="0" notnull="notnull" />
|
<column name="document_srl" var="document_srl" filter="number" default="0" notnull="notnull" />
|
||||||
<column name="member_srl" var="member_srl" filter="number" default="0" />
|
<column name="member_srl" var="member_srl" filter="number" default="0" />
|
||||||
<column name="ipaddress"var="ipaddress" default="ipaddress()" />
|
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||||
<column name="regdate" var="regdate" default="curdate()" />
|
<column name="regdate" var="regdate" default="curdate()" />
|
||||||
</columns>
|
</columns>
|
||||||
</query>
|
</query>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<table name="document_readed_log">
|
<table name="document_readed_log">
|
||||||
<column name="document_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
<column name="document_srl" type="number" size="11" notnull="notnull" index="idx_document_srl" />
|
||||||
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
|
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
|
||||||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress"/>
|
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress"/>
|
||||||
<column name="regdate" type="date" index="idx_regdate" />
|
<column name="regdate" type="date" index="idx_regdate" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue