-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunassigned_projects.php
More file actions
59 lines (58 loc) · 1.86 KB
/
unassigned_projects.php
File metadata and controls
59 lines (58 loc) · 1.86 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
<?php
session_start();
require 'db.php.inc';
$stmt = $pdo->prepare("
SELECT p.project_id, p.title, p.start_date, p.end_date
FROM projects p
WHERE p.team_leader_id IS NULL
ORDER BY p.start_date ASC");
$stmt->execute();
$projects = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Unassigned Projects</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php include 'header.php'; ?>
<main>
<?php include 'sidebar.php'; ?>
<section>
<?php if (!empty($projects)): ?>
<h2>Unassigned Projects</h2>
<table>
<thead>
<tr>
<th>Project ID</th>
<th>Project Title</th>
<th>Start Date</th>
<th>End Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach ($projects as $project): ?>
<tr>
<td><?= $project['project_id'] ?></td>
<td><?= $project['title'] ?></td>
<td><?= $project['start_date'] ?></td>
<td><?= $project['end_date'] ?></td>
<td>
<a href="allocate_team_leader.php?project_id=<?= $project['project_id'] ?>">[Allocate Team Leader]</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<p>No project Unassigned found.</p>
<?php endif; ?>
</section>
</main>
<?php include 'footer.php'; ?>
</body>
</html>