page: rename head/foot include files
[minimedit.git] / foot.inc.php
diff --git a/foot.inc.php b/foot.inc.php
new file mode 100644 (file)
index 0000000..30426ea
--- /dev/null
@@ -0,0 +1,29 @@
+</div>
+<hr class="footer" />
+<?php
+if (($notfound = $_SERVER['SCRIPT_NAME'] == '/404.html')) {
+       echo <<<'EOT'
+<script>
+var pagebody = document.getElementsByClassName('article')[0];
+pagebody.innerHTML = '<h2>Nieuwe pagina</h2><p>&nbsp;</p>';
+</script>
+EOT;
+}
+
+define('N', "\n");
+
+$editable = FALSE; // "Beheer toegestaan voor {$_SERVER['REMOTE_ADDR']}:";
+if ($editable) {
+       echo '<p class="footer">'.N;
+       echo $editable.N;
+       echo '<script src="/ckeditor/ckeditor.js"></script>'.N;
+       echo '<script src="/edit.js"></script>'.N;
+       $edit = array_key_exists($_GET['edit']);
+       printf('<a href="?%s">%s</a>'.N,
+               $edit ? '' : 'edit',
+               $edit ? 'lezen' : ($notfound ? 'aanmaken' : 'aanpassen')
+       );
+       echo '</p>'.N;
+}
+
+?></body></html>