From 40def2bb111b72de3a5d65e597455357f1868525 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Fri, 10 Jan 2003 16:58:20 +0000 Subject: [PATCH] added session/authorisation check added visual component stubs --- dashboard.php | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/dashboard.php b/dashboard.php index d994d96..40844fd 100644 --- a/dashboard.php +++ b/dashboard.php @@ -15,22 +15,59 @@ */ // main library routines and defaults + require_once("./config/dmsDefaults.php"); -require_once("./lib/owl.lib.php"); -require_once("./config/html.php"); -require_once("./lib/control.inc"); -require_once("./lib/Session.inc"); -require_once("./lib/SiteMap.inc"); +require_once("$default->owl_fs_root/lib/owl.lib.php"); +require_once("$default->owl_fs_root/config/html.php"); +require_once("$default->owl_fs_root/lib/control.inc"); +require_once("$default->owl_fs_root/lib/Session.inc"); +require_once("$default->owl_fs_root/lib/SiteMap.inc"); +require_once("$default->owl_fs_root/lib/visualpatterns/PatternMainPage.inc"); +require_once("$default->owl_fs_root/lib/visualpatterns/PatternImage.inc"); +require_once("$default->owl_fs_root/lib/visualpatterns/PatternTableLinks.inc"); +require_once("$default->owl_fs_root/lib/visualpatterns/PatternTableSqlQuery.inc"); // ------------------------------- // page start // ------------------------------- +checkSession(); + // check if this page is authorised, ie. has come from control.php -if ($sessionStatus["authorised"]) { - echo generateLink("LOGOUT") . "logout"; +if ($_SESSION["authorised"]) { + // create a page + + // logo + $img = new PatternImage("$default->owl_root_url/locale/$default->owl_lang/graphics/$default->logo"); + + // build the top menu of links + $aTopMenuLinks = array(0=>generateControllerUrl("LOGOUT")); + $aTopMenuText = array(0=>"logout"); + $oPatternTableLinks = new PatternTableLinks($aTopMenuLinks, $aTopMenuText, 3, 1); + + // build the central dashboard + /* + $aCentralPageColumns = array(0=>"name",1=>"parent",2=>"security"); + $aColumnTypes = array(0=>1,1=>2,2=>1); + $oTableSqlQuery = & new PatternTableSqlQuery("Folders", $aCentralPageColumns, $aColumnTypes); + ($HTTP_GET_VARS["fStartIndex"]) ? $oTableSqlQuery->setStartIndex($HTTP_GET_VARS["fStartIndex"]) : $oTableSqlQuery->setStartIndex(0); + $oTableSqlQuery->setLinkType(1); + */ + + /* get a page */ + $tmp = new PatternMainPage(); + + /* put the page together */ + $tmp->setNorthWestPayload($img); + $tmp->setNorthPayload($oPatternTableLinks); + //$tmp->setCentralPayload($oTableSqlQuery); + $tmp->setFormAction("dashboard.php"); + $tmp->render(); + } else { // FIXME: redirect to no permission page - print "you do not have access to view this page! please go away, and come back when you do."; + print "you do not have access to view this page! please go away, and come back when you do.
"; + echo generateLink("LOGOUT") . "logout"; } ?> + -- libgit2 0.21.4