-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogoutform.php
More file actions
135 lines (127 loc) · 5.53 KB
/
logoutform.php
File metadata and controls
135 lines (127 loc) · 5.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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
include('visitor_out.php');
$userM = $_SESSION['user'];
if ($_SESSION["loggedIn"] == 0)
header("location: index.php");
?>
<html>
<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">
<meta name="author" content="Abayo Akinyi" />
<!--Descriptions-->
<meta name="description" content="I am a great developer for web development" />
<!--Keywords-->
<meta name="keywords" content="Visitor, Management, Freelancer, System" />
<!--bootstrap-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cdbootstrap@1.0.0/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cdbootstrap@1.0.0/css/cdb.min.css" />
<script src="BootStrap/js/jQuery.min.js"></script>
<script src="BootStrap/js/bootstrap.min.js"></script>
<!-- font-awesome icon -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!--Main Style -->
<link rel="stylesheet" href="assets/css/logoutform.css">
<title>Checked Out</title>
</head>
<body>
<!-------------------------------SideNav------------------------------------------------------->
<div>
<div class="row">
<div class="col-sm-3">
<div class="app" id="sidebar" style="display: flex; height: 100%; position: fixed;">
<div class="sidebar text-white" id="sidebar-showcase" role="cdb-sidebar">
<div class="sidebar-container" style="background-color: #01345B;">
<div class="sidebar-header text-center">
<a class="sidebar-toggler"><i class="fa fa-bars"></i></a>
<a class="sidebar-brand">Visitor Management</a>
</div>
<div class="sidebar-nav">
<div class="sidenav">
<a class="sidebar-item" href="front1.php">
<i class="fa fa-th-large sidebar-icon"></i>
<span>Admin Dashboard</span>
</a>
<a class="sidebar-item" href="myform.php">
<i class="fa fa-plus sidebar-icon"></i>
<span>Check In Visitor</span>
</a>
<a class="sidebar-item" href="logoutform.php" style="background: #2487ce;color: #fff;">
<i class="fa fa-minus-circle sidebar-icon"></i>
<span>Checked Out Visitors</span>
</a>
<a class="sidebar-item" href="query_data.php">
<i class="fa fa-eye sidebar-icon"></i>
<span>View Data</span>
</a>
<a class="sidebar-item" href="home.php">
<i class="fa fa-home sidebar-icon"></i>
<span>Back Home</span>
</a>
<a class="sidebar-item" href="logout.php">
<i class="fa fa-sign-out sidebar-icon"></i>
<span>Logout</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-------------------------------Table------------------------------------------------------->
<div class="col-sm-9" style="margin-left: 300px;">
<div style="padding-left: 25px">
<?php
include('db_connect_db_new.php');
$date = date("Y/m/d");
$query = "SELECT * FROM info_visitor WHERE Date = '$date' AND Status = 'OFFLINE'";
$res = mysqli_query($link, $query);
$count = mysqli_num_rows($res);
if ($count) {
echo "<br><h3 style = 'color: #01345B; font-weight: 700; margin-left:100px;'>These Visitors Checked Out Today! </h3><br/>";
headingMake($res);
} else {
echo "<br><span style = 'color : red;'>No Entries to Display</span>";
}
function headingMake($res)
{
echo '<table class="table table-hover ">
<tr style="color: #01345B; font-weight: 700">
<th>Receipt ID </th>
<th>ID/Passport No </th>
<th>Name </th>
<th>Contact</th>
<th>Time In</th>
<th>Time Out</th>
<th>Date</th>
<th>Meeting</th>
</tr>';
while ($result = mysqli_fetch_array($res, MYSQLI_ASSOC)) {
echo '<tr>
<td>' . $result['ReceiptID'] . '</td>
<td>' . $result['idno'] . '</td>
<td>' . $result['Name'] . '</td>
<td>' . $result['Contact'] . '</td>
<td>' . $result['TimeIN'] . '</td>
<td>' . $result['TimeOUT'] . '</td>
<td>' . $result['Date'] . '</td>
<td>' . $result['meetingTo'] . '</td>
</tr>';
}
}
?>
</div>
</div>
<!-------------------------------Scripts------------------------------------------------------>
<script>
const sidebar = document.querySelector('.sidebar');
new CDB.Sidebar(sidebar);
</script>
<script src="../build/cdbbootstrap.js"></script>
<script src="https://cdn.jsdelivr.net/npm/cdbootstrap@1.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/cdbootstrap@1.0.0/js/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/cdbootstrap@1.0.0/js/cdb.min.js"></script>
</body>
</html>