<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Product_details extends CI_Controller {
	public function __construct(){
        parent::__construct();
        	$this->load->model('mod_home');
    }
	
	public function get_details($param){
		if($param !=""){
            $param  = substr_replace(substr($param, 5), "", -2);
			if($param!=''){
				$title='BATCH DETAILS';
				$batch_details = $this->mod_home->get_particalur_batch($param);
				if(count($batch_details) == 0){
					redirect(base_url());
				}
				$data = array('main_content' =>'page/product_details','title' =>$title, 'batch_details'=>$batch_details);
		        $this->load->view('template', $data);
			}else{
				redirect(base_url());
			}
        }else{
			redirect(base_url());
		}
	}
}
