From a3be0289286c43d8656052217457d9162261ba90 Mon Sep 17 00:00:00 2001
From: Philip Häusler
Date: Thu, 2 Jun 2011 00:48:29 +0200
Subject: rewrite
---
www-ssl/credits.php | 18 -------------
www-ssl/css/base.css | 18 ++++++++++++-
www-ssl/index.php | 74 +++++++++++++++++++++++++++++++++++++++++++++-------
3 files changed, 82 insertions(+), 28 deletions(-)
delete mode 100644 www-ssl/credits.php
(limited to 'www-ssl')
diff --git a/www-ssl/credits.php b/www-ssl/credits.php
deleted file mode 100644
index bbfa747d..00000000
--- a/www-ssl/credits.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
-The angelsystem has been (re)done by:
-
-
diff --git a/www-ssl/css/base.css b/www-ssl/css/base.css
index 6c0bc298..808fb512 100644
--- a/www-ssl/css/base.css
+++ b/www-ssl/css/base.css
@@ -81,8 +81,16 @@ nav {
padding: 10px;
}
+p {
+ padding: 0 0 10px 0;
+}
+
+#menu p {
+ padding: 4px;
+}
+
a.sprache img {
- margin: 5px;
+ margin-right: 5px;
}
.background {
@@ -96,3 +104,11 @@ a.sprache img {
.content {
background: #fff;
}
+
+.error {
+ color: #f00;
+}
+
+.success {
+ color: #090;
+}
diff --git a/www-ssl/index.php b/www-ssl/index.php
index cdec1559..5126981c 100644
--- a/www-ssl/index.php
+++ b/www-ssl/index.php
@@ -1,17 +1,73 @@
" . Get_Text("index_text1") . "
\n";
-echo "" . Get_Text("index_text2") . "
\n";
-echo "" . Get_Text("index_text3") . "
\n";
+session_start();
-include "includes/login_eingabefeld.php";
+sql_connect($config['host'], $config['user'], $config['pw'], $config['db']);
-echo "" . Get_Text("index_text4") . "
";
+load_auth();
-include "includes/footer.php";
+// Gewünschte Seite/Funktion
+$p = "start";
+if (isset ($_REQUEST['p']))
+ $p = $_REQUEST['p'];
+
+$title = Get_Text($p);
+$content = "";
+
+// Recht dafür vorhanden?
+if (in_array($p, $privileges)) {
+ if ($p == "news") {
+ //require_once ('includes/pages/user_news.php');
+ $content = "news";
+ }
+ elseif ($p == "login") {
+ require_once ('includes/pages/guest_login.php');
+ $content = guest_login();
+ }
+ elseif ($p == "register") {
+ require_once ('includes/pages/guest_login.php');
+ $content = guest_register();
+ }
+ elseif ($p == "logout") {
+ require_once ('includes/pages/guest_login.php');
+ $content = guest_logout();
+ } else {
+ require_once ('includes/pages/guest_start.php');
+ $content = guest_start();
+ }
+}
+elseif ($p == "credits") {
+ require_once ('includes/pages/guest_credits.php');
+ $content = guest_credits();
+}
+elseif ($p == "faq") {
+ require_once ('includes/pages/guest_faq.php');
+ $content = guest_faq();
+} else {
+ // Wenn schon eingeloggt, keine-Berechtigung-Seite anzeigen
+ if (isset ($user)) {
+ $title = Get_Text("no_access_title");
+ $content = Get_Text("no_access_text");
+ } else {
+ // Sonst zur Loginseite leiten
+ header("Location: " . page_link_to("login"));
+ }
+}
+
+echo template_render('../templates/layout.html', array (
+ 'theme' => isset ($user) ? $user['color'] : $default_theme,
+ 'title' => $title,
+ 'menu' => make_menu(),
+ 'content' => $content
+));
?>
--
cgit v1.2.3-70-g09d2