summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-01-06 14:10:03 +0100
committerneoraider <devnull@localhost>2006-01-06 14:10:03 +0100
commita89ac4fda6c7cab6cace4078491c29f215213ab2 (patch)
tree9f53ea434c2ffe1cb625aec798ff13f873731e7d
downloadneon-a89ac4fda6c7cab6cace4078491c29f215213ab2.tar
neon-a89ac4fda6c7cab6cace4078491c29f215213ab2.zip
-rw-r--r--code/db.inc.php11
-rw-r--r--code/message.inc.php19
-rw-r--r--code/subst.inc.php17
-rw-r--r--config/config.inc.php27
-rw-r--r--index.php17
-rw-r--r--lang/de.inc.php5
-rw-r--r--styles/GreenGrid/Grid.gifbin0 -> 206 bytes
-rw-r--r--styles/GreenGrid/style.css59
-rw-r--r--templates/default14
9 files changed, 169 insertions, 0 deletions
diff --git a/code/db.inc.php b/code/db.inc.php
new file mode 100644
index 0000000..0c30e86
--- /dev/null
+++ b/code/db.inc.php
@@ -0,0 +1,11 @@
+<?PHP
+ if(!defined('DB_INC')) {
+ define('DB_INC', 1);
+
+ include('adodb.inc.php');
+ include('config/config.inc.php');
+
+ $conn = ADONewConnection($config['driver']);
+ $conn->PConnect($config['server'], $config['user'], $config['password'], $config['db']);
+ }
+?>
diff --git a/code/message.inc.php b/code/message.inc.php
new file mode 100644
index 0000000..013c697
--- /dev/null
+++ b/code/message.inc.php
@@ -0,0 +1,19 @@
+<?PHP
+ if(!defined('MESSAGE_INC')) {
+ define('MESSAGE_INC', 1);
+
+ include('config/config.inc.php');
+
+ include('code/subst.inc.php');
+
+ $message['PageNotFound'] = 'The page $page does not exist.';
+ $message['Forbidden'] = 'The page $page is protected.';
+ $message['InternalError'] = 'An internal error has occourred.';
+
+ if($config['language'] != 'en') @include('lang/' . $config['language'] . '.inc.php');
+
+ function Message($type, $subst = array()) {
+ return Subst($GLOBALS['message'][$type], $subst);
+ }
+ }
+?>
diff --git a/code/subst.inc.php b/code/subst.inc.php
new file mode 100644
index 0000000..72935a2
--- /dev/null
+++ b/code/subst.inc.php
@@ -0,0 +1,17 @@
+<?PHP
+ if(!defined('SUBST_INC')) {
+ define('SUBST_INC', 1);
+
+ function Subst($string, $subst = array()) {
+ $tr['$$'] = '$';
+
+ while(current($subst)) {
+ $tr['$' . key($subst)] = $subst[key($subst)];
+
+ next($subst);
+ }
+
+ return strtr($string, $tr);
+ }
+ }
+?>
diff --git a/config/config.inc.php b/config/config.inc.php
new file mode 100644
index 0000000..38add9e
--- /dev/null
+++ b/config/config.inc.php
@@ -0,0 +1,27 @@
+<?PHP
+ if(!defined('CONFIG_INC')) {
+ define('CONFIG_INC', 1);
+
+ // main options
+
+ $config['language'] = 'de';
+ $config['home'] = 'Home:Startseite';
+
+
+ // database connection
+
+ $config['driver'] = 'mysql';
+ $config['server'] = 'localhost';
+
+ $config['user'] = 'gamezock';
+ $config['password'] = 'thegzpass';
+
+ $config['db'] = 'gamezock-2';
+
+
+ // page design
+
+ $config['default_style'] = 'GreenGrid';
+ $config['title'] = 'Neon';
+ }
+?>
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..b6a0a66
--- /dev/null
+++ b/index.php
@@ -0,0 +1,17 @@
+<?PHP
+ include('config/config.inc.php');
+
+ include('code/message.inc.php');
+ include('code/subst.inc.php');
+
+ header('Content-type: text/html;charset=UTF-8');
+
+ // provisional
+ $template = 'default';
+ $title = $config['title'];
+ $style = $config['default_style'];
+
+ $template_data = join('', file('templates/' . $template));
+
+ echo Subst($template_data, array('title' => $title, 'stylesheet' => 'styles/' . $style . '/style.css', 'content' => 'Inhalt'));
+?>
diff --git a/lang/de.inc.php b/lang/de.inc.php
new file mode 100644
index 0000000..1e14e6f
--- /dev/null
+++ b/lang/de.inc.php
@@ -0,0 +1,5 @@
+<?PHP
+ $message['PageNotFound'] = 'Die Seite $page existiert nicht.';
+ $message['Forbidden'] = 'Die Seite $page ist geschützt.';
+ $message['InternalError'] = 'Ein interner Fehler ist aufgetreten.';
+?>
diff --git a/styles/GreenGrid/Grid.gif b/styles/GreenGrid/Grid.gif
new file mode 100644
index 0000000..c029f93
--- /dev/null
+++ b/styles/GreenGrid/Grid.gif
Binary files differ
diff --git a/styles/GreenGrid/style.css b/styles/GreenGrid/style.css
new file mode 100644
index 0000000..87aede7
--- /dev/null
+++ b/styles/GreenGrid/style.css
@@ -0,0 +1,59 @@
+body {
+ color:#008000;
+ background:url(Grid.gif) #000000 repeat fixed;
+ font-family:Larabiefont, Westminster, Courier, monospace;
+}
+
+a:link {
+ color:#008000;
+ text-decoration:none;
+}
+a:visited {
+ color:#008000;
+ text-decoration:none;
+}
+a:hover {
+ color:#008000;
+ text-decoration:underline;
+}
+a:active {
+ color:#008000;
+ text-decoration:underline;
+}
+
+input, textarea, select {
+ color:#008000;
+ background-color:#002000;
+ border:solid #008000 1px;
+ font-family:Larabiefont, Westminster, Courier, monospace;
+}
+
+
+div#content {
+ text-align:justify;
+ padding:0.8em;
+ background-color:#000000;
+ border:solid #008000 1px;
+}
+
+div#nav {
+ width:9.40em;
+ padding:0 0.8em;
+ border:solid #008000 1px;
+ background-color:#000000;
+}
+
+.nav_cat {
+ text-align:center;
+ font-weight:bold;
+}
+
+.error {
+ color:#FF0000;
+}
+
+
+.neon_head {
+ font-weight:bold;
+ font-size:1.5em;
+}
diff --git a/templates/default b/templates/default
new file mode 100644
index 0000000..36b4022
--- /dev/null
+++ b/templates/default
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <title>$title</title>
+ <link rel="stylesheet" type="text/css" href="$stylesheet" />
+ </head>
+ <body>
+ <div id="content">
+ $content
+ </div>
+ </body>
+</html>