<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Reseller_guest extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->model('model_app');
        $this->isLoggedIn();
    }

    function isLoggedIn() {
        $isLoggedIn = $this->session->userdata('isLoggedIn');
        if ($isLoggedIn == false) {
            $this->session->set_flashdata('message_red_password', 'LOGIN DULUUUU CUY !');
            redirect('admin/loginpage');
        }
    }

    private $table = 'reseller_guest';
    private $control = 'admin/reseller_guest';
    private $view = 'super/testi/reseller';
    private $pk = 'id';

    function index() {
        $data = array(
            'mydata' => $this->model_app->getAllData($this->table),
        );
        renderSuper("$this->view/data", $data);
    }
    
    function select_id(){
        $uri['id'] = $this->uri->segment(4);
        $data = array(
            'mydata' => $this->model_app->getSelectedData($this->table,$uri),
        );
        renderSuper("$this->view/detail", $data);
    }

}

/* End of file reseller_guest.php */
/* Location: ./application/controllers/reseller_guest.php */