mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 12:19:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@131 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2525fe0838
commit
d21fbeb6c6
19 changed files with 132 additions and 65 deletions
|
|
@ -93,7 +93,7 @@
|
|||
$oDocumentController = &getController('document');
|
||||
|
||||
// 삭제 시도
|
||||
$output = $oDocumentController->deleteDocument($document_srl);
|
||||
$output = $oDocumentController->deleteDocument($document_srl, $this->grant->manager);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->add('mid', Context::get('mid'));
|
||||
|
|
@ -232,17 +232,16 @@
|
|||
}
|
||||
|
||||
// 글이 없을 경우 에러
|
||||
if(!$data) return $this->doError('msg_invalid_request');
|
||||
if(!$data) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
// 문서의 비밀번호와 입력한 비밀번호의 비교
|
||||
if($data->password != $password) return $this->doError('msg_invalid_password');
|
||||
if($data->password != $password) return new Object(-1, 'msg_invalid_password');
|
||||
|
||||
// 해당 글에 대한 권한 부여
|
||||
if($comment_srl) {
|
||||
$oCommentController = &getController('comment');
|
||||
$oCommentController->addGrant($comment_srl);
|
||||
} else {
|
||||
$_SESSION['own_document'][$document_srl] = true;
|
||||
$oDocumentController = &getController('document');
|
||||
$oDocumentController->addGrant($document_srl);
|
||||
}
|
||||
|
|
@ -291,7 +290,7 @@
|
|||
* file_srl : 파일의 sequence\n
|
||||
* sid : db에 저장된 비교 값, 틀리면 다운로드 하지 낳음\n
|
||||
**/
|
||||
function procDownload() {
|
||||
function procDownloadFile() {
|
||||
// 다운로드에 필요한 변수 체크
|
||||
$file_srl = Context::get('file_srl');
|
||||
$sid = Context::get('sid');
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@
|
|||
}
|
||||
|
||||
// 삭제하려는 글이 없으면 에러
|
||||
if(!$document) return $this->list();
|
||||
if(!$document) return $this->dispContent();
|
||||
|
||||
// 권한이 없는 경우 비밀번호 입력화면으로
|
||||
if($document&&!$document->is_granted) return $this->setTemplateFile('input_password_form');
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
|
||||
// 해당 댓글를 찾아본다
|
||||
$oCommentModel = &getModel('comment');
|
||||
$source_comment = $oCommentModel->getComment($parent_srl);
|
||||
$source_comment = $oCommentModel->getComment($parent_srl, $this->grant->manager);
|
||||
|
||||
// 댓글이 없다면 오류
|
||||
if(!$source_comment) return $this->dispMessage('msg_invalid_request');
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
|
||||
// 해당 댓글를 찾아본다
|
||||
$oCommentModel = &getModel('comment');
|
||||
$comment = $oCommentModel->getComment($comment_srl);
|
||||
$comment = $oCommentModel->getComment($comment_srl, $this->grant->manager);
|
||||
|
||||
// 댓글이 없다면 오류
|
||||
if(!$comment) return $this->dispMessage('msg_invalid_request');
|
||||
|
|
@ -228,11 +228,11 @@
|
|||
// 삭제하려는 댓글가 있는지 확인
|
||||
if($comment_srl) {
|
||||
$oCommentModel = &getModel('comment');
|
||||
$comment = $oCommentModel->getComment($comment_srl);
|
||||
$comment = $oCommentModel->getComment($comment_srl, $this->grant->manager);
|
||||
}
|
||||
|
||||
// 삭제하려는 글이 없으면 에러
|
||||
if(!$comment) return $this->list();
|
||||
if(!$comment) return $this->dispContent();
|
||||
|
||||
// 권한이 없는 경우 비밀번호 입력화면으로
|
||||
if($comment_srl&&$comment&&!$comment->is_granted) return $this->setTemplateFile('input_password_form');
|
||||
|
|
@ -364,7 +364,7 @@
|
|||
* @brief 게시판의 정보 출력
|
||||
**/
|
||||
function dispAdminBoardInfo() {
|
||||
if(!Context::get('module_srl')) return $this->list();
|
||||
if(!Context::get('module_srl')) return $this->dispContent();
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('info');
|
||||
|
|
@ -382,7 +382,7 @@
|
|||
* @brief 게시판 삭제 화면 출력
|
||||
**/
|
||||
function dispAdminDeleteBoard() {
|
||||
if(!Context::get('module_srl')) return $this->list();
|
||||
if(!Context::get('module_srl')) return $this->dispContent();
|
||||
|
||||
$module_info = Context::get('module_info');
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
<action name="procVerificationPassword" type="controller" />
|
||||
<action name="procDeleteFile" type="controller" />
|
||||
<action name="procUploadFile" type="controller" />
|
||||
<action name="procDownload" type="controller" />
|
||||
<action name="procDownloadFile" type="controller" />
|
||||
<action name="procClearFile" type="controller" />
|
||||
<action name="procInsertGrant" type="controller" grant="root"/>
|
||||
<action name="procUpdateSkinInfo" type="controller" grant="root"/>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<!--@end-->
|
||||
|
||||
<!-- 댓글 입력 폼 -->
|
||||
<!--@if($document->lock_comment == 'N')-->
|
||||
<!--@if($grant->write_comment && $document->lock_comment == 'N')-->
|
||||
<!--#include("./comment_form.html")-->
|
||||
<!--@end-->
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,6 @@
|
|||
<th>{$lang->user_name}</th>
|
||||
<td>{$source_comment->user_name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->readed_count}</th>
|
||||
<td>{$source_comment->readed_count}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->voted_count}</th>
|
||||
<td>{$source_comment->voted_count}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->content}</th>
|
||||
<td height="100" valign="top">{nl2br($source_comment->content)}</td>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<filter name="insert_comment" module="board" action="procInsertComment" confirm_msg_code="confirm_submit">
|
||||
<filter name="insert_comment" module="board" act="procInsertComment" confirm_msg_code="confirm_submit">
|
||||
<form>
|
||||
<node target="document_srl" required="true" />
|
||||
<node target="user_name" required="true" />
|
||||
|
|
@ -9,7 +9,6 @@
|
|||
</form>
|
||||
<parameter>
|
||||
<param name="mid" target="mid" />
|
||||
<param name="act" target="act" />
|
||||
<param name="document_srl" target="document_srl" />
|
||||
<param name="comment_srl" target="comment_srl" />
|
||||
<param name="parent_srl" target="parent_srl" />
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<filter name="search" module="board" act="procSearch">
|
||||
<filter name="search" module="board">
|
||||
<form>
|
||||
<node target="search_target" required="true" />
|
||||
<node target="keyword" minlegnth="2" maxlength="40" required="true" />
|
||||
<node target="search_keyword" minlegnth="2" maxlength="40" required="true" />
|
||||
</form>
|
||||
<parameter>
|
||||
<param name="mid" target="mid" />
|
||||
<param name="search_target" target="search_target" />
|
||||
<param name="keyword" target="keyword" />
|
||||
<param name="search_keyword" target="search_keyword" />
|
||||
</parameter>
|
||||
<response>
|
||||
<response callback_func="completeSearch">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
<filter name="vote" module="board" act="procVote" confirm_msg_code="confirm_vote">
|
||||
<filter name="vote" module="board" act="procVoteDocument" confirm_msg_code="confirm_vote">
|
||||
<form>
|
||||
<node target="document_srl" required="true" />
|
||||
</form>
|
||||
<parameter>
|
||||
<param name="mid" target="mid" />
|
||||
<param name="act" target="act" />
|
||||
<param name="document_srl" target="document_srl" />
|
||||
</parameter>
|
||||
<response callback_func="completeVote">
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ function completeDeleteDocument(ret_obj) {
|
|||
}
|
||||
|
||||
/* 검색 실행 */
|
||||
function completeSearch(fo_obj, args) {
|
||||
function completeSearch(fo_obj, params) {
|
||||
fo_obj.submit();
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,6 @@ function completeVote(ret_obj) {
|
|||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
alert(message);
|
||||
|
||||
location.href = location.href;
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +98,7 @@ function completeDeleteTrackback(ret_obj) {
|
|||
}
|
||||
|
||||
/* 카테고리 이동 */
|
||||
function completeChangeCategory(sel_obj, url) {
|
||||
function doChangeCategory(sel_obj, url) {
|
||||
var category_srl = sel_obj.options[sel_obj.selectedIndex].value;
|
||||
if(!category_srl) location.href=url;
|
||||
else location.href=url+'&category='+category_srl;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<!--@if($category_list)-->
|
||||
<th>
|
||||
<form action="./" method="get">
|
||||
<select name="category" onchange="procChangeCategory(this, '{getUrl('category','')}')" >
|
||||
<select name="category" onchange="doChangeCategory(this, '{getUrl('category','')}')" >
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@foreach($category_list as $val)-->
|
||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="true"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
||||
|
|
@ -105,14 +105,15 @@
|
|||
<div>
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, search)">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="category" value="{$category}" />
|
||||
<select name="search_target">
|
||||
<!--@foreach($search_option as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="true"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="text" name="keyword" value="{htmlspecialchars($keyword)}" />
|
||||
<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','','keyword','','page','1','document_srl','')}'"/>
|
||||
<input type="button" value="{$lang->cmd_cancel}" onclick="location.href='{getUrl('search_target','','search_keyword','','page','1','document_srl','')}'"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
<!-- 현 글의 기본 정보를 담고 있는 form. 필수 -->
|
||||
<form id="fo_document_info" action="./" method="get">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="act" value="procVoteDocument" />
|
||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
||||
</form>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue