コード例 #1
0
ファイル: _homeajax.php プロジェクト: rexfleischer/web_dev
                 }
                 $returning .=
                     $pages[$i]->getPageID()."::".
                     $pages[$i]->getTitle()."::".
                     ($pages[$i]->getHasChildren()>0 ? "1" : "0");
             }
         }
         echo $returning;
         $db->disconnect();
     }
     break;
 case "getroots";
     $userID = (int)_FCORE::IsSetPostDefault(USERS_USERID, false);
     if ($userID){
         $db = _DB::_Connect();
         $pages = DB_PAGE::_GetUserRoots($db, $userID);
         $returning = "";
         $count = sizeof($pages);
         $first = true;
         for($i=0; $i<$count; $i++){
             if (_SESSION::GetCanViewPage($db, $pages[$i]->getPageID())){
                 if ($first){
                     $first = false;
                 } else {
                     $returning .= "::::";
                 }
                 $returning .=
                     $pages[$i]->getPageID()."::".
                     $pages[$i]->getTitle()."::".
                     ($pages[$i]->getHasChildren()>0 ? "1" : "0");
             }
コード例 #2
0
ファイル: home.php プロジェクト: rexfleischer/web_dev
    protected function thisPagePreProcessing(){
        $this->crossInfo[_HOMEPAGE::DATABASE] = false;
        $this->crossInfo[_HOMEPAGE::MENULIST] = _FCORE::IsSetPostDefault(_HOMEPAGE::MENULIST, false);
        if (!$this->crossInfo[_HOMEPAGE::MENULIST]){
            $this->crossInfo[_HOMEPAGE::DATABASE] = _DB::_Connect();
            $this->crossInfo[_HOMEPAGE::MAINVIEW_USERID] =
                    _SESSION::GetIsFamily() ? _SESSION::GetUserID() : false;

            $this->crossInfo[_HOMEPAGE::MENULIST] = array();
            if ($this->crossInfo[_HOMEPAGE::MAINVIEW_USERID]){
                 $raw = DB_PAGE::_GetUserRoots(
                        $this->crossInfo[_HOMEPAGE::DATABASE],
                        $this->crossInfo[_HOMEPAGE::MAINVIEW_USERID]);
                 $this->crossInfo[_HOMEPAGE::MENULIST] = new _FORUM();
                 $this->crossInfo[_HOMEPAGE::MENULIST]->placeNodeArray($raw);
            }

            $this->crossInfo[_HOMEPAGE::FAMILYLIST] = DB_USER::_GetFamilyOnlyUserList($this->crossInfo[_HOMEPAGE::DATABASE]);
        }
        $this->absolutePreProcessing();
    }