2013-06-12 18:31:16 +03:00
|
|
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
|
|
|
|
class Backend extends CI_Controller {
|
|
|
|
/**
|
|
|
|
* Display the main backend page.
|
|
|
|
*
|
|
|
|
* This method displays the main backend page. All users login permission can
|
|
|
|
* view this page which displays a calendar with the events of the selected
|
|
|
|
* provider or service. If a user has more priviledges he will see more menus
|
|
|
|
* at the top of the page.
|
|
|
|
*/
|
|
|
|
public function index() {
|
|
|
|
// @task Require user to be logged in the application.
|
|
|
|
|
2013-07-06 03:00:04 +03:00
|
|
|
$this->load->model('providers_model');
|
|
|
|
$this->load->model('services_model');
|
|
|
|
$this->load->model('settings_model');
|
2013-06-12 18:31:16 +03:00
|
|
|
|
2013-07-05 11:39:52 +03:00
|
|
|
$view_data['base_url'] = $this->config->item('base_url');
|
2013-07-06 03:00:04 +03:00
|
|
|
$view_data['book_advance_timeout'] = $this->settings_model->get_setting('book_advance_timeout');
|
|
|
|
$view_data['company_name'] = $this->settings_model->get_setting('company_name');
|
|
|
|
$view_data['available_providers'] = $this->providers_model->get_available_providers();
|
|
|
|
$view_data['available_services'] = $this->services_model->get_available_services();
|
2013-06-12 18:31:16 +03:00
|
|
|
|
|
|
|
$this->load->view('backend/header', $view_data);
|
|
|
|
$this->load->view('backend/calendar', $view_data);
|
|
|
|
$this->load->view('backend/footer', $view_data);
|
|
|
|
}
|
|
|
|
|
2013-07-05 11:39:52 +03:00
|
|
|
/**
|
|
|
|
* Display the backend customers page
|
|
|
|
*
|
|
|
|
* In this page the user can manage all the customer records of the system.
|
|
|
|
*/
|
2013-06-12 18:31:16 +03:00
|
|
|
public function customers() {
|
2013-07-05 11:39:52 +03:00
|
|
|
// @task Require user to be logged in the application.
|
|
|
|
|
2013-07-06 03:00:04 +03:00
|
|
|
$this->load->model('providers_model');
|
|
|
|
$this->load->model('customers_model');
|
|
|
|
$this->load->model('services_model');
|
|
|
|
$this->load->model('settings_model');
|
2013-07-05 11:39:52 +03:00
|
|
|
|
2013-07-09 08:43:59 +03:00
|
|
|
$view_data['base_url'] = $this->config->item('base_url');
|
2013-07-06 03:00:04 +03:00
|
|
|
$view_data['company_name'] = $this->settings_model->get_setting('company_name');
|
|
|
|
$view_data['customers'] = $this->customers_model->get_batch();
|
2013-07-09 08:43:59 +03:00
|
|
|
$view_data['available_providers'] = $this->providers_model->get_available_providers();
|
2013-07-06 03:00:04 +03:00
|
|
|
$view_data['available_services'] = $this->services_model->get_available_services();
|
2013-07-05 11:39:52 +03:00
|
|
|
|
|
|
|
$this->load->view('backend/header', $view_data);
|
|
|
|
$this->load->view('backend/customers', $view_data);
|
|
|
|
$this->load->view('backend/footer', $view_data);
|
2013-06-12 18:31:16 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public function services() {
|
2013-06-18 19:06:34 +03:00
|
|
|
echo '<h1>Not implemented yet.</h1>';
|
2013-06-12 18:31:16 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public function providers() {
|
2013-06-18 19:06:34 +03:00
|
|
|
echo '<h1>Not implemented yet.</h1>';
|
2013-06-12 18:31:16 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public function settings() {
|
2013-06-18 19:06:34 +03:00
|
|
|
echo '<h1>Not implemented yet.</h1>';
|
2013-06-12 18:31:16 +03:00
|
|
|
}
|
2013-06-13 19:25:34 +03:00
|
|
|
|
2013-06-19 22:29:00 +03:00
|
|
|
|
2013-06-12 18:31:16 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/* End of file backend.php */
|
|
|
|
/* Location: ./application/controllers/backend.php */
|