summaryrefslogtreecommitdiff
path: root/www-ssl
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2011-06-02 00:48:29 +0200
committerPhilip Häusler <msquare@notrademark.de>2011-06-02 00:48:29 +0200
commita3be0289286c43d8656052217457d9162261ba90 (patch)
tree77a0b39bacea85749f6494e9e5fbe01d546ea58b /www-ssl
parent841bf6a1ca80c14e2ff0ff60a6cb7794527a7ddf (diff)
rewrite
Diffstat (limited to 'www-ssl')
-rw-r--r--www-ssl/credits.php18
-rw-r--r--www-ssl/css/base.css18
-rw-r--r--www-ssl/index.php74
3 files changed, 82 insertions, 28 deletions
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 @@
-<?php
-require_once ('bootstrap.php');
-
-$title = "Credits";
-$header = "Credits";
-include "includes/header.php";
-?>
-<h1>The angelsystem has been (re)done by:</h1>
-<ul>
- <li>?</li>
- <li>helios</li>
- <li>msquare</li>
-</ul>
-<?php
-
-
-include "includes/footer.php";
-?>
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 @@
<?php
require_once ('bootstrap.php');
+require_once ('includes/sys_auth.php');
+require_once ('includes/sys_lang.php');
+require_once ('includes/sys_menu.php');
+require_once ('includes/sys_mysql.php');
+require_once ('includes/sys_page.php');
+require_once ('includes/sys_template.php');
-$title = "Start";
-$header = "Start";
-include "includes/header.php";
+require_once ('config/config.php');
+require_once ('config/config_db.php');
-echo "<p>" . Get_Text("index_text1") . "</p>\n";
-echo "<p>" . Get_Text("index_text2") . "</p>\n";
-echo "<p>" . Get_Text("index_text3") . "</p>\n";
+session_start();
-include "includes/login_eingabefeld.php";
+sql_connect($config['host'], $config['user'], $config['pw'], $config['db']);
-echo "<h6>" . Get_Text("index_text4") . "</h6>";
+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
+));
?>