示例#1
0
                echo MakeWritingForm($pageID, $pageInfo->getContent());
                $db->disconnect();
            } else {
                echo "Invalid Param";
            }
        } else {
            echo "Access Denied";
        }
        break;
    case "admin_pagecreate":
        $userID = _FCORE::IsSetPostDefault(PAGES_USERID, false);
        if ($userID){
            if (($userID == _SESSION::GetUserID() && _SESSION::GetCanCDSelf()) ||
                ($userID != _SESSION::GetUserID() && _SESSION::GetCanCDOther())){
                $db = _DB::_Connect();
                echo MakeCreateUserChildOfSelect(
                    DB_PAGE::_GetPageListForUserID($db, $userID));
                $db->disconnect();
            } else {
                echo "Access Denied";
            }
        } else {
            echo "Invalid Param";
        }
        break;
    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();
示例#2
0
 public function absoluteContent(){
     echo "<h2>Create A New Page</h2>";
     if (isset($this->crossInfo[RESULTS])){
         echo $this->crossInfo[RESULTS];
     }
     echo _FORM::_FormBegin("createpage", URL_PAGE_ADMIN."?".ACTION."="._ADMINPAGE::PAGES_CREATE);
     echo _FORM::Hidden(ACTION, ACTION_CREATE);
     $this->UserSelectOption_ECHO();
     echo "Child Of: ";
     echo "<span id='childofselecttarget'>";
     MakeCreateUserChildOfSelect(
             $this->crossInfo[_ADMINPAGE::PAGES_LIST],
             isset($this->crossInfo[PAGES_CHILDOF]) ? $this->crossInfo[PAGES_CHILDOF] : 0);
     echo "</span>";
     echo "<div>Page Title: "._FORM::Text(PAGES_TITLE, "", 40, 255)."</div>";
     echo "<div>Speech Type: ";
     echo _FORM::SelectBegin(PAGES_FORUMTYPE);
     echo _FORM::Option("No Comments", PAGES_FORUMTYPE_NONE, true);
     echo _FORM::Option("Comments", PAGES_FORUMTYPE_LINEAR, false);
     echo _FORM::Option("Conversation", PAGES_FORUMTYPE_FORUM, false);
     echo _FORM::SelectEnd();
     echo "</div>";
     echo "<div>Privacy: ";
     echo _FORM::SelectBegin(PAGES_ISPRIVATE);
     echo _FORM::Option("Public", 0, true);
     echo _FORM::Option("Private", 1, false);
     echo _FORM::SelectEnd();
     echo "</div>";
     echo _FORM::Submit("Create Page");
     echo _FORM::_FormEnd();
 }