mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
commit
9d17528db6
6 changed files with 75 additions and 4 deletions
|
|
@ -267,10 +267,26 @@ class communicationModel extends communication
|
|||
$args->page = Context::get('page');
|
||||
$args->list_count = 20;
|
||||
$args->page_count = 10;
|
||||
|
||||
|
||||
return executeQuery($query_id, $args, $columnList);
|
||||
}
|
||||
|
||||
function getReadedMessages($readed = 'N', $columnList = array())
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args = new stdClass();
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->readed = $readed;
|
||||
$args->sort_index = 'message.list_order';
|
||||
$args->page = Context::get('page');
|
||||
$args->list_count = 20;
|
||||
$args->page_count = 10;
|
||||
$output = executeQueryArray('communication.getReadedMessages', $args, $columnList);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of friends
|
||||
* @param int $friend_group_srl (default 0)
|
||||
|
|
|
|||
|
|
@ -165,6 +165,33 @@ class communicationView extends communication
|
|||
$this->setTemplateFile('new_message');
|
||||
}
|
||||
|
||||
function dispCommunicationUnreadList()
|
||||
{
|
||||
$oCommunicationModel = getModel('communication');
|
||||
|
||||
if($this->config->enable_message == 'N')
|
||||
{
|
||||
return $this->stop('msg_invalid_request');
|
||||
}
|
||||
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
return $this->stop('msg_not_logged');
|
||||
}
|
||||
|
||||
$columnList = array('message_srl', 'readed', 'title', 'member.member_srl', 'member.nick_name', 'message.regdate', 'readed_date');
|
||||
$output = $oCommunicationModel->getReadedMessages('N', $columnList);
|
||||
|
||||
// set a template file
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('message_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$this->setTemplateFile('messages');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display message sending
|
||||
* @return void|Object (void : success, Object : fail)
|
||||
|
|
@ -396,7 +423,6 @@ class communicationView extends communication
|
|||
|
||||
$this->setTemplateFile('add_friend_group');
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file communication.view.php */
|
||||
/* Location: ./modules/comment/communication.view.php */
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<action name="dispCommunicationAddFriend" type="view" permission="member" />
|
||||
<action name="dispCommunicationAddFriendGroup" type="view" permission="member" />
|
||||
<action name="dispCommunicationMessageBoxList" type="mobile" permission="member" />
|
||||
<action name="dispCommunicationUnreadList" type="view" permission="member" />
|
||||
|
||||
<action name="procCommunicationUpdateAllowMessage" type="controller" permission="member" />
|
||||
<action name="procCommunicationSendMessage" type="controller" permission="member" ruleset="sendMessage" />
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ $lang->cmd_view_friend = '친구 보기';
|
|||
$lang->cmd_add_friend = '친구 등록';
|
||||
$lang->cmd_message_box = '쪽지함';
|
||||
$lang->cmd_view_message_box = '쪽지함 보기';
|
||||
$lang->cmd_view_unread_message_box = '읽지않은 쪽지함 보기';
|
||||
$lang->cmd_store = '보관함 이동';
|
||||
$lang->cmd_view_selected_frend_group = '선택된 그룹만 보기';
|
||||
$lang->cmd_add_friend_group = '친구 그룹 생성';
|
||||
|
|
|
|||
25
modules/communication/queries/getReadedMessages.xml
Normal file
25
modules/communication/queries/getReadedMessages.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<query id="getReceivedMessages" action="select">
|
||||
<tables>
|
||||
<table name="member_message" alias="message" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="message.*" />
|
||||
<column name="member.user_id" />
|
||||
<column name="member.member_srl" />
|
||||
<column name="member.nick_name" />
|
||||
<column name="member.user_name" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="message.readed" var="readed" notnull="notnull" />
|
||||
<condition operation="equal" column="message.receiver_srl" var="member_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="message.message_type" var="message_type" default="R" pipe="and" />
|
||||
<condition operation="equal" column="message.sender_srl" var="member.member_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="message.list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
<include target="./common_header.html" />
|
||||
<load target="filter/delete_checked_message.xml" />
|
||||
<load target="filter/update_allow_message.xml" />
|
||||
|
||||
<div class="btnArea">
|
||||
<div style="margin:0;display:block;float:left" class="btn-group">
|
||||
<button loop="$lang->message_box => $key,$val" class="btn" onclick="location.href=current_url.setQuery('message_srl', '').setQuery('message_type', '{$key}'); return false;" style="font-weight:bold"|cond="$message_type == $key">{$val}</button>
|
||||
<button loop="$lang->message_box => $key,$val" class="btn" onclick="location.href=current_url.setQuery('act', 'dispCommunicationMessages').setQuery('message_srl', '').setQuery('message_type', '{$key}'); return false;" style="font-weight:bold"|cond="$message_type == $key && $act != 'dispCommunicationUnreadList'">{$val}</button>
|
||||
<button class="btn" onclick="location.href=current_url.setQuery('act', 'dispCommunicationUnreadList'); return false;" style="font-weight:bold"|cond="$act == 'dispCommunicationUnreadList'">{$lang->cmd_view_unread_message_box}</button>
|
||||
</div>
|
||||
<form action="./" method="POST" style="margin:0;display:block;float:right">
|
||||
<input type="hidden" name="module" value="communication" />
|
||||
|
|
@ -67,7 +69,7 @@
|
|||
<td>
|
||||
<a href="#popup_menu_area" class="member_{$val->member_srl}">{$val->nick_name}</a>
|
||||
</td>
|
||||
<td>
|
||||
<td>
|
||||
{zdate($val->regdate,"Y-m-d")}
|
||||
</td>
|
||||
<td><block cond="$val->readed=='Y'">{zdate($val->readed_date,"Y-m-d H:i")}</block> </td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue