-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
82 lines (66 loc) · 1.62 KB
/
index.php
File metadata and controls
82 lines (66 loc) · 1.62 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
<?php
error_reporting(0);
require_once("check.php");
include("sites/quizauth.php");
?>
<!DOCTYPE html>
<html>
<head>
<?php require_once("ressources/header_seiten.php"); ?>
</head>
<body>
<div id="navigation">
<?php require_once("ressources/navigation.php"); ?>
</div>
<p class="break"></p>
<div id="header">
<?php
// Wo sind die Bilder?
$bilderordner = 'img/banner/';
$defaultimg = 'home';
// Wurde eine Bild Übergeben 1.) GET 2.) POST?
if (! empty ( $_GET ['bild'] )) {
$bilder = $_GET ["bild"];
} else if (! empty ( $_POST ['bild'] )) {
$bilder = $_POST ["bild"];
} else {
// Standardbild
$bilder = $defaultimg;
}
// Gibt es das Bild wirklich?
if (! file_exists ( $bilderordner . $bilder . ".png" )) {
$bilder = $defaultimg . ".png";
}
// Bild laden
echo "<img src=\"$bilderordner$bilder.png\" alt=bild />";
?>
</div>
<div id="content">
<?php
// Wo sind die Seiten?
$seitenordner = 'sites/';
$defaultseite = 'home';
// Wurde eine Seite Übergeben 1.) GET 2.) POST?
if (! empty ( $_GET ['site'] )) {
$seite = $_GET ["site"];
} else if (! empty ( $_POST ['site'] )) {
$seite = $_POST ["site"];
} else {
// Standardseite
$seite = $defaultseite;
}
// Gibt es die Datei wirklich?
if (! file_exists ( $seitenordner . $seite . ".php" )) {
$seite = $defaultseite . ".php";
}
// Inhalt einlesen
include $seitenordner . basename ( $seite . ".php" );
?>
</div>
<div id="footer">
<div id="footer_center">
<?php require_once("ressources/footer_log.php"); ?>
</div>
</div>
</body>
</html>