IP Reg is a IPAM tool to keep track of assets, nodes (IP addresses, MAC addresses, DNS aliases) within different subnets, over different locations or even VLAN's. Written in PHP, used with a MySQL-database to have a unique insight in your local network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ipreg/header.php

44 lines
911 B

<?php
session_start();
// check for user_id, if unnkown -> login
if(empty($_SESSION['suser_id'])) {
header("Location: login.php");
exit;
}
// includes
include("config.php");
include("dbconnect.php");
include("functions.php");
include("yapter.php");
// include language file
include('lang/' . $_SESSION['suser_lang'] . '.php');
// set template
$tp = new Template("tpl/header.tpl");
// set language variables
$tp->setvars($lang);
// fill search box
if (isset($_POST['search'])) {
$search = $_POST['search'];
$_SESSION['search'] = $search;
} else {
if(isset($_SESSION['search'])) {
$search = $_SESSION['search'];
} else {
$search = '';
}
}
// give these to the templates too
$tp->set("suser_displayname", $_SESSION['suser_displayname']);
$tp->set("search", $search);
// output
$tp->parse();
$tp->spit();
?>