/** * 显示单个公告 */ private function _show() { $this->_modelBulletin = $this->_getGlobalData('Model_Bulletin', 'object'); $data = $this->_modelBulletin->findById($_GET['Id']); if (!$data) { $this->_utilMsg->showMsg('该条记录已经被删除', -1); } $this->_modelBulletin->userRead($_GET['Id']); //当前登录用户读取$_GET['Id']邮件 $kind = $this->_modelBulletin->createBulletinKind(); $users = $this->_getGlobalData('user'); $data['word_user_id'] = $users[$data['user_id']]['nick_name']; $data['word_kind'] = $kind[$data['kind']]; $data['create_time'] = date('Y-m-d H:i:s', $data['create_time']); $data['not_read'] = unserialize($data['not_read']); if (count($data['not_read'])) { //如果还有未读用户 $data['word_not_read'] = array(); foreach ($data['not_read'] as $userId) { $data['word_not_read'][$userId] = $users[$userId]['nick_name']; } $data['word_not_read'] = implode(',', $data['word_not_read']); } $this->_view->assign('data', $data); $this->_view->set_tpl(array('body' => 'ServiceTools/Show.html')); $this->_utilMsg->createNavBar(); $this->_view->display(); }