-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
80 lines (48 loc) · 2.02 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
<!DOCTYPE html>
<html lang=de>
<?php $pdo = new PDO('mysql:host=localhost;dbname=sschuelersql2', 'sschuelersql2', 'umgizaeobg');?>
<head>
<meta charset="utf-8">
<title>The Weather</title>
<meta name="viewport" content="width=device-width,
initial-scale=1.0, shrink-to-fit=no">
<link href="css/style.css" rel="stylesheet">
<body style="background-image:url(hintergrund.jpg)" class="hintergrund">
</head>
<body>
<header class="site-header">
<section class="headbox">
<h1 class="main-headline">The Weather</h1>
<section class="new">
<a href="upload.php"a>Add Data</a>
</section>
</section>
</header>
<main>
<section class="uebersicht">
<?php $sql= "SELECT * FROM weather GROUP BY datum";
foreach ($pdo->query($sql) as $row) {
$datum = $row['datum'];
$wochentage = array("Sonntag", "Montag", "Dienstag",
"Mittwoch", "Donnerstag", "Freitag", "Samstag");
$zeit = strtotime($datum);
?>
<section class="outline">
<section class="infokasten">
<section class="headline">
<h2 class="date"><?php echo $wochentage[date("w", $zeit)],
date(" d.m.y", $zeit);?></h2>
</section>
<section class="linkbox">
<section class="details">
<a href="details.php?datum=<?php echo $row['datum']?>
">Details</a>
</section>
</section>
</section>
</section>
<?php } ?>
</section>
</main>
</body>
</html>