mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 12:49:55 +09:00
스크랩 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/trunk@2005 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c40dfd2e02
commit
d832370fbe
26 changed files with 235 additions and 2 deletions
|
|
@ -129,3 +129,10 @@ function doChangeCategory(sel_obj, url) {
|
|||
location.href = current_url.setQuery('category',category_srl);
|
||||
}
|
||||
}
|
||||
|
||||
/* 스크랩 */
|
||||
function doScrap(document_srl) {
|
||||
var params = new Array();
|
||||
params["document_srl"] = document_srl;
|
||||
exec_xml("member","procMemberScrapDocument", params, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@
|
|||
<!-- 관련 링크 -->
|
||||
<div>
|
||||
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;">{$lang->cmd_print}</a>
|
||||
<!--@if($is_logged)--><a href="#" onclick="doScrap({$oDocument->document_srl}); return false;" >{$lang->cmd_scrap}</a><!--@end-->
|
||||
<a href="{getUrl('document_srl','')}">[{$lang->cmd_list}]</a>
|
||||
<a href="#" onclick="doVote();return false;">[{$lang->cmd_vote}]</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -128,3 +128,10 @@ function doChangeCategory() {
|
|||
var category_srl = sel_obj.options[sel_idx].value;
|
||||
location.href = current_url.setQuery('category',category_srl);
|
||||
}
|
||||
|
||||
/* 스크랩 */
|
||||
function doScrap(document_srl) {
|
||||
var params = new Array();
|
||||
params["document_srl"] = document_srl;
|
||||
exec_xml("member","procMemberScrapDocument", params, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@
|
|||
|
||||
<li class="listButton">
|
||||
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;" class="button"><span>{$lang->cmd_print}</span></a>
|
||||
<!--@if($is_logged)--><a href="#" onclick="doScrap({$oDocument->document_srl}); return false;" class="button"><span>{$lang->cmd_scrap}</span></a><!--@end-->
|
||||
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
|
||||
<a href="#" onclick="doVote();return false;" class="button"><span>{$lang->cmd_vote}</span></a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -128,3 +128,10 @@ function doChangeCategory() {
|
|||
var category_srl = sel_obj.options[sel_idx].value;
|
||||
location.href = current_url.setQuery('category',category_srl);
|
||||
}
|
||||
|
||||
/* 스크랩 */
|
||||
function doScrap(document_srl) {
|
||||
var params = new Array();
|
||||
params["document_srl"] = document_srl;
|
||||
exec_xml("member","procMemberScrapDocument", params, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@
|
|||
|
||||
<li class="listButton">
|
||||
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;" class="button"><span>{$lang->cmd_print}</span></a>
|
||||
<!--@if($is_logged)--><a href="#" onclick="doScrap({$oDocument->document_srl}); return false;" class="button"><span>{$lang->cmd_scrap}</span></a><!--@end-->
|
||||
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
|
||||
<a href="#" onclick="doVote();return false;" class="button"><span>{$lang->cmd_vote}</span></a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -128,3 +128,10 @@ function doChangeCategory() {
|
|||
var category_srl = sel_obj.options[sel_idx].value;
|
||||
location.href = current_url.setQuery('category',category_srl);
|
||||
}
|
||||
|
||||
/* 스크랩 */
|
||||
function doScrap(document_srl) {
|
||||
var params = new Array();
|
||||
params["document_srl"] = document_srl;
|
||||
exec_xml("member","procMemberScrapDocument", params, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@
|
|||
|
||||
<li class="listButton">
|
||||
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;" class="button"><span>{$lang->cmd_print}</span></a>
|
||||
<!--@if($is_logged)--><a href="#" onclick="doScrap({$oDocument->document_srl}); return false;" class="button"><span>{$lang->cmd_scrap}</span></a><!--@end-->
|
||||
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
|
||||
<a href="#" onclick="doVote();return false;" class="button"><span>{$lang->cmd_vote}</span></a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<action name="dispMemberLoginForm" type="view" standalone="true" />
|
||||
<action name="dispMemberLogout" type="view" standalone="true" />
|
||||
<action name="dispMemberOwnDocument" type="view" standalone="true" />
|
||||
<action name="dispMemberScrappedDocument" type="view" standalone="true" />
|
||||
|
||||
<action name="dispMemberMessages" type="view" standalone="true" />
|
||||
<action name="dispMemberSendMessage" type="view" standalone="true" />
|
||||
|
|
@ -47,6 +48,8 @@
|
|||
<action name="procMemberDeleteMessage" type="controller" standalone="true" />
|
||||
<action name="procMemberDeleteMessages" type="controller" standalone="true" />
|
||||
|
||||
<action name="procMemberScrapDocument" type="controller" standalone="true" />
|
||||
|
||||
<action name="procMemberAddFriend" type="controller" standalone="true" />
|
||||
<action name="procMemberMoveFriend" type="controller" standalone="true" />
|
||||
<action name="procMemberDeleteFriend" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
$lang->cmd_manage_id = 'Manage Prohibited ID';
|
||||
$lang->cmd_manage_form = 'Manage Join Form';
|
||||
$lang->cmd_view_own_document = 'View Written Articles';
|
||||
$lang->cmd_view_scrapped_document = '스크랩 보기';
|
||||
$lang->cmd_send_email = 'Send Mail';
|
||||
$lang->cmd_send_message = 'Send Message';
|
||||
$lang->cmd_reply_message = 'Reply Message';
|
||||
|
|
@ -94,6 +95,8 @@
|
|||
$lang->cmd_store = "Keep";
|
||||
$lang->cmd_add_friend_group = 'Add Friend Group';
|
||||
|
||||
$lang->msg_alreay_scrapped = '이미 스크랩된 게시물입니다';
|
||||
|
||||
$lang->msg_cart_is_null = 'Select Target';
|
||||
$lang->msg_checked_file_is_deleted = '%d Attached files are deleted';
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
$lang->cmd_manage_id = '禁止ID管理';
|
||||
$lang->cmd_manage_form = '加入フォーム管理';
|
||||
$lang->cmd_view_own_document = '書き込みのプレビュー';
|
||||
$lang->cmd_view_scrapped_document = '스크랩 보기';
|
||||
$lang->cmd_send_email = 'メール送信';
|
||||
$lang->cmd_send_message = 'メッセージ送信';
|
||||
$lang->cmd_reply_message = 'メッセージへの返信';
|
||||
|
|
@ -94,6 +95,8 @@
|
|||
$lang->cmd_store = "保存";
|
||||
$lang->cmd_add_friend_group = '友達グループ追加';
|
||||
|
||||
$lang->msg_alreay_scrapped = '이미 스크랩된 게시물입니다';
|
||||
|
||||
$lang->msg_cart_is_null = '対象を選択してください。';
|
||||
$lang->msg_checked_file_is_deleted = '%d個の添付ファイルが削除されました。';
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
$lang->cmd_manage_id = '금지아이디관리';
|
||||
$lang->cmd_manage_form = '가입폼관리';
|
||||
$lang->cmd_view_own_document = '작성글 보기';
|
||||
$lang->cmd_view_scrapped_document = '스크랩 보기';
|
||||
$lang->cmd_send_email = '메일 보내기';
|
||||
$lang->cmd_send_message = '쪽지 보내기';
|
||||
$lang->cmd_reply_message = '쪽지 답장';
|
||||
|
|
@ -94,6 +95,8 @@
|
|||
$lang->cmd_store = "보관";
|
||||
$lang->cmd_add_friend_group = '친구 그룹 추가';
|
||||
|
||||
$lang->msg_alreay_scrapped = '이미 스크랩된 게시물입니다';
|
||||
|
||||
$lang->msg_cart_is_null = '대상을 선택해주세요';
|
||||
$lang->msg_checked_file_is_deleted = '%d개의 첨부파일이 삭제되었습니다';
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
$lang->cmd_manage_id = '禁止 I D 管理';
|
||||
$lang->cmd_manage_form = '注册样式管理';
|
||||
$lang->cmd_view_own_document = '查看内容';
|
||||
$lang->cmd_view_scrapped_document = '스크랩 보기';
|
||||
$lang->cmd_send_email = '发送邮件';
|
||||
$lang->cmd_send_message = '发送短信';
|
||||
$lang->cmd_reply_message = '回复短信';
|
||||
|
|
@ -94,6 +95,8 @@
|
|||
$lang->cmd_store = "保管";
|
||||
$lang->cmd_add_friend_group = '添加好友组';
|
||||
|
||||
$lang->msg_alreay_scrapped = '이미 스크랩된 게시물입니다';
|
||||
|
||||
$lang->msg_cart_is_null = '请选择对象';
|
||||
$lang->msg_checked_file_is_deleted = '已删除%d个文件。';
|
||||
|
||||
|
|
@ -166,4 +169,4 @@
|
|||
$lang->about_openid = '用OpenID注册时 I D 和 邮件等基本信息会保存在这个网站,但密码和认证的处理是属于提供OpenID服务的站点。';
|
||||
|
||||
$lang->about_member = "可以管理会员添加/修改/删除/和组管理或注册管理的会员管理模块。\n在基本生成的组以外再生成组以后可以管理会员和通过注册形式的基本信息外还可以收录其他的信息。";
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
$oModuleController->insertActionForward('member', 'view', 'dispMemberLoginForm');
|
||||
$oModuleController->insertActionForward('member', 'view', 'dispMemberLogout');
|
||||
$oModuleController->insertActionForward('member', 'view', 'dispMemberOwnDocument');
|
||||
$oModuleController->insertActionForward('member', 'view', 'dispMemberScrappedDocument');
|
||||
|
||||
$oModuleController->insertActionForward('member', 'view', 'dispMemberMessages');
|
||||
$oModuleController->insertActionForward('member', 'view', 'dispMemberSendMessage');
|
||||
|
|
@ -114,11 +115,16 @@
|
|||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
// dispMemberOwnDocument act의 여부 체크 (2007. 7. 24 추가)
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// dispMemberOwnDocument act의 여부 체크 (2007. 7. 24 추가)
|
||||
$act = $oModuleModel->getActionForward('dispMemberOwnDocument');
|
||||
if(!$act) return true;
|
||||
|
||||
// dispMemberScrappedDocument act의 여부 체크 (2007. 7. 25 추가)
|
||||
$act = $oModuleModel->getActionForward('dispMemberScrappedDocument');
|
||||
if(!$act) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -128,6 +134,7 @@
|
|||
function moduleUpdate() {
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('member', 'view', 'dispMemberOwnDocument');
|
||||
$oModuleController->insertActionForward('member', 'view', 'dispMemberScrappedDocument');
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -303,6 +303,42 @@
|
|||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스크랩 기능
|
||||
**/
|
||||
function procMemberScrapDocument() {
|
||||
// 로그인 정보 체크
|
||||
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');
|
||||
|
||||
// 문서 가져오기
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
// 변수 정리
|
||||
$args->document_srl = $document_srl;
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->user_id = $oDocument->get('user_id');
|
||||
$args->user_name = $oDocument->get('user_name');
|
||||
$args->nick_name = $oDocument->get('nick_name');
|
||||
$args->target_member_srl = $oDocument->get('member_srl');
|
||||
$args->title = $oDocument->get('title');
|
||||
|
||||
// 있는지 조사
|
||||
$output = executeQuery('member.getScrapDocument', $args);
|
||||
if($output->data->count) return new Object(-1, 'msg_alreay_scrapped');
|
||||
|
||||
// 입력
|
||||
$output = executeQuery('member.addScrapDocument', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 친구 추가
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
'dispMemberMessages' => Context::getLang('cmd_view_message_box'),
|
||||
'dispMemberFriend' => Context::getLang('cmd_view_friend'),
|
||||
'dispMemberOwnDocument' => Context::getLang('cmd_view_own_document'),
|
||||
'dispMemberScrappedDocument' => Context::getLang('cmd_view_scrapped_document'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -148,6 +149,31 @@
|
|||
$this->setTemplateFile('document_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 스크랩 게시물 보기
|
||||
**/
|
||||
function dispMemberScrappedDocument() {
|
||||
$oMemberModel = &getModel('member');
|
||||
|
||||
// 로그인 되어 있지 않을 경우 로그인 되어 있지 않다는 메세지 출력
|
||||
if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->page = (int)Context::get('page');
|
||||
|
||||
$output = executeQuery('member.getScrapDocumentList', $args);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('document_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
Context::set('my_menu', $this->my_menu);
|
||||
|
||||
$this->setTemplateFile('scrapped_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 로그인 폼 출력
|
||||
**/
|
||||
|
|
|
|||
16
modules/member/queries/addScrapDocument.xml
Normal file
16
modules/member/queries/addScrapDocument.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<query id="addScrapDocument" action="insert">
|
||||
<tables>
|
||||
<table name="member_scrap" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="member_srl" var="member_srl" notnull="notnull" />
|
||||
<column name="document_srl" var="document_srl" default="0" />
|
||||
<column name="title" var="title" />
|
||||
<column name="user_id" var="user_id" />
|
||||
<column name="user_name" var="user_name" />
|
||||
<column name="nick_name" var="nick_name" />
|
||||
<column name="target_member_srl" var="target_member_srl" default="0" />
|
||||
<column name="regdate" default="curdate()" />
|
||||
<column name="list_order" default="sequence()" />
|
||||
</columns>
|
||||
</query>
|
||||
12
modules/member/queries/getScrapDocument.xml
Normal file
12
modules/member/queries/getScrapDocument.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getScrapDocument" action="select">
|
||||
<tables>
|
||||
<table name="member_scrap" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<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>
|
||||
17
modules/member/queries/getScrapDocumentList.xml
Normal file
17
modules/member/queries/getScrapDocumentList.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<query id="getScrapDocumentList" action="select">
|
||||
<tables>
|
||||
<table name="member_scrap" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="list_order" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
11
modules/member/schemas/member_scrap.xml
Normal file
11
modules/member/schemas/member_scrap.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<table name="member_scrap">
|
||||
<column name="member_srl" type="number" size="11" notnull="notnull" unique="unique_scrap" />
|
||||
<column name="document_srl" type="number" size="11" notnull="notnull" unique="unique_scrap" />
|
||||
<column name="title" type="varchar" size="250" />
|
||||
<column name="user_id" type="varchar" size="80" />
|
||||
<column name="user_name" type="varchar" size="80" notnull="notnull" />
|
||||
<column name="nick_name" type="varchar" size="80" notnull="notnull" />
|
||||
<column name="target_member_srl" type="number" size="11" notnull="notnull" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||
</table>
|
||||
56
modules/member/skins/default/scrapped_list.html
Normal file
56
modules/member/skins/default/scrapped_list.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{@ $member_title = $lang->cmd_view_scrapped_document }
|
||||
<!--#include("./common_header.html")-->
|
||||
|
||||
<!-- 정보 -->
|
||||
<div class="boardInformation">
|
||||
Total : <strong>{number_format($total_count)}</strong>,
|
||||
Page <strong>{number_format($page)}</strong>/{number_format($total_page)}
|
||||
</div>
|
||||
|
||||
<!-- 목록 -->
|
||||
<table cellspacing="0" class="list">
|
||||
<col width="80" />
|
||||
<col />
|
||||
<col width="120" />
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($document_list as $no => $val)-->
|
||||
<tr class="bg{($no+1)%2+1}">
|
||||
<td class="num">{$no}</td>
|
||||
<td class="title">
|
||||
<a href="{getUrl('','document_srl',$val->document_srl)}" onclick="window.open(this.href);return false;">{htmlspecialchars($val->title)}</a>
|
||||
</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>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 버튼 -->
|
||||
<div class="clear fr gap1">
|
||||
<a href="{getUrl('act','','selected_module_srl','')}" class="button"><span>{$lang->cmd_back}</span></a>
|
||||
</div>
|
||||
|
||||
<!-- 페이지 네비게이션 -->
|
||||
<div class="pageNavigation">
|
||||
<a href="{getUrl('page','','module_srl','')}" class="goToFirst"><img src="./images/bottomGotoFirst.gif" alt="{$lang->first_page}" width="7" height="5" /></a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
<span class="current">{$page_no}</span>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="goToLast"><img src="./images/bottomGotoLast.gif" alt="{$lang->last_page}" width="7" height="5" /></a>
|
||||
</div>
|
||||
|
||||
<!--#include("./common_footer.html")-->
|
||||
Loading…
Add table
Add a link
Reference in a new issue