/** * 取得某条留言标题 * @param integer $appid 留言唯一标识 * */ public function getOnlySubject($sign = 1, $appid) { switch ($sign) { case 1: $subject = $this->db->getOne('diary', 'subject', "id='{$appid}'"); break; case 2: $subject = $this->db->getOne('vote', 'subject', "id='{$appid}'"); break; case 3: $subject = $this->db->getOne('userrecord', 'content', "id='{$appid}'"); break; case 4: $album = new Album_Model(); $array = $album->getAlbumInfoByAid($appid); $subject = $array['data']['album_name']; break; case 5: $photo = new Photo_Model(); $array = $photo->getPhotoInfoByPid($appid); $subject = $array['data']['pic_title']; break; case 6: $album = new Group_Model(); $array = $album->getAlbumInfoByAid($appid); $subject = $array['data']['album_name']; break; case 7: $photo = new Group_Model(); $array = $photo->getPhotoInfoByPid($appid); $subject = $array['data']['pic_title']; break; case 8: $album = new Group_Model(); $array = $album->getAlbumInfoByAid($appid); $subject = $array['data']['group_id']; break; default: break; } return $subject; }