18 $oCommunicationModel =
getModel(
'communication');
20 $this->communication_config = $oCommunicationModel->getConfig();
21 $skin = $this->communication_config->skin;
23 Context::set(
'communication_config', $this->communication_config);
25 $config_parse = explode(
'|@|', $skin);
27 if(count($config_parse) > 1)
29 $tpl_path = sprintf(
'./themes/%s/modules/communication/', $config_parse[0]);
33 $tpl_path = sprintf(
'%sskins/%s', $this->module_path, $skin);
39 $layout_info = $oLayoutModel->getLayout($this->communication_config->layout_srl);
42 $this->module_info->layout_srl = $this->communication_config->layout_srl;
56 return $this->
stop(
'msg_not_logged');
61 if(!array_key_exists(
'dispCommunicationMessages',
$logged_info->menu_list))
63 return $this->
stop(
'msg_invalid_request');
70 if(!in_array($message_type, array(
'R',
'S',
'T')))
76 $oCommunicationModel =
getModel(
'communication');
81 $columnList = array(
'message_srl',
'sender_srl',
'receiver_srl',
'message_type',
'title',
'content',
'readed',
'regdate');
82 $message = $oCommunicationModel->getSelectedMessage($message_srl, $columnList);
89 return $this->
stop(
'msg_invalid_request');
96 return $this->
stop(
'msg_invalid_request');
103 return $this->
stop(
'msg_invalid_request');
116 $columnList = array(
'message_srl',
'readed',
'title',
'member.member_srl',
'member.nick_name',
'message.regdate',
'readed_date');
117 $output = $oCommunicationModel->getMessages($message_type, $columnList);
127 $oSecurity->encodeHTML(
'message_list..nick_name');
144 return $this->
stop(
'msg_not_logged');
149 $oCommunicationModel =
getModel(
'communication');
152 $columnList = array(
'message_srl',
'member_srl',
'nick_name',
'title',
'content',
'sender_srl');
153 $message = $oCommunicationModel->getNewMessage($columnList);
162 $flag_file = sprintf(
'%s%s', $flag_path,
$logged_info->member_srl);
177 $oCommunicationModel =
getModel(
'communication');
183 return $this->
stop(
'msg_not_logged');
193 return $this->
stop(
'msg_invalid_request');
199 return $this->
stop(
'msg_cannot_send_to_yourself');
206 $source_message = $oCommunicationModel->getSelectedMessage($message_srl);
207 if($source_message->message_srl == $message_srl && $source_message->sender_srl == $receiver_srl)
209 $source_message->title =
"[re] " . $source_message->title;
210 $source_message->content =
"\r\n<br />\r\n<br /><div style=\"padding-left:5px; border-left:5px solid #DDDDDD;\">" . trim($source_message->content) .
"</div>";
215 $receiver_info = $oMemberModel->getMemberInfoByMemberSrl($receiver_srl);
218 return $this->
stop(
'msg_invalid_request');
225 $option =
new stdClass();
226 $option->primary_key_name =
'receiver_srl';
227 $option->content_key_name =
'content';
228 $option->allow_fileupload = FALSE;
229 $option->enable_autosave = FALSE;
230 $option->enable_default_component = TRUE;
231 $option->enable_component = FALSE;
232 $option->resizable = FALSE;
233 $option->disable_html = TRUE;
234 $option->height = 300;
235 $option->skin = $this->communication_config->editor_skin;
236 $option->colorset = $this->communication_config->editor_colorset;
237 $editor = $oEditorModel->getEditor(
$logged_info->member_srl, $option);
252 return $this->
stop(
'msg_not_logged');
255 $oCommunicationModel =
getModel(
'communication');
258 $tmp_group_list = $oCommunicationModel->getFriendGroups();
259 $group_count = count($tmp_group_list);
261 for($i = 0; $i < $group_count; $i++)
263 $friend_group_list[$tmp_group_list[$i]->friend_group_srl] = $tmp_group_list[$i];
270 $columnList = array(
'friend_srl',
'friend_group_srl',
'target_srl',
'member.nick_name',
'friend.regdate');
272 $output = $oCommunicationModel->getFriends($friend_group_srl, $columnList);
273 $friend_count = count(
$output->data);
277 foreach(
$output->data as $key => $val)
279 $group_srl = $val->friend_group_srl;
280 $group_title = $friend_group_list[$group_srl]->title;
285 $output->data[$key]->group_title = $group_title;
311 return $this->
stop(
'msg_not_logged');
319 return $this->
stop(
'msg_invalid_request');
324 $oCommunicationModel =
getModel(
'communication');
325 $communication_info = $oMemberModel->getMemberInfoByMemberSrl($target_srl);
327 if($communication_info->member_srl != $target_srl)
329 return $this->
stop(
'msg_invalid_request');
335 $friend_group_list = $oCommunicationModel->getFriendGroups();
353 return $this->
stop(
'msg_not_logged');
360 if($friend_group_srl)
362 $oCommunicationModel =
getModel(
'communication');
363 $friend_group = $oCommunicationModel->getFriendGroupInfo($friend_group_srl);
364 if($friend_group->friend_group_srl == $friend_group_srl)
setTemplateFile($filename)
getNumberingPath($no, $size=3)
stripEmbedTagForAdmin(&$content, $writer_member_srl)
dispCommunicationFriend()
set($key, $val, $set_to_get_vars=0)
dispCommunicationNewMessage()
dispCommunicationAddFriendGroup()
dispCommunicationMessages()
dispCommunicationSendMessage()
dispCommunicationAddFriend()