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