-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.php
More file actions
110 lines (90 loc) · 3.51 KB
/
view.php
File metadata and controls
110 lines (90 loc) · 3.51 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
if(!isset($_SESSION)){
session_start();
}
include 'php/config.php';
if(isset($_SESSION['is_login'])){
$email=$_SESSION['email'];
}
else
{
echo "<script> location.href='index.php';</script>";
}
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="dash.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<title>Data view</title>
<style>
#logout{
float: left;
margin-left: 50px;
}
#check_record{
float: right;
margin-right: 50px;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="text-center heading">
Attendance System
</div>
<div class="button">
<div class="logout_button">
<button id="logout" class="btn btn-outline-primary"><a href="logout.php">logout</a></button>
</div>
<div class="check_record">
<button id="check_record" class="btn btn-outline-primary"><a href="dash.php">Add Student</a>
</button>
</div>
</div>
<div class="text-center add">View Record </div>
<form action="" method="post" class="data">
<table class="table bold jumbotron">
<thead>
<tr>
<th scope="col">Sr. no.</th>
<th scope="col">Date</th>
<th scope="col">view</th>
</tr>
</thead>
<tbody>
<tr>
<?php
$query = "SELECT distinct date FROM atnd";
$res = mysqli_query($conn, $query);
$count = 0;
if (mysqli_num_rows($res) > 0) {
while ($row = mysqli_fetch_assoc($res)) {
$count++;
?>
<th scope="row"><?php echo $count; ?> </th>
<td><?php echo $row['date']; ?></td>
<td>
<button class="btn btn-outline-dark">
<a href="viewp.php?date=<?php echo $row['date']; ?>" >view</a></button>
</td>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</form>
</div>
</body>
</html>