-
Notifications
You must be signed in to change notification settings - Fork 0
/
pending.php
154 lines (130 loc) · 5.14 KB
/
pending.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php
session_start();
if(empty($_SESSION["login"])){
header("Location: login.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HEDU IMS | Record View</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<link rel="shortcut icon" href="dist/img/logo.gif" />
<link href="dist/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href="http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link href="dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body class="skin-blue">
<!-- Site wrapper -->
<div class="wrapper">
<!-- header logo: style can be found in header.less -->
<header class="main-header">
<?php include "header.php"; ?>
</header>
<!-- =============================================== -->
<!-- Left side column. contains the sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- search form -->
<form action="search.php" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="key" required class="form-control" placeholder="Search Serial#, Service Tag, Type"/>
<span class="input-group-btn">
<button type='submit' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
</span>
</div>
</form>
<!-- /.search form -->
<!-- sidebar menu: : style can be found in sidebar.less -->
<?php
if($_SESSION["user"] == "admin"){
include "menu.php";
}
else{
include "menu.php";
}
?>
</section>
<!-- /.sidebar -->
</aside>
<!-- =============================================== -->
<!-- Right side column. Contains the navbar and content of the page -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
View All Items
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li><a href="#">Examples</a></li>
<li class="active">Test Form</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
Current Inventory for H.E.D.U <button style="width: auto" class="btn bg-olive btn-block" onclick="window.print()">Print</button>
<br/><br/>
<?php
//VARIABLES
$type = "";
$con = mysqli_connect("localhost", "root", "");
$db = mysqli_select_db($con, "heduis");
$rs = mysqli_query($con, "SELECT * FROM stock ORDER BY type");
if(!$con || !$db || !$rs ){
die('Error: '.mysqli_error());
}
else{
echo "
<table class=\"table\">
<tr>
<th>Service Tag/Serial #</th>
<th>Name</th>
<th>Brand</th>
<th>Model</th>
<th>Type</th>
<th>Loaned</th>
</tr>
";
while($row = mysqli_fetch_array($rs)){
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['brand'] . "</td>";
echo "<td>" . $row['model'] . "</td>";
echo "<td>" . $row['type'] . "</td>";
echo "<td>" . $row['loaned'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
}
?>
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<footer class="main-footer">
<?php include "footer.php";?>
</footer>
</div><!-- ./wrapper -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js" type="text/javascript"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js" type="text/javascript"></script>
</body>
</html>