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

61 lines
1.9 KiB

<?php
/*****************************************************************************
IP Reg, a PHP/MySQL IPAM tool
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
Copyright (C) 2011-2023 Thomas Hooge
SPDX-License-Identifier: GPL-3.0-or-later
*****************************************************************************/
include('lang/' . $_SESSION['suser_language'] . '.php');
$smarty->assign($lang);
// search box
if (isset($_POST['search'])) {
$search = sanitize($_POST['search']);
$_SESSION['search'] = $search;
} else {
if (isset($_SESSION['search'])) {
$search = $_SESSION['search'];
} else {
$search = '';
}
}
$smarty->assign("config_version", $config_version);
$smarty->assign("suser_name", $_SESSION['suser_displayname']);
$smarty->assign("search", $search);
// menu
$menu = array();
if ($_SESSION['suser_menu_assets']) {
$menu[] = '<a href="asset.php">' . $lang['lang_assets'] . "</a>\n";
}
if ($_SESSION['suser_menu_assetclasses']) {
$menu[] = '<a href="assetclass.php">' . $lang['lang_assetclasses'] . "</a>\n";
}
if ($_SESSION['suser_menu_assetclassgroups']) {
$menu[] = '<a href="assetclassgroup.php">' . $lang['lang_assetclassgroups'] . "</a>\n";
}
if ($_SESSION['suser_menu_locations']) {
$menu[] = '<a href="location.php">' . $lang['lang_locations'] . "</a>\n";
}
if ($_SESSION['suser_menu_nodes']) {
$menu[] = '<a href="node.php">' . $lang['lang_nodes'] . "</a>\n";
}
if ($_SESSION['suser_menu_subnets']) {
$menu[] = '<a href="subnet.php">' . $lang['lang_subnets'] . "</a>\n";
}
if ($_SESSION['suser_menu_vlans']) {
$menu[] = '<a href="vlan.php">' . $lang['lang_vlans'] . "</a>\n";
}
if ($_SESSION['suser_menu_cables']) {
$menu[] = '<a href="cable.php">' . $lang['lang_cables'] . "</a>\n";
}
if ($_SESSION['suser_menu_zones']) {
$menu[] = '<a href="zone.php">' . $lang['lang_zones'] . "</a>\n";
}
$smarty->assign("menu", implode(' | ', $menu));
$smarty->display("header.tpl");
?>