Example #1
0
                $errorPage->Message = "This user's profile is only visible to their friends. Please <a href=\"" . System::ExpandRelativePath("~/community/members/" . $thisuser->ShortName . "/connect") . "\">add this person as a friend</a> to see this person's profile.";
            } else {
                if ($thisuser->ProfileVisibility == UserProfileVisibility::ExtendedFriends) {
                    $errorPage->Message = "This user's profile is only visible to their friends, or friends of their friends. Please <a href=\"" . System::ExpandRelativePath("~/community/members/" . $thisuser->ShortName . "/connect") . "\">add this person as a friend</a> to see this person's profile.";
                } else {
                    if ($thisuser->ProfileVisibility == UserProfileVisibility::Sitewide) {
                        $errorPage->Message = "This person's profile is not visible to people outside of " . System::GetConfigurationValue("Application.Name") . ". Please <a href=\"" . System::ExpandRelativePath("~/account/login.page") . "\">log in to " . System::GetConfigurationValue("Application.Name") . "</a> to see this person's profile.";
                    } else {
                        $errorPage->Message = "Unknown profile visibility " . $thisuser->ProfileVisibility;
                    }
                }
            }
        }
        $errorPage->ReturnButtonURL = "~/community/members";
        $errorPage->ReturnButtonText = "Return to User List";
        $errorPage->Render();
        return;
    }
}
switch ($path[2]) {
    case "journals":
        if ($path[4] == "entries.rss" || $path[4] == "entries.atom") {
            require "journal/detail.inc.php";
            return;
        } else {
            if ($path[4] == "entries" && $path[6] == "comment") {
                $journal = Journal::GetByIDOrName($path[3]);
                if ($journal == null) {
                    return;
                }
                $entry = JournalEntry::GetByIDOrName($path[5]);
Example #2
0
use WebFX\System;
use WebFX\Controls\ButtonGroup;
use WebFX\Controls\ButtonGroupButton;
use WebFX\Controls\BreadcrumbItem;
use WebFX\Controls\Panel;
use PhoenixSNS\Objects\Group;
use PhoenixSNS\Objects\User;
use PhoenixSNS\Pages\ErrorPage;
$thisgroup = Group::GetByIDOrName($path[1]);
if ($thisgroup == null) {
    $page = new ErrorPage("Group not found");
    $page->Message = "That group does not exist in the system. It may have been deleted, or you may have typed the name incorrectly.";
    $page->ReturnButtonURL = "~/community/groups";
    $page->ReturnButtonText = "Return to Group List";
    $page->Render();
    return;
}
class GroupDetailPage extends CommunityPage
{
    public $Group;
    public $Path;
    public function __construct($group)
    {
        parent::__construct();
        $this->Title = $group->Title;
        $this->Group = $group;
    }
    protected function Initialize()
    {
        parent::Initialize();