<?
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# DataDivisions, Build 1.0, 12/11/2003 #
# FileName: index.php #
# File Description: #
# Sets up functionality for main display page (including redirection to #
# login page if necessary after cookie check) #
# #
# +-----------------------------------------------------------------------+ #
# | DataDivisions - Website Statistic Visualization Software | #
# | Copyright (c) 2003, Brian Willison | #
# +-----------------------------------------------------------------------+ #
# | The contents of this file are subject to the GNU General Public | #
# | License version 2 (June 1991). This file and all its contents (incl. | #
# | functions, methods, etc.) are free for general use within any | #
# | community. This software is distributed with the intent to allow | #
# | developers the opportunity to copy, manipulate and revamp this | #
# | application in part or whole for best use cases. | #
# | | #
# | This software is distributed "AS-IS" with no warranties of any kind | #
# | either expressed or implied. | #
# | | #
# | Please refer to the GPL license document for more information: | #
# | (_docs/gplLicense.pdf) | #
# +-----------------------------------------------------------------------+ #
# | Developer, Designer, Initial Creator: | #
# | Brian Willison (hide@address.com) | #
# +-----------------------------------------------------------------------+ #
# | Initial Download Reference: | #
# | http://datadivisions.sourceforge.net | #
# +-----------------------------------------------------------------------+ #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
// Include Necessary Files
require("includes/varFile.php");
require(funcGlobalFile);
require(funcDisplaySetupFile);
// Check If Coming From Email Link - Bypass
if (isset($_GET['entranceFromEmail'])) {
$username = true;
$cookieBypass = true;
} else {
// Get Cookie Data Or Redirect If Not Set To Login Or Register
if (isset($_COOKIE[appCookieAppSession])) {
$username = $_COOKIE[appCookieAppSession];
} else {
if (isset($_COOKIE[appCookieUsername])) {
$username = $_COOKIE[appCookieUsername];
} else {
$username = false;
}
}
}
if ($username == false) {
redirectToLoginPage(); // cookie or session not set -> redirect to login page
} else {
// Set/Reset Session Cookie
if (!isset($cookieBypass)) {
setAppSessionCookie($username);
}
// Generate App. Header (function in global file)
genAppFullHeader(pageName,$username);
// Generate Left Size Saved Displays (function in global file)
genAppSavedDisplays(pageName,$username);
// Generate Data Displays (function in global file)
genAppDataDisplay(pageName,$username,$_GET);
// Generate App. Footer (function in global file)
genAppFullFooter(pageName,$username);
}
?>