Location: PHPKode > projects > PhpInv > phpInv-0.8.0/global.php
<?

// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or (at your option)
// any later version.

// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.

// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place - Suite 330, Boston, MA 02111-1307, USA.

// Copyright: (C) 2002/2003 Stefan Cyris 

// Speed measurement
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;


// no caching at all
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always modified
header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");                          // HTTP/1.0

// load stuff
require("admin/config/general.php");
require("admin/config/db.php");
require("admin/config/html.php");
require("inc/functions.php");
require("inc/variables.php");
require("inc/db_".$db_type.".php");

// connect to DB
$DB=new DB;
$DB->server=$db_server;
$DB->database=$db_db;
$DB->user=$db_username;
$DB->password=$db_password;
$DB->debug=$debug;
$DB->tableprefix=$db_tableprefix;

$DB->connect();

$db_password=""; # for security reasons
$DB->password=""; # reset password

// session management
require("admin/inc/session.php");

// get script base url
$url = parse_url($script_name);
$url = basename(str_prepare($url[path]));

// category array
$categoryarray = categoryarray();

// set variables
eval("\$header = \"".templateget('header')."\";");
eval("\$bodyheader = \"".templateget('bodyheader')."\";");
$tablealtcolor = tablealtcolor($tablealtcolor);

if (isset($company)) {
	eval("\$navigation = \"".templateget('company')."\";");
}

?>
Return current item: PhpInv