-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
118 lines (87 loc) · 3.08 KB
/
Copy pathindex.php
File metadata and controls
118 lines (87 loc) · 3.08 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
<?php
include('db.php');
include_once('./twilio_config.php');
?>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/additional-methods.min.js"></script>
<link rel="shortcut icon" type="image/png" href="/favicon.png"/>
<meta http-equiv="refresh" content="5">
</head>
<style>
body {
margin: 0;
padding: 0;
background-color: #f1f1f1;
}
.box {
width: 80vw;
height: 80vh;
position: absolute;
padding: 20px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 5px;
margin: 0 auto;
top: 10vh;
left: 10vw;
}
form .error {
color: #FFBABA;
}
.txt-m {
font-size: 15vh;
color: white;
text-align: center;
}
#mincha-qa {
font-size: 12vh;
color: #ff331f;
text-align: center;
}
.Header-m {
margin: 0;
position: absolute;
top: 50%;
-ms-transform: translateY(-50%);
transform: translateY(-50%);
padding: ,5%,,5%;
}
</style>
<body>
<div class="container box">
<br/>
<?php
$statement = $connection->prepare("SELECT * FROM guest_count WHERE date = '" . date('Y-m-d') . "' ");
$statement->execute();
$guest_counter = $statement->fetch(PDO::FETCH_ASSOC);
$guest_count = $guest_counter['count'];
$date = date("Y-m-d 00:00:00");
$statement = $connection->prepare("SELECT distinct seid FROM reply where reply_msg = 'yes' and created_date >= '$date'");
$statement->execute();
$count_yes = $statement->rowCount();
$total_join = $count_yes + $guest_count;
?>
<div class="Header-m">
<?php if ($total_join >= MINIMUM_REPLY_LIMIT) { ?>
<h1 class="txt-m" id="mincha-yes"> THERE IS MINCHA TODAY</h1>
<?php } elseif (time() > strtotime('1:55 pm')) { ?>
<h1 class="txt-m center" id="mincha-no"> THERE IS "NO" MINCHA TODAY</h1>
<?php } else { ?>
<h1 class="txt-m center" id="mincha-qa"> MINCHA NOT CONFIRMED. We Only Have "<?php echo $total_join ?>" People </h1>
<?php } ?>
</div>
</div>
<script type="text/javascript" language="javascript">
$("#mincha-no").parents('.box').css({ "backgroundColor": "#ff655b"})
$("#mincha-yes").parents('.box').css({ "backgroundColor": "GREEN" })
$("#mincha-qa").parents('.box').css({ "backgroundColor": "#fff27f"})
</script>
</body>
</html>