-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtodo.php
More file actions
68 lines (57 loc) · 1.67 KB
/
todo.php
File metadata and controls
68 lines (57 loc) · 1.67 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
68
<?php
include_once 'functions.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="row mt-3">
<div class="col offset-2">
<h1>mes tâches</h1>
</div>
</div>
<form class="row mt-3" id="formAddTask">
<input type="hidden" name="action" value="add_task">
<div class="col-6 offset-2">
<label class="visually-hidden"for="inputTaskName">Tache</label>
<input type="text" class="form-control" name="taskName" id="inputTaskName" placeholder="indiquer tache" required>
</div>
<div class="col-4">
<button type="submit" class="btn btn-primary mt-3">ajouter tache</button>
</div>
</form>
<div class="row">
<div class="col-7 offset-2">
<table class="table table-bordered table-striped table-hover">
<thead>
<th>fait</th>
<th>nom</th>
</thead>
<tbody>
<?php
foreach ($tasks as $task) {
?>
<tr>
<td class="text-center">
<input type="checkbox" class="form-check-input" data_id="<?php echo $task['id']; ?>" <?php echo $task['checked']; ?>>
</td>
<td><?php echo $task['name']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>