스크랩한 게시물 삭제 기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/trunk@2020 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-07-26 02:16:52 +00:00
parent 20a90854f0
commit 114795e30e
5 changed files with 37 additions and 0 deletions

View file

@ -49,6 +49,7 @@
<action name="procMemberDeleteMessages" type="controller" standalone="true" />
<action name="procMemberScrapDocument" type="controller" standalone="true" />
<action name="procMemberDeleteScrap" type="controller" standalone="true" />
<action name="procMemberAddFriend" type="controller" standalone="true" />
<action name="procMemberMoveFriend" type="controller" standalone="true" />

View file

@ -353,6 +353,23 @@
$this->setMessage('success_registed');
}
/**
* @brief 스크랩 삭제
**/
function procMemberDeleteScrap() {
// 로그인 정보 체크
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
$document_srl = (int)Context::get('document_srl');
if(!$document_srl) return new Object(-1,'msg_invalid_request');
// 변수 정리
$args->member_srl = $logged_info->member_srl;
$args->document_srl = $document_srl;
return executeQuery('member.deleteScrapDocument', $args);
}
/**
* @brief 친구 추가
**/

View file

@ -0,0 +1,9 @@
<query id="deleteScrapDocument" action="delete">
<tables>
<table name="member_scrap" />
</tables>
<conditions>
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" />
<condition operation="equal" column="document_srl" var="document_srl" notnull="notnull" pipe="and" />
</conditions>
</query>

View file

@ -217,3 +217,10 @@ function doJumpFriendGroup() {
var sel_val = sel_obj.options[sel_idx].value;
location.href = current_url.setQuery('friend_group_srl', sel_val);
}
/* 스크랩 삭제 */
function doDeleteScrap(document_srl) {
var params = new Array();
params['document_srl'] = document_srl;
exec_xml('member', 'procMemberDeleteScrap', params, function() { location.reload(); });
}

View file

@ -13,12 +13,14 @@
<col />
<col width="120" />
<col width="100" />
<col width="100" />
<thead>
<tr>
<th scope="col">{$lang->no}</th>
<th scope="col">{$lang->title}</th>
<th scope="col">{$lang->author}</th>
<th scope="col">{$lang->date}</th>
<th scope="col">{$lang->cmd_delete}</th>
</tr>
</thead>
<tbody>
@ -30,6 +32,7 @@
</td>
<td class="author"><div class="member_{$val->target_member_srl}">{$val->nick_name}</div></td>
<td class="registDate">{zdate($val->regdate, "Y-m-d H:i")}</td>
<td><a href="#" onclick="doDeleteScrap({$val->document_srl}); return false;" class="button"><span>{$lang->cmd_delete}</span></a></td>
</tr>
<!--@end-->
</tbody>