Example #1
0
    protected function thisPageLayout(){
        ?>
<div id="text">
    Welcome, <?php echo _SESSION::GetUsername(); ?>!!
</div>
        <?php
    }
Example #2
0
 protected function thisPagePreProcessing(){
     $this->crossInfo[0] = _SESSION::Logout();
 }
Example #3
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;
}

?>
Example #4
0
<?php

session_start();
require_once DIR_CORE_FCORE;
require_once DIR_CORE_SESSION;
_SESSION::Initiate();

abstract class _baselayout {
    protected abstract function thisPageLayout();
    protected abstract function thisPageStyle();
    protected abstract function thisPagePreProcessing();

    protected $crossInfo;

    public function  __construct() {
        $this->crossInfo = array();
        $this->thisPagePreProcessing();
    }

    //================================================
    //	page layout
    //================================================
    public function EchoBaseLayout(){
        logger_FuncCall(__FILE__, __LINE__, __FUNCTION__);
        ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>Boyd's Nest</title>
    <?php echo _FCORE::CSSInclude(URL_STYLE_BASESTYLE); ?>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Example #5
0
                                $returning .= "::::";
                            }
                            $returning .=
                                $pages[$i]->getPageID()."::".
                                $pages[$i]->getTitle()."::".
                                ($pages[$i]->getHasChildren()>0 ? "1" : "0");
                        }
                    }
                    echo $returning;
                    $db->disconnect();
                }
                break;
            case "getpage":
                $pageID = (int)_FCORE::IsSetPostDefault(PAGES_PAGEID, false);
                if ($pageID){
                    $db = _DB::_Connect();
                    if (_SESSION::GetCanViewPage($db, $pageID)){
                        try {
                            $page = DB_PAGE::_GetPage($db, $pageID);
                            echo $page->getPageID()."::::".$page->getTitle()."::::".$page->getContentAsHTML();
                        } catch(Exception $e) { }
                    }
                    $db->disconnect();
                }
                break;
        }
    }
}

?>
Example #6
0
 protected function thisPageLayout() {
     MenuAndContentHelper1_Layout($this, true, _SESSION::GetIsMaster(), "Chapters", _USERMANUAL::_MasterNavigationTitle());
 }
Example #7
0
    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();
    }
Example #8
0
 public function changeState($state){
     switch($state){
         case _ADMINPAGE::ANNOUNCEMENTS:
             $this->_CurrState = new adminstate_announcements();
             break;
         case _ADMINPAGE::MESSAGES_LIST:
             $this->_CurrState = new adminstate_messages_list();
             break;
         case _ADMINPAGE::MESSAGES_VIEW:
             $this->_CurrState = new adminstate_messages_view();
             break;
         case _ADMINPAGE::MESSAGES_WRITE:
             $this->_CurrState = new adminstate_messages_write();
             break;
         case _ADMINPAGE::USERS_VIEW:
             $this->_CurrState = new adminstate_users_view();
             break;
         case _ADMINPAGE::USERS_CREATE:
             $this->_CurrState = new adminstate_users_create();
             break;
         case _ADMINPAGE::USERS_MANAGE:
             $this->_CurrState = new adminstate_users_manage();
             break;
         case _ADMINPAGE::USERS_LOGS:
             $this->_CurrState = new adminstate_users_logs();
             break;
         case _ADMINPAGE::LOGIN_LOGS:
             $this->_CurrState = new adminstate_login_logs();
             break;
         case _ADMINPAGE::PAGES_CREATE:
             if (_SESSION::GetCanCDOther() && _SESSION::GetCanCDSelf()){
                 $this->_CurrState = new adminstate_pages_create_both();
             } else if (_SESSION::GetCanCreateSelf()){
                 $this->_CurrState = new adminstate_pages_create_self();
             } else if (_SESSION::GetCanCreateOther()){
                 $this->_CurrState = new adminstate_pages_create_other();
             }
             break;
         case _ADMINPAGE::PAGES_WRITE:
             $this->_CurrState = new adminstate_pages_write();
             break;
         case _ADMINPAGE::PAGES_MANAGE:
             if (_SESSION::GetCanCDOther() && _SESSION::GetCanCDSelf()){
                 $this->_CurrState = new adminstate_pages_manage_both();
             } else if (_SESSION::GetCanCreateSelf()){
                 $this->_CurrState = new adminstate_pages_manage_self();
             } else if (_SESSION::GetCanCreateOther()){
                 $this->_CurrState = new adminstate_pages_manage_other();
             }
             break;
         case ERROR_MUSTBELOGGEDIN:
             $this->_CurrState = new error_MustBeLoggedIn();
             break;
         case 0:
         default:
             $this->_CurrState = new error_UnknownAction();
             break;
     }
 }