Пример #1
0
    case "admin_pagesmanage":
        $userID = _FCORE::IsSetPostDefault(PAGES_USERID, false);
        if ($userID){
            if (($userID == _SESSION::GetUserID() && _SESSION::GetCanCDSelf()) ||
                ($userID != _SESSION::GetUserID() && _SESSION::GetCanCDOther())){
                $db = _DB::_Connect();

                $bypase = ($userID == _SESSION::GetUserID() || _SESSION::GetDefaultRight() > 0);
                $arr = $bypase ? DB_USER::_GetAllPageRightsForUser($db, $userID) : array();
                $forum = ThreadedForumBuilder::MakeFolderHierarchyForUser(
                        DB_PAGE::_GetPageListForUserID($db, $userID),
                        $arr,
                        1,
                        $bypase);

                echo ThreadedForumViewer::BuildViewForAdminPageManage($forum,
                        $userID == _SESSION::GetUserID() ?
                            _SESSION::GetCanCDSelf() :
                            _SESSION::GetCanCDOther());
                $db->disconnect();
            } else {
                echo "Access Denied";
            }
        } else {
            echo "Invalid Param";
        }
        break;
}

?>
Пример #2
0
    public function absoluteContent(){
        echo "<h2>Page Management</h2>";
        if (isset($this->crossInfo[RESULTS])){
            echo $this->crossInfo[RESULTS];
        }
        //$this->UserSelectOption_ECHO();

        if (!isset($this->crossInfo[_ADMINPAGE::USERS_LIST])){
            echo _FORM::Hidden(PAGES_USERID, $this->crossInfo[PAGES_USERID]);
        } else {
            echo "User: "******"_userselecttarget");
            echo _FORM::SelectEnd();
        }

        echo "<div id='pagehierarchytarget'>";
        ThreadedForumViewer::BuildViewForAdminPageManage(
                $this->crossInfo["arrayHierarchy"],
                $this->crossInfo[PAGES_USERID] == _SESSION::GetUserID() ?
                    _SESSION::GetCanCDSelf() :
                    _SESSION::GetCanCDOther());
        echo "</div>";
    }