forked from opendcim/openDCIM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstorageroom.php
61 lines (57 loc) · 1.68 KB
/
storageroom.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
require_once( 'db.inc.php' );
require_once( 'facilities.inc.php' );
$user=new User();
$user->UserID=$_SERVER['REMOTE_USER'];
$user->GetUserRights($facDB);
if(!$user->ReadAccess){
// No soup for you.
header('Location: '.redirect());
exit;
}
$dev=new Device();
// Cabinet -1 is the Storage Area
$dev->Cabinet=-1;
$devList=$dev->ViewDevicesByCabinet($facDB);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Facilities Cabinet Maintenance</title>
<link rel="stylesheet" href="css/inventory.css" type="text/css">
<!--[if lt IE 9]>
<link rel="stylesheet" href="css/ie.css" type="text/css">
<![endif]-->
<script type="text/javascript" src="scripts/jquery.min.js"></script>
</head>
<body>
<div id="header"></div>
<div class="page storage">
<?php
include( 'sidebar.inc.php' );
?>
<div class="main">
<h2><?php echo $config->ParameterArray['OrgName']; ?></h2>
<h3>Data Center Cabinet Inventory</h3>
<div class="center"><div>
<div class="table">
<div class="title" id="title">Storage Room</div>
<div>
<div>Device</div>
<div>Asset Tag</div>
<div>Serial No.</div>
<div></div>
</div>
<?php
while(list($devID,$device)=each($devList)){
echo "<div><div><a href=\"devices.php?deviceid=$devID\">$device->Label</a></div><div>$device->AssetTag</div><div>$device->SerialNo</div><div><a href=\"surplus.php?deviceid=$devID\">Surplus</a></div></div>\n";
}
?>
</div> <!-- END div.table -->
</div></div>
</div><!-- END div.main -->
</div><!-- END div.page -->
</body>
</html>