forked from imselmon/meeting_pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
82 lines (65 loc) · 1.94 KB
/
index.php
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
<?php
include "config.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Meet page</title>
<link rel="stylesheet" href="assets/index.css">
</head>
<body>
<div id="date_time" class="top">
</div>
<section>
<h2>😃Good Morning! Interns</h2>
<table>
<tr>
<th>🤓Meeting Title</th>
<th>⏰Time</th>
<th>🔐Join</th>
</tr>
<tr>
<td colspan="100%" class="border"></td>
</tr>
<?php
$reference = "Meetings";
$data = $database->getReference($reference)->getValue();
$i = 0;
foreach ($data as $key => $data1) {
$i++;
?>
<tr>
<td><?php echo $data1['Meeeting_title']; ?></td>
<td>⏰ <?php echo $data1['Meeting_time']; ?></td>
<td>
<a href="join.php?id=<?php echo $key; ?>&meeting=<?php echo $data1['Meeeting_title']; ?>"
class="join">Join</a></td>
</tr>
<?php } ?>
</table>
</section>
<script type="text/javascript">
const c_date = new Date();
var filterd_date = c_date.toLocaleDateString('hi-IN', options);
var filterd_time = c_date.toLocaleTimeString('hi-IN', options);
function startTime() {
const today = new Date();
let h = today.getHours();
let m = today.getMinutes();
let s = today.getSeconds();
var ampm = h >= 12 ? ' PM' : ' AM';
m = checkTime(m);
s = checkTime(s);
setTimeout(startTime, 1000);
document.getElementById('date_time').innerHTML = "⏳"+ h + ":" + m + ":" + s + ampm+" - " +"📆" +filterd_date ;
}
startTime();
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}
</script>
</body>
</html>