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.
65 lines
1.5 KiB
65 lines
1.5 KiB
2 years ago
|
<?php
|
||
|
session_start();
|
||
|
ob_start();
|
||
|
|
||
|
// includes
|
||
|
include("config.php");
|
||
|
include("dbconnect.php");
|
||
|
include("functions.php");
|
||
|
|
||
|
// check for session
|
||
|
if(empty($_SESSION['suser_id'])) {
|
||
|
header("Location: login.php");
|
||
|
exit;
|
||
|
}
|
||
|
|
||
|
// fill search box
|
||
|
if (isset($_POST['search'])) {
|
||
|
$search = $_POST['search'];
|
||
|
$_SESSION['search'] = $search;
|
||
|
} else {
|
||
|
if(isset($_SESSION['search'])) {
|
||
|
$search = $_SESSION['search'];
|
||
|
} else {
|
||
|
$search = '';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// start header output
|
||
|
?>
|
||
|
<html>
|
||
|
<header>
|
||
|
<title>IP Reg</title>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<link rel="stylesheet" href="style.css" type="text/css">
|
||
|
</header>
|
||
|
<body>
|
||
|
<form method="POST" action="search.php">
|
||
|
<table border="0" width="100%">
|
||
|
<tr>
|
||
|
<td>
|
||
|
View by: <a href="asset.php">Asset</a> -
|
||
|
<a href="assetclass.php">Assetclass</a> -
|
||
|
<a href="location.php">Location</a> -
|
||
|
<a href="subnet.php">Subnet</a> -
|
||
|
<a href="vlan.php">VLAN</a>
|
||
|
.:<input type="text" name="search" value="<?php echo $search; ?>"><input type="submit" value="Search!">
|
||
|
</td>
|
||
|
<td align="right">
|
||
|
<?php
|
||
|
$suser_id = $_SESSION['suser_id'];
|
||
|
|
||
|
$result = mysql_query("SELECT displayname FROM user WHERE user_id='$suser_id'");
|
||
|
while ($row = mysql_fetch_object($result)) {
|
||
|
echo $displayname = $row->displayname . ' - ';
|
||
|
}
|
||
|
?>
|
||
|
|
||
|
<a href="options.php">Options</a> -
|
||
|
<a href="logout.php">Log out</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</form>
|
||
|
|
||
|
<hr>
|