dashboard.php
2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* dashboard.php -- Main dashboard page.
*
* This page is presented to the user after login.
* It contains a high level overview of the users subscriptions, checked out
* document, pending approval routing documents, etc.
*
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* @version $Id$
* @Copyright (c) 1999-2003 The Owl Project Team
* @author michael@jamwarehouse.com
* @package dms
*/
// main library routines and defaults
require_once("./config/dmsDefaults.php");
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 ($_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.<br>";
echo generateLink("LOGOUT") . "logout</a>";
}
?>