Guest User

Controller

a guest
Jul 24th, 2011
61
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Sales extends CI_Controller {
  2.  
  3.     function __construct(){
  4.     parent::__construct();
  5.     $this->load->library('user_agent');
  6.     }
  7.     function index() {
  8.     if(!$this->session->userdata('logged_in')) {
  9.         redirect('admin/home');
  10.     }
  11.     // Main Page Data
  12.     $data['sales_pages'] = $this->sales_model->getSalesPages();
  13.     $data['cms_pages'] = $this->navigation_model->getCMSPages();
  14.     $data['title'] = 'Sales';
  15.     $data['content'] = $this->load->view('admin/sales', $data, TRUE);
  16.     $this->load->view('admintemplate', $data);
  17. }
  18.  
  19.  function addSale(){
  20.     $this->load->view('admin/testview',  TRUE);
  21.  }
  22.  
  23. }
RAW Paste Data