annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3021ce32ee14 begin of using hg for owls
"Meillo r e t u r n s <meillo@marmaro.de>"
parents:
diff changeset
1 <?php
17
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
2 error_reporting(E_ALL);
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
3 include_once 'bbcodeparser.inc.php';
2
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
4 ?>
17
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
5 <html>
2
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
6 <head>
17
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
7 <title>Owls - content-rendering system</title>
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
9 <link rel="shortcut icon" href="favicon.ico" />
17
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
10 <link rel="stylesheet" type="text/css" href="owls.css.php" />
2
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
11 </head>
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
12
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
13 <body>
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
14 <div id="websiteContainer">
17
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
15 <a href="/">
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
16 <img src="owls-banner.png" id="banner" />
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
17 </a>
2
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
18
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
19 <?php
17
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
20 include 'nav.inc.php';
0
3021ce32ee14 begin of using hg for owls
"Meillo r e t u r n s <meillo@marmaro.de>"
parents:
diff changeset
21
17
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
22 if (!isset($_GET['path'])) {
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
23 $_GET['path'] = '/';
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
24 }
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
25 echo ' <div id="content">'."\n";
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
26 echo " <h2>". preg_replace('/.*\//', '', $_GET['path']) ."</h2>\n";
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
27 $file = 'data/'. $_GET['path'].'/text';
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
28 if (is_file($file)) {
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
29 $text = file_get_contents($file);
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
30 } else {
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
31 $text = 'file not found';
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
32 }
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
33 echo ' <p>'.bbcode($text, 1, 1).'</p>';
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
34 echo ' </div>';
081ba8764994 The wiki-like system became a content-rendering system
markus schnalke <meillo@marmaro.de>
parents: 16
diff changeset
35 echo "\n\n";
2
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
36 ?>
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
37
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
38 </div>
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
39
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
40 </body>
ab74e95a8040 added display of broken nodes; Header and Footer in Owls.php now; added logos
"Meillo r e t u r n s <meillo@marmaro.de>"
parents: 0
diff changeset
41 </html>