-
Notifications
You must be signed in to change notification settings - Fork 0
/
userDataAnalysisPage.php
234 lines (218 loc) · 9.88 KB
/
userDataAnalysisPage.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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<?php
session_start();
if(!isset($_SESSION['username'])) {
header("Location: index.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>user Page</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,700">
<!-- https://fonts.google.com/specimen/Roboto -->
<link rel="stylesheet" href="css/fontawesome.min.css">
<!-- https://fontawesome.com/ -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- https://getbootstrap.com/ -->
<link rel="stylesheet" href="css/templatemo-style.css">
<!--
Product Admin CSS Template
https://templatemo.com/tm-524-product-admin
-->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.css"/>
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"></script>
<script src="https://cdn.jsdelivr.net/npm/heatmapjs@2.0.2/heatmap.js"></script>
<script src="https://cdn.jsdelivr.net/npm/leaflet-heatmap@1.0.0/leaflet-heatmap.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"> </script>
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> -->
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
</head>
<body id="reportsPage">
<div class="" id="home">
<nav class="navbar navbar-expand-xl">
<div class="container h-100">
<a class="navbar-brand" href="userDashboard.php">
<h1 class="tm-site-title mb-0" id = 'user_name'></h1>
</a>
<button class="navbar-toggler ml-auto mr-0" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars tm-nav-icon"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mx-auto h-100">
<li class="nav-item">
<a class="nav-link" href="userDashboard.php">
<i class="fas fa-tachometer-alt"></i>
Dashboard
</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="userDataAnalysisPage.php">
<i class="far fa-chart-bar"></i>
Data analysis
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="file_upload_page.php">
<i class="fas fa-upload"></i>
File upload
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="accountPage.php">
<i class="far fa-user"></i>
Account
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">
<i class="fas fa-sign-out-alt"></i>
Logout
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row tm-content-row mar-top">
<div class="tm-block-col tm-col-small">
<div class="tm-bg-primary-dark tm-block">
<div class="text-center">
<h2 class="tm-block-title">Year Selection</h2>
<label for="startyearBox">Start year:</label>
<select class="custom-select" id="startyearBox" name="startyearBox" required>
<option value=""></option>
<?php for ($i = 20; $i >=0 ; $i--)
{
$date = date("Y") - $i;
echo "<option value='$date'>" . $date . "</option>";
}
?>
</select>
<label for="endyearBox">End year:</label>
<select class="custom-select" id="endyearBox" name="endyearBox" required>
<option value=""></option>
<?php for ($i = 20; $i >=0 ; $i--)
{
$date = date("Y") - $i;
echo "<option value='$date'>" . $date . "</option>";
}
?>
</select>
<br><br> <label for="allYearsCheckBox_u"> Check to select all years:</label>
<input type="checkbox" name="allYearsCheckBox_u" id="allYearsCheckBox_u" onclick="disableFunction('allYearsCheckBox_u','startyearBox', 'endyearBox')">
</div>
</div>
</div>
<div class="tm-block-col mar-top">
<div class="mapstyle3" id="mapid"></div>
</div>
<script src="heatmap.js"></script>
<div class="tm-block-col tm-col-small">
<div class="tm-bg-primary-dark tm-block">
<div class="text-center">
<h2 class="tm-block-title">Month Selection</h2>
<label for="startmonthBox">Start month:</label>
<select class="custom-select "id = "startmonthBox" name = "startmonthBox" required>
<option value=""></option>
<?php for ($i = 1; $i <=12 ; $i++)
{
$month = date('F', mktime(0, 0, 0, $i, 10));
echo "<option value='$month'>" . $month . "</option>";
}
?>
</select>
<label for="endmonthBox">End month:</label>
<select class="custom-select" id = "endmonthBox" name= "endmonthBox" required>
<option value=""></option>
<?php for ($i = 1; $i <=12 ; $i++)
{
$month = date('F', mktime(0, 0, 0, $i, 10));
echo "<option value='$month'>" . $month . "</option>";
}
?>
</select>
<br><br> <label for="allMonthsCheckBox_u_u"> Check to select all months:</label>
<input type="checkbox" name="allMonthsCheckBox_u" id="allMonthsCheckBox_u" onclick="disableFunction('allMonthsCheckBox_u','startmonthBox', 'endmonthBox')">
</div>
</div>
</div>
</div>
<div class="center">
<button class="btn-primary" type="submit" id = "dates_button" name="dates_button" onclick="chart_date_range('true')">Go!</button>
</div>
<div class="row tm-content-row mar-top">
<div class="col-sm-12 col-md-12 col-lg-6 col-xl-6 tm-block-col">
<div class="tm-bg-primary-dark tm-block">
<h2 class="tm-block-title">Activity types chart</h2>
<canvas id="activity_chart"></canvas>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6 col-xl-6 tm-block-col">
<div class="tm-bg-primary-dark tm-block tm-block-taller tm-block-scroll">
<h2 class="tm-block-title">Activity type distribution</h2>
<table class="table" id="act_table">
<thead>
<tr>
<th style='text-align:center;' scope="col">ACTIVITY TYPE</th>
<th style='text-align:center;' scope="col">COLOR</th>
<th style='text-align:center;' scope="col">RECORDS NO.</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<div class="row tm-content-row">
<div class="col-sm-12 col-md-12 col-lg-6 col-xl-6 tm-block-col">
<div class="tm-bg-primary-dark tm-block tm-block-taller tm-block-scroll">
<h2 class="tm-block-title">Best <b>hour</b> for each activity</h2>
<table class="table" id="activities_per_hour_table">
<thead>
<tr>
<th style='text-align:center;' scope="col">Activity</th>
<th style='text-align:center;' scope="col">Hour</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-6 col-xl-6 tm-block-col">
<div class="tm-bg-primary-dark tm-block tm-block-taller tm-block-scroll">
<h2 class="tm-block-title">Best <b>day</b> for each activity</h2>
<table class="table" id="activities_per_day_table">
<thead>
<tr>
<th style='text-align:center;' scope="col">Activity</th>
<th style='text-align:center;' scope="col">Day</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<script>
Chart.defaults.global.defaultFontColor = 'white';
</script>
<!-- <script src="js/user_months_Chart.js"></script> -->
<script src="js/connected_user_name.js"></script>
<script src="js/jquery-3.3.1.min.js"></script>
<!-- https://jquery.com/download/ -->
<script src="js/moment.min.js"></script>
<script src="js/disable_function.js"></script>
<script src="js/dataAnalysis.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>