-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathallocate.php
More file actions
72 lines (62 loc) · 1.78 KB
/
Copy pathallocate.php
File metadata and controls
72 lines (62 loc) · 1.78 KB
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
<?php
require_once './includes/header.php';
//if not logged in return him to login page
LogInCheck();
require_once './includes/admin_nav.php';
//var_dump($_SESSION);
?>
<!--exp1-->
<div class="col-sm-10 col-sm-offset-1">
<div class="row">
<!--place for error message flashing-->
<?php
//this will display any kind of error message as
flash();
?>
</div>
<div class="" style="height: 10px;">
</div>
<div class="row">
<table id="myTable" class="table table-bordered table-striped table-responsive">
<?php
include_once('db.php');
//sql according to role
$sql = "SELECT * FROM item WHERE `dept_id` = '1'" ;
echo '<thead>
<tr>
<th>SL NO</th>
<th>ID</th>
<th>ITEM</th>
<th>CATEGORY</th>
<th>DETAIL</th>
<th>SUPPLIED AT</th>
<th>ACTION</th>
</tr>
</thead>
<tbody>';
$result = $conn->query($sql);
$i = 1;
while($row = $result->fetch_assoc())
{
echo"<tr>
<td>".$i."</td>
<td>".$row['item_id']."</td>
<td>".$row['item_name']."</td>
<td>".$row['item_cat']."</td>
<td>".$row['item_detail']."</td>
<td>".$row['supplied_at']."</td>
<td><a href='#allocate_".$row['item_id']."' class='btn btn-success btn-sm' data-toggle='modal'><span class='glyphicon glyphicon-edit'></span>Allocate</a>
</td>
</tr>";
$i++;
//require_once 'models/allocate_itemModel.php';
include('models/allocate_itemModel.php') ;
}
//$conn->close();
?>
</tbody>
</table>
<hr>
</div>
</div>
<?php require_once './includes/footer.php'; ?>