From d8055192991ac8504e48c137038879790c762d2d Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 26 Jul 2016 14:27:14 +0200 Subject: Adding and deleting users --- index.php | 73 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 37 insertions(+), 36 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 3c8d842..a689f7e 100644 --- a/index.php +++ b/index.php @@ -1,31 +1,31 @@ . + * along with this program. If not, see . */ -/** - * Load the basic configuration (sessions, database, class autoloading, etc.) +/** + * Load the basic configuration (sessions, database, class autoloading, etc.) */ require_once('./conf.php'); @@ -36,38 +36,39 @@ $_request = str_replace(constants::url_internal, '', $_request); // This is the REQUEST_URI switch // The default shows a 404 page $pages = array( - '/' => './include/home.php', - '/clients' => './include/clients.php', - '/clients/new' => './include/clients-new.php', - '/clients/edit' => './include/clients-edit.php', - '/contacts' => './include/contacts.php', - '/contacts/new' => './include/contacts-new.php', - '/contacts/edit' => './include/contacts-edit.php', - '/offers' => './include/offers.php', - '/offers/new' => './include/offers-new.php', - '/offers/edit' => './include/offers-edit.php', - '/assignments' => './include/assignments.php', - '/assignments/new' => './include/assignments-new.php', - '/assignments/edit' => './include/assignments-edit.php', - '/discounts' => './include/discounts.php', - '/discounts/new' => './include/discounts-new.php', - '/discounts/edit' => './include/discounts-edit.php', - '/about' => './include/about.php', - '/settings' => './include/settings.php', - '/ajax/collapse' => './include/ajax-collapse.php' + '/' => './include/home.php', + '/clients' => './include/clients.php', + '/clients/new' => './include/clients-new.php', + '/clients/edit' => './include/clients-edit.php', + '/contacts' => './include/contacts.php', + '/contacts/new' => './include/contacts-new.php', + '/contacts/edit' => './include/contacts-edit.php', + '/offers' => './include/offers.php', + '/offers/new' => './include/offers-new.php', + '/offers/edit' => './include/offers-edit.php', + '/assignments' => './include/assignments.php', + '/assignments/new' => './include/assignments-new.php', + '/assignments/edit' => './include/assignments-edit.php', + '/discounts' => './include/discounts.php', + '/discounts/new' => './include/discounts-new.php', + '/discounts/edit' => './include/discounts-edit.php', + '/about' => './include/about.php', + '/settings' => './include/settings.php', + '/users/new' => './include/users-new.php', + '/ajax/collapse' => './include/ajax-collapse.php' ); $_page = null; foreach ($pages as $uri => $path) { - if ($_request == $uri && file_exists($path)) { - $_page = $uri; - require($path); - break; - } + if ($_request == $uri && file_exists($path)) { + $_page = $uri; + require($path); + break; + } } if ($_page === null) { - $_page = '/404'; - http_response_code(404); - require('./include/404.php'); + $_page = '/404'; + http_response_code(404); + require('./include/404.php'); } -- cgit v1.2.3