diff --git a/app/templates/error-notfound.php b/app/templates/error-notfound.php new file mode 100644 index 0000000..a33ff0b --- /dev/null +++ b/app/templates/error-notfound.php @@ -0,0 +1,8 @@ + +
+
The page is not found.
+
+ go to front page or to your profile +
+
+ diff --git a/app/templates/unauthorized.php b/app/templates/error-unauthorized.php similarity index 100% rename from app/templates/unauthorized.php rename to app/templates/error-unauthorized.php diff --git a/app/templates/page-menu.php b/app/templates/page-menu.php index ae5b45d..1918aa3 100644 --- a/app/templates/page-menu.php +++ b/app/templates/page-menu.php @@ -14,7 +14,7 @@
  • - +
  • diff --git a/app/templates/page-sidebar.php b/app/templates/page-sidebar.php index a9dc145..c781883 100644 --- a/app/templates/page-sidebar.php +++ b/app/templates/page-sidebar.php @@ -16,8 +16,8 @@ $timeNow = new DateTime('now', new DateTimeZone($userTimezone));
  • statistics

  • - -
  • + +
  • general stats
  • diff --git a/public_html/index.php b/public_html/index.php index 1995186..681d880 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -25,16 +25,21 @@ error_reporting(E_ALL); // list of available pages // edit accordingly, add 'pages/PAGE.php' $allowed_urls = [ - 'front', - 'login', - 'logout', - 'register', - 'profile', - 'config', - 'agents', + 'dashboard', + 'conferences', 'participants', 'components', + + 'agents', + + 'profile', + 'config', + 'logs', + + 'login', + 'logout', + 'register', ]; // cnfig file @@ -68,7 +73,7 @@ session_start(); if (isset($_REQUEST['page'])) { $page = $_REQUEST['page']; } else { - $page = 'front'; + $page = 'dashboard'; } if (isset($_REQUEST['item'])) { $item = $_REQUEST['item']; @@ -142,28 +147,18 @@ if ($page == 'logout') { } // page building + include '../app/templates/page-header.php'; + include '../app/templates/page-menu.php'; + include '../app/templates/block-message.php'; + if (isset($currentUser)) { + include '../app/templates/page-sidebar.php'; + } if (in_array($page, $allowed_urls)) { - // all normal pages - include '../app/templates/page-header.php'; - include '../app/templates/page-menu.php'; - include '../app/templates/block-message.php'; - if (isset($currentUser)) { - include '../app/templates/page-sidebar.php'; - } include "../app/pages/{$page}.php"; - } else { - - // the page is not in allowed urls, loading front page - $error = 'The page "' . $page . '" is not found'; - include '../app/templates/page-header.php'; - include '../app/templates/page-menu.php'; - include '../app/templates/block-message.php'; - if (isset($currentUser)) { - include '../app/templates/page-sidebar.php'; - } - include '../app/pages/front.php'; + // the page is not in allowed urls, loading "not found" page + include '../app/templates/error-notfound.php'; } } // end with the footer