aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/index.php
blob: 32b4a97642c2de4ba7c8a31ee9c00aca3e705368 (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
<?php

ob_start();

# if we kann redirect user mit the ?goto variable
$redirect = true;

require_once( dirname(__FILE__) . '/bootstrap.php');

$db = new db();
$user = new jg();
?>
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
	<link rel ="stylesheet" href="/static/style.css">
	<style>.dl-horizontal dt{white-space: normal;} .btn-info{background-color:#3083D6;}</style>
	<title>Junge Gemeinde Adlershof</title>
	<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<noscript><style>.navbar{margin-bottom:0;}</style></noscript>
</head>
<?php
require_once 'static/header.php';
?>
<div class="container">
	<div class="text-center">
		<div class="row">
<?php

	if($_GET["page"] == "" || $_GET["page"] == "index")
		print_index();
	else{
		switch($_GET["page"]){
			case("login"):
				print_login();
				break;
			case("liste"):
				print_list();
				break;

			case("update"):
				print_update_list($_GET['id']);
				break;
			case("add"):
				print_add_entry_to_list();
				break;
			case("404"):
				print_404();
				break;
			case("action"):
				require_once 'action.php';
				break;
			default:
				print_index();
		}
	}

/*
if ( isset($_GET['goto']) && $_GET['goto'] != "" && $redirect ){
	header($_SERVER['SERVER_PROTOCOL'] . ' 302 Moved');
	header('Location: /?page='.$_GET['goto']);
}
*/
?>
</div>
</div>
<?php
require_once 'static/footer.php';