aboutsummaryrefslogtreecommitdiff
path: root/www/failure.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/failure.php')
-rw-r--r--www/failure.php143
1 files changed, 0 insertions, 143 deletions
diff --git a/www/failure.php b/www/failure.php
deleted file mode 100644
index 7461a28..0000000
--- a/www/failure.php
+++ /dev/null
@@ -1,143 +0,0 @@
-<?php
-session_start();
-
-$scheme="http://";
-
-if(isset($_SERVER["HTTPS"])){
- if($_SERVER["HTTPS"] == "on"){
- $scheme="https://";
- }
-}
-
-include("functions/func_login.php");
-$db = new SQLite3("../database/sqlite.db");
-if($_GET["e"] != "401" && check_if_banned($db)){
- banned();
-}
-//include("include.php");
-if(!empty($_GET)){
- switch($_GET["e"]){
- case("401"):
- $message = "You are banned!";
- break;
-
- case("403"):
- $message = "I could do that... but 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.";
- $_GET["e"] = 200;
-}
-
-?><!doctype html>
-<html>
-<head>
- <title><?php if($_GET["e"] != "401"){ echo "Failure ".$_GET["e"]; } else { echo "You are banned! "; } ?> :: 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
-
-if($_SESSION["login"]){
- include("static/head.php");
-
- echo "
-<br><br>
-<div id='content_container' align='center'>
- <div class='kleineschrift'><div class='ueberschrift'><b><p style='text-decoration:underline;'>". $message ."</p></b></div></div>
- ";
-
- echo "
-<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>
- ";
-
- $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;");
-
- echo "
- <br>
- <div id='container' align='center'>
- <br><br><br>
- <b>Zitat Nummer #<?php echo $zufall; ?></b><br><br><div id='bgcolor'>
- ";
-
- while($row=$ergebnis->fetchArray()){
- echo $row["spruch"];
- }
-
- echo "</div>
- </div>
- ";
-} else {
- echo "
- <body link='#000000' vlink='#000000' alink='#FF0000'>
- ";
- echo "
-<br><br>
-<div id='content_container' align='center'>
- <div class='kleineschrift'><div class='ueberschrift'><b><p style='text-decoration:underline;'>". $message ."</p></b></div></div>
- ";
-
- if($_GET["e"] != "401"){
- echo "
- <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>
- <br>
- <font style='font-size:14px'>Zurück zur <a href='/login'><u>Startseite</u></a> oder <a href='/password_recover'><u>Passwort vergessen?</u></a></font>
- ";
-
- $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;");
-
- echo "
- <br>
- <div id='container' align='center'>
- <br><br><br>
- <b>Zitat Nummer #". $zufall ."</b><br><br><div id='bgcolor'>
- ";
-
- while($row=$ergebnis->fetchArray()){
- echo $row["spruch"];
- }
-
- echo "</div>
- </div>
- ";
- }
-}