コード例 #1
0
ファイル: Profile.inc.php プロジェクト: alcexhim/PhoenixSNS
            }
        }
        $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]);
                $entryUrl = System::ExpandRelativePath("~/community/members/" . $thisuser->ShortName . "/journals/" . $journal->Name . "/entries/" . $entry->Name);
                switch ($path[6]) {
                    case "comment":
                        if ($_SERVER["REQUEST_METHOD"] == "POST") {
                            $reply_to = null;
                            if ($_POST["reply_comment_id"] != null) {
                                $reply_to = JournalEntryComment::GetByID($_POST["reply_comment_id"]);
                            }
                            $title = $_POST["comment_title"];
                            $content = $_POST["comment_content"];
                            if (!$entry->AddComment($title, $content, $reply_to)) {