Location: PHPKode > projects > PhpInv > phpInv-0.8.0/admin/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 

// 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

// connect to DB
$DB=new DB;


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

// session management

// Administratin only
if (!isset($session["group"][2])) {	// 2 = Admin group
	print "only admins allowed<br>";

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

// category array
$categoryarray = categoryarray();

Return current item: PhpInv