Changes adopted from version 0.5

This commit is contained in:
2023-02-13 10:42:09 +01:00
parent faf5f368f5
commit 76ccecca7f
198 changed files with 10261 additions and 5068 deletions

View File

@@ -1,7 +1,7 @@
<?php
/*****************************************************************************
IP Reg, a PHP/MySQL IPAM tool
Copyright (C) 2008 Wietse Warendorff
Copyright (C) 2007-2009 Wietse Warendorff
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
@@ -20,64 +20,26 @@
or contact me at wietsew@users.sourceforge.net
*****************************************************************************/
session_start();
// session
// start session
session_start();
// check for user_id, if unnkown, redirect to login
if(empty($_SESSION['suser_id'])) {
// redirect
header("Location: login.php");
exit;
}
// check for user_id, if unnkown -> login
if(empty($_SESSION['suser_id'])) {
header("Location: login.php");
exit;
}
// headers
// raw http headers
header("Content-Type: text/html; charset=utf-8");
// includes
include("config.php");
include("dbconnect.php");
include("functions.php");
include("yapter.php");
// auth items
$authitems = array(
'ipreg' => array(
'name' => 'IP Reg',
),
'asset' => array(
'name' => 'Asset',
'item_id' => 'asset_id',
'item_name' => 'asset_name',
),
'assetclass' => array(
'name' => 'Assetclass',
'item_id' => 'assetclass_id',
'item_name' => 'assetclass_name',
),
'location' => array(
'name' => 'Location',
'item_id' => 'location_id',
'item_name' => 'location_name',
),
'node' => array(
'name' => 'Node',
'item_id' => 'node_id',
'item_name' => 'ip',
),
'subnet' => array(
'name' => 'Subnet',
'item_id' => 'subnet_id',
'item_name' => 'subnet_address',
),
'user' => array(
'name' => 'User',
'item_id' => 'user_id',
'item_name' => 'user_name',
),
'userclass' => array(
'name' => 'Userclass',
'item_id' => 'userclass_id',
'item_name' => 'userclass_name',
),
'vlan' => array(
'name' => 'VLAN',
'item_id' => 'vlan_id',
'item_name' => 'vlan_name',
),
);
// includes
include("config.php");
include("dbconnect.php");
// load lib
include("lib.php");
?>