-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathview_task.php
More file actions
48 lines (45 loc) · 1.53 KB
/
view_task.php
File metadata and controls
48 lines (45 loc) · 1.53 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
<?php
include 'db_connect.php';
if (isset($_GET['id'])) {
$stmt = $conn->prepare("SELECT * FROM task_list WHERE id = ?");
$stmt->bind_param("i", $_GET['id']);
$stmt->execute();
$qry = $stmt->get_result()->fetch_array();
foreach ($qry as $k => $v) {
$$k = $v;
}
$stmt->close();
}
?>
<div class="container-fluid">
<dl>
<dt><b class="border-bottom border-primary">Task</b></dt>
<dd><?php echo ucwords(htmlspecialchars($task, ENT_QUOTES, 'UTF-8')) ?></dd>
</dl>
<dl>
<dt><b class="border-bottom border-primary">Status</b></dt>
<dd>
<?php
if ($status == 1) {
echo "<span class='badge badge-secondary'>Pending</span>";
} elseif ($status == 2) {
echo "<span class='badge badge-primary'>On-Progress</span>";
} elseif ($status == 3) {
echo "<span class='badge badge-success'>Done</span>";
}
?>
</dd>
</dl>
<dl>
<dt><b class="border-bottom border-primary">Description</b></dt>
<dd><?php echo html_entity_decode(htmlspecialchars($description, ENT_QUOTES, 'UTF-8')) ?></dd>
</dl>
<?php if (!empty($file_url) && is_file($file_url)): ?>
<dl>
<dt><b class="border-bottom border-primary">Attached File</b></dt>
<dd>
<a href="<?php echo htmlspecialchars($file_url, ENT_QUOTES, 'UTF-8') ?>" target="_blank">View File</a>
</dd>
</dl>
<?php endif; ?>
</div>