getOne($id); if (!$data) { Dever::alert('错误的信息'); } if ($data['source_id']) { $data['source'] = Dever::db('content/source')->one($data['source_id']); } $data['bdate'] = date('Y年m月d日', $data['bdate']); $data['skill'] = Dever::array_decode($data['skill']); $data['learn'] = Dever::array_decode($data['learn']); $data['life'] = Dever::array_decode($data['life']); $data['ability_array'] = array($data['ability']); if (strstr($data['ability'], ',')) { $data['ability_array'] = explode(',', $data['ability']); } if (strstr($data['ability'], ',')) { $data['ability_array'] = explode(',', $data['ability']); } $data['ability_html'] = ''; if ($data['ability_array']) { foreach ($data['ability_array'] as $v) { $data['ability_html'] .= ''.$v.''; } } $data['skill_html'] = ''; if ($data['skill']) { foreach ($data['skill'] as $v) { $data['skill_html'] .= '
'.$data['desc'].'
'; } if ($data['learn']) { $data['content'] .= ''.$v['name'].'
'; $desc = Dever::split($v['desc']); foreach ($desc as $v1) { $data['content'] .= ''.$v1.'
'; } } } if ($data['life']) { $data['content'] .= ''.$v['name'].'
'; $desc = Dever::split($v['desc']); foreach ($desc as $v1) { $data['content'] .= ''.$v1.'
'; } } } return $data; } # 获取精彩推荐 public function getTop() { $where = array(); $data = Dever::db('content/person')->getTop($where); if ($data) { foreach ($data as $k => $v) { $data[$k]['link'] = Dever::url('about?id=' . $v['id'], 'main'); $data[$k]['bdate'] = date('Y-m-d', $v['bdate']); } } return $data; } }