<?
error_reporting(0);
foreach ($_POST as $varname => $varvalue) {
$$varname = $varvalue;
}
foreach ($_GET as $varname => $varvalue) {
$$varname = $varvalue;
}
foreach ($_SERVER as $varname => $varvalue) {
$$varname = $varvalue;
}
if($debug) {
error_reporting(1);
error_reporting(E_ALL);
}
include "includes/db.php";
include "includes/functions.php";
if(!$view){
$view="location";
}
if(!$page){
$page="data.php";
}
?>
<html>
<head>
<title>Inventory</title>
<link REL="stylesheet" HREF="includes/style.css" TYPE="text/css">
<script language="javascript">
function deleteme(varURL,varTable,varID) {
var answer = confirm("Are you sure you want to delete this entry?");
if(answer) {
window.location.href=varURL+"&action=delete,"+varTable+","+varID;
}
}
function deletefull(varURL,varType,varID) {
if((varType == "type") || (varType == "software") || (varType == "server")){
var answer = confirm("Are you sure you want to delete this entry?");
} else {
var answer = confirm("Are you sure you want to delete this entry?\nIt will delete all associated phone numbers and contacts as well");
}
if(answer) {
window.location.href=varURL+"&action=delete,"+varType+","+varID;
}
}
function NewWindow(mypage,myname,w,h,scroll){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='resizable=yes';
win=window.open(mypage,myname,settings);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
function ColorFlip(trow,orColor){
var tmp = document.getElementById(trow);
var currentColor = tmp.bgColor;
if(currentColor != "#3399ff") {
currentColor = "#3399ff";
} else {
currentColor = orColor;
}
tmp.bgColor=currentColor;
}
function ColorOver(trow){
var tmp = document.getElementById(trow);
var currentColor = tmp.bgColor;
if(currentColor != "#3399ff") {
tmp.bgColor='#99ccff';
}
}
function ColorOut(trow,orColor){
var tmp = document.getElementById(trow);
var currentColor = tmp.bgColor;
if(currentColor != "#3399ff") {
tmp.bgColor=orColor;
}
}
</script>
</head>
<body <? echo $close; ?> class="body">
<?
if(!$nonav) {
include "includes/nav.php";
}
if($msg) {
echo $msg;
}
?>
<? include $page; ?>
</body>
</html>