-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.php
54 lines (53 loc) · 1.76 KB
/
dashboard.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
<?php require 'init.php'; ?>
<?php include 'head.php'; ?>
<body>
<?php include 'dashboard_navbar.php'; ?>
<h3>Recent Project Allocations</h3>
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover project_table">
<thead>
<tr>
<th>ID</th>
<th>Student Name</th>
<th>Project Title</th>
<th>Case Study</th>
<th>Level</th>
<th>Department</th>
<th>Matric. NO</th>
</tr>
</thead>
<tbody>
<?php
$query = $db->query("SELECT * FROM student");
$rows = $query->fetchAll(PDO::FETCH_OBJ);
foreach($rows as $row){
$name = $row->name;
$matric = $row->matric;
$level = $row->level;
$department = $row->department;
$project_id = $row->project_id;
$date = $row->date;
$id = $row->id;
$run = $db->query("SELECT project_name,project_case FROM project WHERE id = '$project_id'");
$run_rows = $run->fetchAll(PDO::FETCH_OBJ);
foreach($run_rows as $runrow){
$case = $runrow->project_case;
$title = $runrow->project_name;
?>
<tr>
<td><?php echo $id; ?></td>
<td><?php echo $name; ?></td>
<td class="text-bold"><?php echo $title; ?></td>
<td class="text-bold"><?php echo $case; ?></td>
<td><?php echo $level; ?></td>
<td><?php echo $department; ?></td>
<td><?php echo $matric; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
<?php include 'footer.php'; ?>