$method($where); $data['info'] = array(); $data['total'] = Dever::total(); if ($info) { foreach ($info as $k => $v) { $data['info'][$k]['uid'] = $v['uid']; $data['info'][$k]['content'] = $v['content']; $data['info'][$k]['playtime'] = $v['playtime']; if ($v['pic']) { $data['info'][$k]['pic'] = explode(',', $v['pic']); } if ($user) { $data['info'][$k]['user'] = Dever::load('user/lib/info')->get($v['uid'], $collection_id, true); $data['info'][$k]['cdate_string'] = Dever::mdate($v['cdate'], 2); } } } return $data; } # 发表信息 public function submit($uid, $id, $type, $pic, $content, $playtime, $score_type = false, $score_type_id = false) { $where['uid'] = $uid; $where['type_id'] = $id; $where['type'] = $type; $where['content'] = $content; if ($pic) { $where['pic'] = $pic; } if ($playtime) { $where['playtime'] = $playtime; } $table = 'community/comment'; $info = false; if (!$info) { Dever::db($table)->insert($where); Dever::score($uid, 'submit_comment', '发布弹幕/评论', false, false, false, $score_type, $score_type_id); } return true; } }