function getUserInfo() { $uid = intval($this->Get['uid']); if ($uid < 1) { $uid = MEMBER_ID; } $is_follow = false; $is_blacklist = false; if ($uid > 0) { $member = Mobile::convert($this->TopicLogic->GetMember($uid)); if (empty($member)) { $error_code = 400; } else { if ($member['uid'] != MEMBER_ID) { $is_follow = chk_follow(MEMBER_ID, $member['uid']); if (!$is_follow) { Mobile::logic('friend'); $FriendLogic = new FriendLogic(); $is_blacklist = $FriendLogic->check($member['uid']); } } } } else { Mobile::show_message(400); } include template('user_info'); }
function view() { $uid = MEMBER_ID; $vid = empty($this->Get['vid']) ? 0 : intval($this->Get['vid']); $newpoll = $hotpoll = $poll = $option = array(); $vote = $this->VoteLogic->id2voteinfo($vid); if (empty($vote) || $vote['verify'] == 0 && MEMBER_ROLE_TYPE != 'admin') { $this->Messager('当前投票不存在或正在审核中!'); } $this->item_id = $vid; $ret = $this->VoteLogic->process_detail($vote, MEMBER_ID); extract($ret); $member = jsg_member_info($vote['uid']); if ($member['uid'] != MEMBER_ID) { $fllow = chk_follow(MEMBER_ID, $member['uid']); $follow_html = follow_html($member['uid'], $fllow); $all_vote_btn = "他的全部投票"; } else { $follow_html = ''; $all_vote_btn = "我的全部投票"; } if ($member['uid'] == MEMBER_ID || MEMBER_ROLE_TYPE == 'admin') { $exp_info = $this->VoteLogic->get_publish_form_param(); extract($exp_info); } $recd_list = $this->VoteLogic->get_recd_list(); jfunc('app'); $gets = array('mod' => 'vote', 'code' => 'view', 'vid' => $vid); $page_url = 'index.php?' . url_implode($gets); $options = array('page' => true, 'perpage' => 5, 'page_url' => $page_url); $topic_info = app_get_topic_list($this->item, $vid, $options); $topic_list = array(); if (!empty($topic_info)) { $topic_list = $topic_info['list']; $page_arr['html'] = $topic_info['page']['html']; } $params = array('item' => $this->item, 'item_id' => $vid, 'oc' => 'view'); $no_from = true; $this->item = 'vote'; $this->item_id = $vid; $set_qun_closed = 1; $set_vote_closed = 1; $expiration = FALSE; if ($vote['expiration'] < TIMESTAMP) { $expiration = true; } $this->Title = '投票 - ' . $vote['subject']; include template("vote/vote_view"); }