Location: PHPKode > projects > DataDivisions > includes/varFile.php
<?
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# DataDivisions, Build 1.0, 12/11/2003                                      #
# FileName: varFile.php                                                     #
# File Description:                                                         #
#   Defines application file locations and file variables                   #
#                                                                           #
# +-----------------------------------------------------------------------+ #
# | 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                                  | #
# +-----------------------------------------------------------------------+ #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

// Define Error_Reporting For Programming Perfection
error_reporting(E_ALL);

// Include User Config File
require("config.php");

// Server/File Information
define("SERVERNAME",$SERVER_NAME,TRUE);
define("PHPSELF",$PHP_SELF,TRUE);

// Function File Variables - PHP
define("FUNCGLOBALFILE","includes/funcGlobal.php",TRUE);
define("FUNCLOGINFILE","includes/funcLogin.php",TRUE);
define("FUNCREGISTERFILE","includes/funcRegister.php",TRUE);
define("FUNCREGISTERCONFIRMFILE","includes/funcRegisterConfirm.php",TRUE);
define("FUNCDISPLAYSETUPFILE","includes/funcDisplaySetup.php",TRUE);
define("FUNCSAVEDISPLAYFILE","includes/funcSaveDisplay.php",TRUE);
define("FUNCSAVEDISPLAYCONFIRMFILE","includes/funcSaveDisplayConfirm.php",TRUE);
define("FUNCEMAILDISPLAYFILE","includes/funcEmailDisplay.php",TRUE);
define("FUNCEMAILDISPLAYCONFIRMFILE","includes/funcEmailDisplayConfirm.php",TRUE);
define("FUNCEMAILDISPLAYDETAILFILE","includes/funcEmailDisplayDetail.php",TRUE);
define("FUNCEMAILDISPLAYDETAILCONFIRMFILE","includes/funcEmailDisplayDetailConfirm.php",TRUE);
define("FUNCEDITDISPLAYFILE","includes/funcEditDisplay.php",TRUE);
define("FUNCEDITDISPLAYCONFIRMFILE","includes/funcEditDisplayConfirm.php",TRUE);
define("FUNCDELETEDISPLAYFILE","includes/funcDeleteDisplay.php",TRUE);
define("FUNCDELETEDISPLAYCONFIRMFILE","includes/funcDeleteDisplayConfirm.php",TRUE);
define("FUNCDISPLAYLOGFILE","includes/funcDisplayLog.php",TRUE);
define("FUNCDISPLAYDIRFILE","includes/funcDisplayDir.php",TRUE);
define("FUNCDISPLAYERRORFILE","includes/funcDisplayError.php",TRUE);
define("FUNCDISPLAYCOMMONFILE","includes/funcDisplayCommon.php",TRUE);

// Function File Variables - JS
define("FUNCJAVASCRIPTFILE","includes/funcJS.js",TRUE);
define("FUNCJAVASAVEDDISPLAYSSCROLLFILE","includes/funcScrollSavedDisplays.js",TRUE);
define("FUNCJAVASCROLLVIEWDETAILSFILE","includes/funcScrollViewDetails.js",TRUE);
define("FUNCJAVATOOLTIPFILE","includes/funcToolTip.js",TRUE);

// Template Path - Full Server Path For Opening/Parsing
define("TEMPLATEPATH",pathToRoot."templates/",TRUE);

// Display Template Files - No Extension
define("TEMPLATE1FULL","display1full",TRUE);
define("TEMPLATE2HORIZ","display2horiz",TRUE);
define("TEMPLATE2VERT","display2vert",TRUE);
define("TEMPLATE3LEFTVERT","display3leftVert",TRUE);
define("TEMPLATE3RIGHTVERT","display3rightVert",TRUE);
define("TEMPLATE3TOPHORIZ","display3topHoriz",TRUE);
define("TEMPLATE3BOTHORIZ","display3botHoriz",TRUE);
define("TEMPLATE4SQUARE","display4square",TRUE);

// View Detail Display Template Files - No Extension
define("TEMPLATEVIEWDETAILSSQUARE","viewDetailsSquare",TRUE);
define("TEMPLATEVIEWDETAILSHORIZ","viewDetailsHoriz",TRUE);
define("TEMPLATEVIEWDETAILSVERT","viewDetailsVert",TRUE);
define("TEMPLATEVIEWDETAILSFULL","viewDetailsFull",TRUE);

// Email Display Template File - Extension Needed
define("TEMPLATEEMAILDISPLAY",templatePath."emailDisplay.tpl",TRUE);

// Base Page Locations
define("LOGINPAGE",baseUrl."login.php",TRUE);
define("LOGOUTPAGE",baseUrl."logout.php",TRUE);
define("FAQPAGE",baseUrl."faq.php",TRUE);
define("REGISTERPAGE",baseUrl."register.php",TRUE);
define("REGISTERCONFIRMPAGE",baseUrl."registerConfirm.php",TRUE);
define("DISPLAYPAGE",baseUrl."index.php",TRUE);
define("SAVEDISPLAYPAGE",baseUrl."saveDisplay.php",TRUE);
define("SAVEDISPLAYCONFIRMPAGE",baseUrl."saveDisplayConfirm.php",TRUE);
define("EMAILDISPLAYPAGE",baseUrl."emailDisplay.php",TRUE);
define("EMAILDISPLAYCONFIRMPAGE",baseUrl."emailDisplayConfirm.php",TRUE);
define("EDITDISPLAYPAGE",baseUrl."editDisplay.php",TRUE);
define("EDITDISPLAYCONFIRMPAGE",baseUrl."editDisplayConfirm.php",TRUE);
define("DELETEDISPLAYPAGE",baseUrl."deleteDisplay.php",TRUE);
define("DELETEDISPLAYCONFIRMPAGE",baseUrl."deleteDisplayConfirm.php",TRUE);
define("VIEWDETAILSPAGE",baseUrl."viewDetails.php",TRUE);

// Variable Files - Full Server Path For Opening
define("CSSSTYLEFILE",pathToRoot."includes/cssStyle.php",TRUE);
define("STYLEFILE",pathToRoot."includes/varStyle.php",TRUE);
define("COOKIEFILE",pathToRoot."includes/varCookie.php",TRUE);

// Declare File Name Variable
if (ereg("login",phpSelf)) define("PAGENAME","login",TRUE);
elseif (ereg("logout",phpSelf)) define("PAGENAME","logout",TRUE);
elseif (ereg("faq",phpSelf)) define("PAGENAME","faq",TRUE);
elseif (ereg("register",phpSelf)) define("PAGENAME","register",TRUE);
elseif (ereg("registerConfirm",phpSelf)) define("PAGENAME","registerConfirm",TRUE);
elseif (ereg("saveDisplay",phpSelf)) define("PAGENAME","saveDisplay",TRUE);
elseif (ereg("saveDisplayConfirm",phpSelf)) define("PAGENAME","saveDisplayConfirm",TRUE);
elseif (ereg("emailDisplay",phpSelf)) define("PAGENAME","emailDisplay",TRUE);
elseif (ereg("emailDisplayConfirm",phpSelf)) define("PAGENAME","emailDisplayConfirm",TRUE);
elseif (ereg("emailDisplayDetail",phpSelf)) define("PAGENAME","emailDisplayDetail",TRUE);
elseif (ereg("emailDisplayDetailConfirm",phpSelf)) define("PAGENAME","emailDisplayDetailConfirm",TRUE);
elseif (ereg("editDisplay",phpSelf)) define("PAGENAME","editDisplay",TRUE);
elseif (ereg("editDisplayConfirm",phpSelf)) define("PAGENAME","editDisplayConfirm",TRUE);
elseif (ereg("deleteDisplay",phpSelf)) define("PAGENAME","deleteDisplay",TRUE);
elseif (ereg("deleteDisplayConfirm",phpSelf)) define("PAGENAME","deleteDisplayConfirm",TRUE);
elseif (ereg("viewDetails",phpSelf)) define("PAGENAME","viewDetails",TRUE);
else define("PAGENAME","display",TRUE);

// Define Cookie Names
define("APPCOOKIEUSERNAME","dataDivisionsUsername",TRUE);						// username cookie
define("APPCOOKIEAPPSESSION","dataDivisionsAppSession",TRUE);					// session cookie

// Server-Log Files & Month View Variable
if (isset($_GET['monthView']) && $_GET['monthView'] != "") define ("monthViewForLog",$_GET['monthView'],TRUE);
else define ("monthViewForLog",date("mY"),TRUE);
define("LOGFILE",pathToRoot."_logDb/dataDivisionsLogger".monthViewForLog.".txt",TRUE);

// Include Additional Variables Files
require(styleFile);		// Application Style Info
?>
Return current item: DataDivisions