Ejemplo n.º 1
0
 function getPmList($folder = 'inbox', $page = array(), $uid = 0)
 {
     $info = parent::getPmList($folder, $page, $uid);
     if (!empty($info)) {
         $list = array();
         foreach ($info['pm_list'] as $key => $val) {
             $val['lastmessage'] = unserialize($val['lastmessage']);
             $val['message'] = $val['lastmessage']['message'];
             $val['date'] = my_date_format2($val['dateline']);
             $list[] = $val;
         }
         if (!empty($list)) {
             $ret = array('pm_list' => $list, 'current_page' => $info['page_arr']['current_page'], 'total_page' => $info['page_arr']['total_page'], 'list_count' => count($list));
             return $ret;
         }
     }
     return false;
 }
Ejemplo n.º 2
0
 function Main()
 {
     $member = $this->_topicLogicGetMember(MEMBER_ID);
     $topic_selected = 'pm';
     $per_page_num = 20;
     $query_link = "index.php?mod=" . ($_GET['mod_original'] ? get_safe_code($_GET['mod_original']) : $this->Module) . ($this->Code ? "&code={$this->Code}&folder=inbox" : "");
     if ($member['newpm']) {
         jlogic('member')->clean_new_remind('newpm', $member['uid']);
     }
     load::logic('pm');
     $PmLogic = new PmLogic();
     $folder = "inbox";
     $page['per_page_num'] = 20;
     $page['query_link'] = $query_link;
     $return_arr = $PmLogic->getPmList($folder, $page);
     $page_html = $return_arr['page_arr']['html'];
     $pm_list = $return_arr['pm_list'];
     $pm_hb = 'hb';
     $this->Title = '我的私信';
     include template('pm_list');
 }
Ejemplo n.º 3
0
 function PmList()
 {
     load::logic('pm');
     $PmLogic = new PmLogic();
     $member = jsg_member_info(MEMBER_ID);
     $folder = $this->Get['folder'] ? $this->Get['folder'] : 'inbox';
     $read = get_param('read');
     $TopicLogic = jlogic('topic');
     if ($member['medal_id']) {
         $medal_list = $TopicLogic->GetMedal($member['medal_id'], $member['uid']);
     }
     $topic_selected = 'pm';
     if ($member['newpm']) {
         jlogic('member')->clean_new_remind('newpm', $member['uid']);
     }
     $page['per_page_num'] = 20;
     $return_arr = array();
     if ($folder == 'inbox') {
         $query_link = "index.php?mod=" . ($_GET['mod_original'] ? get_safe_code($_GET['mod_original']) : $this->Module) . ($this->Code ? "&code={$this->Code}&folder=inbox" : "") . ($read ? "&read=1" : "");
         $page['query_link'] = $query_link;
         $page['read'] = $read;
         $return_arr = $PmLogic->getPmList($folder, $page);
         $this->Title = '我的私信';
     } elseif ($folder == 'outbox') {
         $query_link = "mod=pm&code=list&folder=outbox";
         $page['query_link'] = $query_link;
         $return_arr = $PmLogic->getPmList($folder, $page);
         $this->Title = '草稿箱';
     }
     extract($return_arr);
     $left_menu = $this->LeftMenu();
     include template('pm/pm_list');
 }