-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathall_project.php
36 lines (36 loc) · 1.39 KB
/
all_project.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
<table class="table table-bordered table-hover project_table">
<thead>
<tr>
<th>Project Name</th>
<th>Project Case</th>
<th>Project Level</th>
<th>Allocation Status</th>
<th>Option</th>
</tr>
</thead>
<tbody>
<?php
$query = $db->query("SELECT * FROM project");
$rows = $query->fetchAll(PDO::FETCH_OBJ);
foreach($rows as $row){
$project_name = $row->project_name;
$project_case = $row->project_case;
$project_level = $row->project_level;
$allocation = $row->allocation;
?>
<tr>
<td><?php echo $project_name; ?></td>
<td><?php echo $project_case; ?></td>
<td><?php echo $project_level ?></td>
<td><?php echo ($allocation == 0)? '<label class="text-success">Available</label>':'<label class="text-danger">Unavailable</label>' ?>
</td>
<td>
<a class="btn btn-xs btn-primary" href="editproject.php?id=<?php echo $row->id; ?>"><i class="fa fa-edit"></i></a>
<a class="btn btn-xs btn-danger" onclick="return confirm('Are you sure you want to delete project? ')" href="deleteproject.php?id=<?php echo $row->id; ?>"><i class="fa fa-trash"></i></a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>