owls

annotate 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
rev   line source
meillo@0 1 <?php
meillo@17 2 error_reporting(E_ALL);
meillo@17 3 include_once 'bbcodeparser.inc.php';
meillo@2 4 ?>
meillo@17 5 <html>
meillo@2 6 <head>
meillo@17 7 <title>Owls - content-rendering system</title>
meillo@17 8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
meillo@2 9 <link rel="shortcut icon" href="favicon.ico" />
meillo@17 10 <link rel="stylesheet" type="text/css" href="owls.css.php" />
meillo@2 11 </head>
meillo@2 12
meillo@2 13 <body>
meillo@2 14 <div id="websiteContainer">
meillo@17 15 <a href="/">
meillo@17 16 <img src="owls-banner.png" id="banner" />
meillo@17 17 </a>
meillo@2 18
meillo@2 19 <?php
meillo@17 20 include 'nav.inc.php';
meillo@2 21
meillo@17 22 if (!isset($_GET['path'])) {
meillo@17 23 $_GET['path'] = '/';
meillo@17 24 }
meillo@17 25 echo ' <div id="content">'."\n";
meillo@17 26 echo " <h2>". preg_replace('/.*\//', '', $_GET['path']) ."</h2>\n";
meillo@17 27 $file = 'data/'. $_GET['path'].'/text';
meillo@17 28 if (is_file($file)) {
meillo@17 29 $text = file_get_contents($file);
meillo@17 30 } else {
meillo@17 31 $text = 'file not found';
meillo@17 32 }
meillo@17 33 echo ' <p>'.bbcode($text, 1, 1).'</p>';
meillo@17 34 echo ' </div>';
meillo@17 35 echo "\n\n";
meillo@2 36 ?>
meillo@2 37
meillo@2 38 </div>
meillo@2 39
meillo@2 40 </body>
meillo@2 41 </html>