-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.php
41 lines (41 loc) · 1.3 KB
/
admin.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
<!DOCTYPE html>
<html>
<head>
<title>Admin</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/weatherlogger.css" />
</head>
<?php
include "include/config.php";
include "include/database_functions.php";
include "include/date_functions.php";
include "include/admin_functions.php";
?>
<body>
<div class="container-fluid">
<h2 class="text-center">Admin</h2>
<?php include "include/menu.php" ?>
<div class="row">
<?php
$conn = getDatabaseConnection($dbServer, $dbUser, $dbPassword, $dbName);
if (isset($_POST["average"]))
{
averageWindInDb($_POST["dateTo"], $windAverageMinutes, $_POST["adminPw"], $adminPassword, $conn);
}
?>
</div>
<div class="row justify-content-center my-3 mb-2 ">
<form class="form-inline" method="POST">
<label class="mx-2" for="dateTo">Bis</label>
<?php
renderDates('wind WHERE averaged is false', null, 'dateTo', 'form-control wl-mobile-form-enlarge mx-2', $conn);
?>
<label class="mx-2" for="adminPw">Admin-Passwort</label>
<input type="password" class="form-control" class="mx-2" name="adminPw"></input>
<button name="average" value="average" class="btn btn-primary">Wind mitteln</button>
</form>
</div>
</div>
</body>
</html>