-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsuppliers.php
More file actions
67 lines (62 loc) · 2.14 KB
/
suppliers.php
File metadata and controls
67 lines (62 loc) · 2.14 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
<?php
require_once 'includes/header.php';
LogInCheck();
require_once 'includes/admin_nav.php';
?>
<!--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="row">
<a href="#addnew" data-toggle="modal" class="btn btn-primary"><span class="glyphicon glyphicon-plus"></span> New</a>
<a href="./reports/all_suppliers.php" target="_new" class="btn btn-success pull-right"><span class="glyphicon glyphicon-print"></span> PDF</a>
</div>
<div class="" style="height: 10px;">
</div>
<div class="row">
<table id="myTable" class="table table-bordered table-striped table-responsive">
<thead>
<th>SL NO</th>
<th>ID</th>
<th>NAME</th>
<th>DETAIL</th>
<th>ADDED AT</th>
<th>ACTION</th>
</thead>
<tbody>
<?php
include_once('db.php');
$sql = "SELECT * FROM `supplier`";
$query = $conn->query($sql);
$i=1;
while($row = $query->fetch_assoc())
{
echo"<tr>
<td>".$i."</td>
<td>".$row['supplier_id']."</td>
<td>".$row['supplier_name']."</td>
<td>".$row['supplier_details']."</td>
<td>".$row['added_at']."</td>
<td><a href='#edit_".$row['supplier_id']."' class='btn btn-success btn-sm' data-toggle='modal'><span class='glyphicon glyphicon-edit'></span> Edit</a>
</tr>";
$i++;
include('models/edit_delete_supplierModel.php') ;
}
?>
</tbody>
</table>
<hr>
<?php
//add required models
require_once 'models/add_supplierModel.php';
?>
</div>
</div>
</div>
<!--end exp1-->
<?php require_once './includes/footer.php'; ?>