-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinventory.php
86 lines (60 loc) · 1.63 KB
/
inventory.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
include( "intel_header.php" );
if( $ldap->isloggedin() == true && $ldap->getlogintype() == "admin" )
{
$lines = file( "/scripts/log/LMTall.txt" );
print "<h2>CRB</h2><br/><table width='90%'>";
$count = 1;
foreach( $lines as $line )
{
if( stristr( $line , "|" ) )
{
$data = explode( "|" , $line );
if( $data[ 0 ] == "crb" )
{
print "<tr>";
$rowcolor = ( $count % 2 == 0 ) ? "style='background-color:#eeeeee; style='color:#007700''" : "style='background-color:#ffffff; style='color:#007700''";
print "<td class='padme2' $rowcolor><b>$count</b></td>";
for( $i = 1 ; $i < count( $data ); $i++ )
{
$field = $data[ $i ];
print "<td class='padme2' $rowcolor>$field</td>";
}
$count++;
print "</tr>\n";
}
}
}
print "</table>";
$count = 1;
print "<br/><br/><h2>Asset</h2><br/><table width='90%'>";
foreach( $lines as $line )
{
if( stristr( $line , "|" ) )
{
$data = explode( "|" , $line );
if( $data[ 0 ] == "asset" )
{
print "<tr>";
$rowcolor = ( $count % 2 == 0 ) ? "style='background-color:#eeeeee; style='color:#007700''" : "style='background-color:#ffffff; style='color:#007700''";
print "<td class='padme2' $rowcolor><b>$count</b></td>";
for( $i = 1 ; $i < count( $data ); $i++ )
{
$field = $data[ $i ];
print "<td class='padme2' $rowcolor>$field</td>";
}
$count++;
print "</tr>\n";
}
}
}
print "</table>";
}
else
{
?>
You need to be an administrator to access this page <a href='login.php'>Login</a>
<?php
}
include( "intel_footer.php" );
?>