|
Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/angkasapuraretail.com/public_html/application/controllers/ |
Upload File : |
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Spaces extends Public_Controller {
public function __construct() {
parent::__construct();
}
public function index() {
$data = array();
$this->db->select('website_name, spaces_landingpage_description1, spaces_landingpage_description2, spaces_landingpage_description3, spaces_landingpage_image1, spaces_landingpage_image2, spaces_landingpage_image3')->from('configuration')->where('id_configuration', 1);
$data['landingpage'] = $this->db->get()->row();
//get all spaces for airport
$this->db->select('title, alias, image1')->from('spaces')->where('status', '1')->where('type', 'airport')->order_by('priority', 'ASC');
$data['airports'] = $this->db->get()->result();
//get all spaces for non airport
$this->db->select('title, alias, image1')->from('spaces')->where('status', '1')->where('type', 'non_airport')->order_by('priority', 'ASC');
$data['non_airports'] = $this->db->get()->result();
//get SEO
$this->data_header['browser_title'] = ucwords($data['landingpage']->website_name) . '- Available Spaces';
$this->data_header['meta_description'] = ucwords($data['landingpage']->website_name) . '- Available Spaces';
$this->load->view("themes/$this->theme_no/header", $this->data_header);
$this->load->view("themes/$this->theme_no/spaces", $data);
$this->load->view("themes/$this->theme_no/footer", $this->data_footer);
}
public function get($alias = NULL) {
if ($alias == NULL) { show_404(); }
$data = array();
//check if space exist
$this->db->select('title, image2, image3, description')->from('spaces')->where('alias', $alias)->where('status', 1);
$data['space'] = $this->db->get()->row();
if(!$data['space'])
{
show_404();
}
//get SEO
$this->data_header['browser_title'] = 'Spaces - ' . ucwords($data['space']->title);
$this->data_header['meta_description'] = 'Spaces - ' . ucwords($data['space']->title);
$this->load->view("themes/$this->theme_no/header", $this->data_header);
$this->load->view("themes/$this->theme_no/space-detail", $data);
$this->load->view("themes/$this->theme_no/footer", $this->data_footer);
}
}