コード例 #1
0
ファイル: discussion_new_c.php プロジェクト: malimu/Pipeline
        if (!$project->isInvited(Session::getUserID()) && !$project->isMember(Session::getUserID()) && !$project->isTrusted(Session::getUserID()) || ProjectUser::isBanned(Session::getUserID(), $project->getID())) {
            header('Location: ' . Url::error());
            exit;
        }
    }
}
// get category, if exists
$c = isset($_GET['cat']) ? Filter::text($_GET['cat']) : null;
switch ($c) {
    case 'basics':
        $cat = BASICS_ID;
        break;
    case 'tasks':
        $cat = TASKS_ID;
        break;
    case 'people':
        $cat = PEOPLE_ID;
        break;
    case 'activity':
        $cat = ACTIVITY_ID;
        break;
    default:
        $cat = null;
}
// get your discussions
$yourDiscussions = Discussion::getByUserID(Session::getUserID(), $project->getID());
$soup = new Soup();
$soup->set('project', $project);
$soup->set('cat', $cat);
$soup->set('yourDiscussions', $yourDiscussions);
$soup->render('project/page/discussionNew');