owls

diff index.php @ 17:081ba8764994

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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/index.php	Sat Jul 23 21:39:17 2016 +0200
     1.3 @@ -0,0 +1,41 @@
     1.4 +<?php
     1.5 +	error_reporting(E_ALL);
     1.6 +	include_once 'bbcodeparser.inc.php';
     1.7 +?>
     1.8 +<html>
     1.9 +<head>
    1.10 +  <title>Owls - content-rendering system</title>
    1.11 +  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    1.12 +  <link rel="shortcut icon" href="favicon.ico" />
    1.13 +  <link rel="stylesheet" type="text/css" href="owls.css.php" />
    1.14 +</head>
    1.15 +
    1.16 +<body>
    1.17 +<div id="websiteContainer">
    1.18 +  <a href="/">
    1.19 +  <img src="owls-banner.png" id="banner" />
    1.20 +  </a>
    1.21 +
    1.22 +<?php
    1.23 +	include 'nav.inc.php';
    1.24 +
    1.25 +	if (!isset($_GET['path'])) {
    1.26 +		$_GET['path'] = '/';
    1.27 +	}
    1.28 +	echo '  <div id="content">'."\n";
    1.29 +	echo "    <h2>". preg_replace('/.*\//', '', $_GET['path']) ."</h2>\n";
    1.30 +	$file = 'data/'. $_GET['path'].'/text';
    1.31 +	if (is_file($file)) {
    1.32 +		$text = file_get_contents($file);
    1.33 +	} else {
    1.34 +		$text = 'file not found';
    1.35 +	}
    1.36 +	echo '    <p>'.bbcode($text, 1, 1).'</p>';
    1.37 +	echo '  </div>';
    1.38 +	echo "\n\n";
    1.39 +?>
    1.40 +
    1.41 +</div>
    1.42 +
    1.43 +</body>
    1.44 +</html>