diff index.php @ 17:081ba8764994 owls-2.0

The wiki-like system became a content-rendering system This is a single changeset to include all the changes throughout the last years. Owls no longer supports editing pages but only renders them. Also, it no longer uses a database to store the contents but reads the contents from the filesystem. All this made owls simpler ... anyway, it just reflects my needs.
author markus schnalke <meillo@marmaro.de>
date Sat, 23 Jul 2016 21:39:17 +0200
parents Owls.php@22243e7c7dc5
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/index.php	Sat Jul 23 21:39:17 2016 +0200
@@ -0,0 +1,41 @@
+<?php
+	error_reporting(E_ALL);
+	include_once 'bbcodeparser.inc.php';
+?>
+<html>
+<head>
+  <title>Owls - content-rendering system</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="shortcut icon" href="favicon.ico" />
+  <link rel="stylesheet" type="text/css" href="owls.css.php" />
+</head>
+
+<body>
+<div id="websiteContainer">
+  <a href="/">
+  <img src="owls-banner.png" id="banner" />
+  </a>
+
+<?php
+	include 'nav.inc.php';
+
+	if (!isset($_GET['path'])) {
+		$_GET['path'] = '/';
+	}
+	echo '  <div id="content">'."\n";
+	echo "    <h2>". preg_replace('/.*\//', '', $_GET['path']) ."</h2>\n";
+	$file = 'data/'. $_GET['path'].'/text';
+	if (is_file($file)) {
+		$text = file_get_contents($file);
+	} else {
+		$text = 'file not found';
+	}
+	echo '    <p>'.bbcode($text, 1, 1).'</p>';
+	echo '  </div>';
+	echo "\n\n";
+?>
+
+</div>
+
+</body>
+</html>