Ejemplo n.º 1
0
    if ($relation['relation'] == 2) {
        $expand = isset($message['expand']) ? unserialize($message['expand']) : array();
        $message = $messageServer->getMessage($expand['parentid']);
        !$message && Showmsg("该条消息不存在");
        $mid = $message['mid'];
    }
    $message['rid'] = $rid;
    $userListHtml = getAllUsersHtml($message);
    $smsList = $messageServer->getReplies($userId, $mid, $rid);
    $attachs = $messageServer->showAttachs($userId, $mid);
    //parse attaches
    if ($attachs) {
        require_once R_P . 'require/bbscode.php';
        $attachShow = new attachShow(true);
        foreach ($attachs as $k => $v) {
            $atype = $attachShow->analyse($v);
            foreach ($smsList as $k2 => $v2) {
                $smsList[$k2]['content'] = $attachShow->parseContent($smsList[$k2]['content'], $atype, $v);
            }
        }
    }
} elseif ($action == 'unread') {
    $pageCount = ceil($notReadCount / $perpage);
    $page = validatePage($page, $pageCount);
    $smsList = $messageServer->getMessagesNotRead($userId, $page, $perpage);
    $pages = numofpage($notReadCount, $page, $pageCount, "{$normalUrl}&action=unread&");
    !$notReadCount && ($emptyListTip = "暂无任何未读消息");
} elseif ($action == 'previous') {
    S::gp(array('rid'), 'GP');
    empty($rid) && Showmsg("undefined_action");
    !$smstype && ($smstype = null);