page: include controllers from index.php
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 8 Jun 2018 15:59:51 +0000 (17:59 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 8 Jun 2018 22:37:09 +0000 (00:37 +0200)
Replace page code by directory handlers.  Essentially the same,
preparing for upcoming placeholder includes.

edit/index.php [moved from edit.php with 100% similarity]
login/admin/index.php [moved from login/admin.php with 100% similarity]
login/commits/index.php [new file with mode: 0644]
login/index.php [moved from login.php with 97% similarity]
login/pass/index.php [moved from login/pass.php with 100% similarity]
login/visits/index.php [new file with mode: 0644]
nieuws/index.php [moved from nieuws.php with 100% similarity]
page.php

similarity index 100%
rename from edit.php
rename to edit/index.php
similarity index 100%
rename from login/admin.php
rename to login/admin/index.php
diff --git a/login/commits/index.php b/login/commits/index.php
new file mode 100644 (file)
index 0000000..75ff7a5
--- /dev/null
@@ -0,0 +1,2 @@
+<?php
+include 'login/commits.php';
similarity index 97%
rename from login.php
rename to login/index.php
index 5287678ce1d7c542eb66b65125fadcb68bfeafbd..08351339d81cbeacd09ba11c2d3a86e3b6fd71de 100644 (file)
--- a/login.php
@@ -55,5 +55,5 @@ print getoutput($part);
 
 if (empty($Args) and !empty($User['admin'])) {
        include_once 'login/admin.html';
-       include_once 'login/admin.php';
+       include_once 'login/admin/index.php';
 }
similarity index 100%
rename from login/pass.php
rename to login/pass/index.php
diff --git a/login/visits/index.php b/login/visits/index.php
new file mode 100644 (file)
index 0000000..6678661
--- /dev/null
@@ -0,0 +1,2 @@
+<?php
+include 'login/visits.php';
similarity index 100%
rename from nieuws.php
rename to nieuws/index.php
index 290a59670ba98955d69362f1b643105a2a72cd11..059b615fcb1d0adc2e2d384a34ce9669b8fd93ed 100644 (file)
--- a/page.php
+++ b/page.php
@@ -97,7 +97,7 @@ while (TRUE) {
                $PageAccess = $Page;
        }
 
-       if (file_exists("$Page.php")) {
+       if (file_exists("$Page/index.php")) {
                break;
        }
 
@@ -131,7 +131,7 @@ print "</div>\n\n";
 # execute dynamic code
 
 if ($Page) {
-       $found |= require "./$Page.php";
+       $found |= require "./$Page/index.php";
 }
 
 # global html