Created
July 1, 2017 05:25
-
-
Save imran300/0e1debc68aa4009382763c47817ab6c6 to your computer and use it in GitHub Desktop.
This file contains 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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
class dashboard extends MY_Controller | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
//$this->settings = new stdClass(); | |
//$cms_db = $this->load->database('forum', TRUE); | |
//$this->orang->cms_db = $this->load->database('forum', TRUE); | |
if ($this->session->userdata("user_id")) { | |
} else { | |
redirect(base_url() . 'index.php/users/login'); | |
} | |
} | |
public function imran() | |
{ | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
// $this->load->database('forum',TRUE); | |
$this->load->model('orang'); | |
$data['records'] = $this->orang->GetAll(NULL, NULL); | |
foreach ($data['records']->result() as $item) { | |
echo $item->User_ID; | |
} | |
//var_dump($data); | |
} | |
} |
This file contains 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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
class Orang extends CI_Model | |
{ | |
// public $cms_db; | |
public function __construct() | |
{ | |
parent::__construct(); | |
} | |
public function GetAll($limit, $offset) | |
{ | |
return $this->model->get('orang',$limit,$offset); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment