From efaa5bdf8585bec18be4d4fe4fa3d1fa485dac34 Mon Sep 17 00:00:00 2001 From: alextselegidis Date: Wed, 20 May 2015 22:41:03 +0200 Subject: [PATCH] Updated app URLs with index.php so that they work without URL rewrite --- src/application/controllers/backend.php | 6 +++--- src/application/views/backend/header.php | 12 ++++++------ src/application/views/general/error404.php | 2 +- src/application/views/general/installation.php | 2 +- src/application/views/user/forgot_password.php | 4 ++-- src/application/views/user/login.php | 4 ++-- src/application/views/user/logout.php | 2 +- src/application/views/user/no_privileges.php | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/application/controllers/backend.php b/src/application/controllers/backend.php index 1e921eac..3048c5be 100644 --- a/src/application/controllers/backend.php +++ b/src/application/controllers/backend.php @@ -26,7 +26,7 @@ class Backend extends CI_Controller { * appear when the page loads. */ public function index($appointment_hash = '') { - $this->session->set_userdata('dest_url', $this->config->item('base_url') . '/backend'); + $this->session->set_userdata('dest_url', $this->config->item('base_url') . '/index.php/backend'); if (!$this->hasPrivileges(PRIV_APPOINTMENTS)) return; $this->load->model('appointments_model'); @@ -220,7 +220,7 @@ class Backend extends CI_Controller { $user_id = $this->session->userdata('user_id'); if ($user_id == FALSE) { // User not logged in, display the login view. if ($redirect) { - header('Location: ' . $this->config->item('base_url') . '/user/login'); + header('Location: ' . $this->config->item('base_url') . '/index.php/user/login'); } return FALSE; } @@ -230,7 +230,7 @@ class Backend extends CI_Controller { $role_priv = $this->db->get_where('ea_roles', array('slug' => $role_slug))->row_array(); if ($role_priv[$page] < PRIV_VIEW) { // User does not have the permission to view the page. if ($redirect) { - header('Location: ' . $this->config->item('base_url') . '/user/no_privileges'); + header('Location: ' . $this->config->item('base_url') . '/index.php/user/no_privileges'); } return FALSE; } diff --git a/src/application/views/backend/header.php b/src/application/views/backend/header.php index ac644f4f..d14c8b00 100644 --- a/src/application/views/backend/header.php +++ b/src/application/views/backend/header.php @@ -84,7 +84,7 @@ // ------------------------------------------------------ ?> - lang->line('calendar'); ?> @@ -93,7 +93,7 @@ // ------------------------------------------------------ ?> - lang->line('customers'); ?> @@ -102,7 +102,7 @@ // ------------------------------------------------------ ?> - lang->line('services'); ?> @@ -111,7 +111,7 @@ // ------------------------------------------------------ ?> - lang->line('users'); ?> @@ -121,14 +121,14 @@ - lang->line('settings'); ?> - lang->line('log_out'); ?> diff --git a/src/application/views/general/error404.php b/src/application/views/general/error404.php index 329cc05b..7076156b 100644 --- a/src/application/views/general/error404.php +++ b/src/application/views/general/error404.php @@ -88,7 +88,7 @@ lang->line('book_appointment_title'); ?> - + lang->line('backend_section'); ?> diff --git a/src/application/views/general/installation.php b/src/application/views/general/installation.php index 4d55ca83..4cad28d9 100644 --- a/src/application/views/general/installation.php +++ b/src/application/views/general/installation.php @@ -76,7 +76,7 @@ $('.alert').addClass('alert-success'); $('.alert').show(); setTimeout(function() { - window.location.href = GlobalVariables.baseUrl + '/backend'; + window.location.href = GlobalVariables.baseUrl + '/index.php/backend'; }, 1000); } }, 'json'); diff --git a/src/application/views/user/forgot_password.php b/src/application/views/user/forgot_password.php index 12b699af..06d28224 100644 --- a/src/application/views/user/forgot_password.php +++ b/src/application/views/user/forgot_password.php @@ -76,7 +76,7 @@ $('form').submit(function(event) { event.preventDefault(); - var postUrl = GlobalVariables.baseUrl + '/user/ajax_forgot_password'; + var postUrl = GlobalVariables.baseUrl + '/index.php/user/ajax_forgot_password'; var postData = { 'username': $('#username').val(), 'email': $('#email').val() @@ -125,7 +125,7 @@ lang->line('regenerate_password'); ?> - + lang->line('go_to_login'); ?> diff --git a/src/application/views/user/login.php b/src/application/views/user/login.php index 68c92f39..dccd7cf0 100644 --- a/src/application/views/user/login.php +++ b/src/application/views/user/login.php @@ -85,7 +85,7 @@ $('#login-form').submit(function(event) { event.preventDefault(); - var postUrl = GlobalVariables.baseUrl + '/user/ajax_check_login'; + var postUrl = GlobalVariables.baseUrl + '/index.php/user/ajax_check_login'; var postData = { 'username': $('#username').val(), 'password': $('#password').val() @@ -136,7 +136,7 @@

- + lang->line('forgot_your_password'); ?> | diff --git a/src/application/views/user/logout.php b/src/application/views/user/logout.php index 968f6956..de27f539 100644 --- a/src/application/views/user/logout.php +++ b/src/application/views/user/logout.php @@ -73,7 +73,7 @@ lang->line('book_appointment_title'); ?> - + lang->line('backend_section'); ?> diff --git a/src/application/views/user/no_privileges.php b/src/application/views/user/no_privileges.php index 681a2169..e18ba6c1 100644 --- a/src/application/views/user/no_privileges.php +++ b/src/application/views/user/no_privileges.php @@ -64,7 +64,7 @@
- + lang->line('backend_calendar'); ?>