Created
February 24, 2018 08:16
-
-
Save jerry-maheswara-github/c1045560eb95e9e9f22e2aae7862ece6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Kodepos extends MY_Controller { | |
/*****************************************************************************/ | |
public function __construct() | |
{ | |
parent::__construct(); | |
$this->load->library('datatables'); | |
$this->data['header'] = $this->parser->parse('contoh/header.html', $this->data, true); | |
$this->data['footer'] = $this->parser->parse('contoh/footer.html', $this->data, true); | |
} | |
/*****************************************************************************/ | |
public function index() | |
{ | |
$this->data['content'] = $this->parser->parse('contoh/kodepos.html', $this->data, true); | |
$this->parser->parse('contoh/index.html', $this->data, false); | |
} | |
/*****************************************************************************/ | |
function datatable_ajax() | |
{ | |
$this->datatables->select('kodepos, kelurahan, kecamatan, kabupaten')->from('marketplace.kodepos'); | |
if ($this->input->is_ajax_request()) { | |
echo $this->datatables->generate('json', ''); | |
}else{ | |
echo 'Sorry...! You can access this via ajax only...!!'; | |
} | |
} | |
/*****************************************************************************/ | |
} | |
/* End of file Kodepos.php */ | |
/* Location: ./application/controllers/Kodepos.php */ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment