blob: 976e4145d0df5baf392c6b3755e497c9100f16aa (
plain)
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
|
<?php
session_start();
$db = new SQLite3("../database/sqlite.db");
include("include.php");
if(!empty($_GET)){
switch($_GET["e"]){
case("401"):
$message = "Access forbidden";
break;
case("403"):
$message = "Access forbidden";
break;
case("404"):
$message = "404 - File Not Found";
break;
case("500"):
$message = "Server fault.";
break;
case("502"):
$message = "Bad Gateway";
break;
case("504"):
$message = "Someone other is too slow. I can't wait forever.";
break;
default:
$message = "200 / Everything is okay.";
break;
}
} else {
header("Refresh: 0; https://".$_SERVER["HTTP_HOST"]."/");
exit;
$message = "200 / Everything is okay.";
}
?><!doctype html>
<html>
<head>
<title>Failure :: Junge Gemeinde Adlershof</title>
<meta http-equiv='Content-type' content='text/html; charset=utf-8' />
<link rel='stylesheet' type='text/css' href='/static/hyperstyle.css' />
<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'>
</head>
<?php include("static/head.php"); ?>
<br><br>
<div id='content_container' align='center'>
<div class='kleineschrift'><div class='ueberschrift'><b><p style='text-decoration:underline;'><?php echo $message; ?></p></b></div></div>
<br><br>
<p style='font-size:14px'>Upps, it seems to be something went wrong, sorry.</p>
<p style='font-size:14px'>Have a random quote to bridge the time. Try to reload the site or check for typos in the URL.</p>
<?php
$rows = $db->query("SELECT count(*) as count FROM sprueche;");
$row = $rows->fetchArray();
$numRows = $row["count"];
$zufall = mt_rand(1,$numRows);
$ergebnis = $db->query("SELECT * FROM sprueche where id=$zufall;");
?>
<br>
<div id='container' align='center'>
<br><br><br>
<b>Zitat Nummer #<?php echo $zufall; ?></b><br><br><div id='bgcolor'>
<?php
while($row=$ergebnis->fetchArray()){
echo $row["spruch"];
}
?></div>
</div>
|