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@948 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e5e8e3deff
commit
516ef7e0f6
8 changed files with 59 additions and 12 deletions
|
|
@ -78,7 +78,7 @@
|
|||
$lang->cmd_store = "보관";
|
||||
$lang->cmd_add_friend_group = '친구 그룹 추가';
|
||||
|
||||
$lang->msg_cart_is_null = '삭제할 대상을 선택해주세요';
|
||||
$lang->msg_cart_is_null = '대상을 선택해주세요';
|
||||
$lang->msg_checked_file_is_deleted = '%d개의 첨부파일이 삭제되었습니다';
|
||||
|
||||
$lang->msg_no_message = '쪽지가 없습니다';
|
||||
|
|
|
|||
|
|
@ -233,10 +233,26 @@
|
|||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 변수 체크
|
||||
$friend_srl_list = trim(Context::get('friend_srl_list'));
|
||||
if(!$friend_srl_list) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$friend_srl_list = explode('|@|', $friend_srl_list);
|
||||
if(!count($friend_srl_list)) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$friend_count = count($friend_srl_list);
|
||||
$target = array();
|
||||
for($i=0;$i<$friend_count;$i++) {
|
||||
$friend_srl = (int)trim($friend_srl_list[$i]);
|
||||
if(!$friend_srl) continue;
|
||||
$target[] = $friend_srl;
|
||||
}
|
||||
if(!count($target)) return new Object(-1,'msg_cart_is_null');
|
||||
|
||||
// 변수 정리
|
||||
$args->friend_srl = Context::get('friend_srl');
|
||||
$args->friend_srls = implode(',',$target);
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->friend_group_srl = Context::get('friend_group_srl');
|
||||
$args->friend_group_srl = Context::get('target_friend_group_srl');
|
||||
|
||||
$output = executeQuery('member.moveFriend', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
|
|||
|
|
@ -286,12 +286,23 @@
|
|||
$oMemberModel = &getModel('member');
|
||||
|
||||
// 그룹 목록을 가져옴
|
||||
$friend_group_list = $oMemberModel->getFriendGroups();
|
||||
$tmp_group_list = $oMemberModel->getFriendGroups();
|
||||
$group_count = count($tmp_group_list);
|
||||
for($i=0;$i<$group_count;$i++) $friend_group_list[$tmp_group_list[$i]->friend_group_srl] = $tmp_group_list[$i];
|
||||
Context::set('friend_group_list', $friend_group_list);
|
||||
|
||||
// 친구 목록을 가져옴
|
||||
$friend_group_srl = Context::get('friend_group_srl');
|
||||
$output = $oMemberModel->getFriends($friend_group_srl);
|
||||
$friend_count = count($output->data);
|
||||
if($friend_count) {
|
||||
foreach($output->data as $key => $val) {
|
||||
$group_srl = $val->friend_group_srl;
|
||||
$group_title = $friend_group_list[$group_srl]->title;
|
||||
if(!$group_title) $group_title = Context::get('default_friend_group');
|
||||
$output->data[$key]->group_title = $group_title;
|
||||
}
|
||||
}
|
||||
|
||||
// 템플릿에 쓰기 위해서 context::set
|
||||
Context::set('total_count', $output->total_count);
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
<table name="member_friend" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="friend_srl" var="friend_srl" notnull="notnull" />
|
||||
<column name="friend_group_srl" var="friend_group_srl" default="0" notnull="notnull" />
|
||||
<column name="member_srl" var="member_srl" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" filter="number"/>
|
||||
<condition operation="in" column="friend_srl" var="friend_srls" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
1
modules/member/skins/default/filter/move_friend.xml
Normal file
1
modules/member/skins/default/filter/move_friend.xml
Normal file
|
|
@ -0,0 +1 @@
|
|||
<filter name="move_friend" module="member" act="procMemberMoveFriend" confirm_msg_code="confirm_move" />
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
<!--%import("js/member.js")-->
|
||||
<!--%import("filter/delete_checked_friend.xml")-->
|
||||
<!--%import("filter/delete_friend_group.xml")-->
|
||||
<!--%import("filter/move_friend.xml")-->
|
||||
|
||||
<div style="width:700px;">
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, delete_checked_friend)">
|
||||
<form id="fo_friend_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked_friend)">
|
||||
|
||||
<!-- 그룹 목록 -->
|
||||
<div style="float:left;width:150px;">
|
||||
|
|
@ -39,7 +40,9 @@
|
|||
<div style="float:left;width:550px;">
|
||||
<table border="1" width="100%">
|
||||
<tr>
|
||||
<th colspan="2">{$lang->user_id}</th>
|
||||
<th><input type="checkbox" name="check_all" onclick="doCheckAll(this, 'fo_friend_list');"/></th>
|
||||
<th>{$lang->friend_group}</th>
|
||||
<th>{$lang->user_id}</th>
|
||||
<th>{$lang->user_name}</th>
|
||||
<th>{$lang->nick_name}</th>
|
||||
<th>{$lang->cmd_send_message}</th>
|
||||
|
|
@ -48,6 +51,7 @@
|
|||
<!--@foreach($friend_list as $no => $val)-->
|
||||
<tr>
|
||||
<td><input type="checkbox" name="friend_srl_list" value="{$val->friend_srl}" /></td>
|
||||
<td><a href="{getUrl('friend_group_srl',$val->friend_group_srl)}">{$val->group_title}</a></td>
|
||||
<td>{$val->user_id}</td>
|
||||
<td>{$val->user_name}</td>
|
||||
<td>{$val->nick_name}</td>
|
||||
|
|
@ -60,6 +64,13 @@
|
|||
<!-- 버튼 -->
|
||||
<div style="clear:both">
|
||||
<input type="submit" value="{$lang->cmd_delete}" />
|
||||
<select name="target_friend_group_srl">
|
||||
<option value="0">{$lang->default_friend_group}</option>
|
||||
<!--@foreach($friend_group_list as $key => $val)-->
|
||||
<option value="{$val->friend_group_srl}">{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="button" value="{$lang->cmd_move}" onclick="doMoveFriend();return false;"/>
|
||||
</div>
|
||||
|
||||
<!-- 페이지 네비게이션 -->
|
||||
|
|
|
|||
|
|
@ -89,10 +89,10 @@ function completeSendMessage(ret_obj) {
|
|||
}
|
||||
|
||||
/* 쪽지 모두 선택 */
|
||||
function doCheckAll(obj) {
|
||||
var fo_obj = xGetElementById("fo_message_list");
|
||||
function doCheckAll(obj, fo_id) {
|
||||
var fo_obj = xGetElementById(fo_id);
|
||||
for(var i=0; i<fo_obj.length; i++) {
|
||||
if(fo_obj[i].type == "checkbox" && fo_obj[i].name == "message_srl_list" ) fo_obj[i].checked = obj.checked;
|
||||
if(fo_obj[i].type == "checkbox" && fo_obj[i] != obj) fo_obj[i].checked = obj.checked;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -157,3 +157,9 @@ function completeDeleteFriendGroup(ret_obj) {
|
|||
function doRenameFriendGroup(friend_group_srl) {
|
||||
popopen("./?module=member&act=dispMemberAddFriendGroup&friend_group_srl="+friend_group_srl);
|
||||
}
|
||||
|
||||
/* 친구 그룹 이동 */
|
||||
function doMoveFriend() {
|
||||
var fo_obj = xGetElementById('fo_friend_list');
|
||||
procFilter(fo_obj, move_friend);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<div>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th><input type="checkbox" name="check_all" onclick="doCheckAll(this);"/></th>
|
||||
<th><input type="checkbox" name="check_all" onclick="doCheckAll(this, 'fo_message_list');"/></th>
|
||||
<th>
|
||||
<!--@if($message_type == "S")-->
|
||||
{$lang->receiver}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue