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

class c_qrcode extends CI_Controller {

	private $_controller_url 		= 'c_barcode_qr/';
	private $_method_url 			= '';
	private $_form_attributes 		= array();

	public  $data 					= array();
	/**
	 * Constructor
	 */
	public function __construct()
	{
		parent::__construct();
	}

	/** 
	 * index  
	 * Default Method to display locations dashboard
	 * 
	 * @access public 
	 * @param  
	 * @return   
	 */
	public function index($kode)
	{ 		
		
			$kode=''.base_url().'verify/no/'.$kode.'';
	
			$this->load->library('ci_qr_code');
			$this->config->load('qr_code');
			$qr_code_config = array(); 
			$qr_code_config['cacheable'] 	= $this->config->item('cacheable');
			$qr_code_config['cachedir'] 	= $this->config->item('cachedir');
			$qr_code_config['imagedir'] 	= $this->config->item('imagedir');
			$qr_code_config['errorlog'] 	= $this->config->item('errorlog');
			$qr_code_config['ciqrcodelib'] 	= $this->config->item('ciqrcodelib');
			$qr_code_config['quality'] 		= $this->config->item('quality');
			$qr_code_config['size'] 		= $this->config->item('size');
			$qr_code_config['black'] 		= $this->config->item('black');
			$qr_code_config['white'] 		= $this->config->item('white');

			$this->ci_qr_code->initialize($qr_code_config);
			$image_name = 'qr_code_test.png';

			$params['data'] = ''.$kode.'';
			$params['level'] = ('H');//Kualitas
			$params['size'] = (2);//Ukuran
			
			header("Content-Type: image/png"); 
			$this->ci_qr_code->generate($params);
	}
	
	public function index_besar($kode)
	{ 		
			
			$kode=''.base_url().'verify/no/'.$kode.'';
			
			$this->load->library('ci_qr_code');
			$this->config->load('qr_code');
			$qr_code_config = array(); 
			$qr_code_config['cacheable'] 	= $this->config->item('cacheable');
			$qr_code_config['cachedir'] 	= $this->config->item('cachedir');
			$qr_code_config['imagedir'] 	= $this->config->item('imagedir');
			$qr_code_config['errorlog'] 	= $this->config->item('errorlog');
			$qr_code_config['ciqrcodelib'] 	= $this->config->item('ciqrcodelib');
			$qr_code_config['quality'] 		= $this->config->item('quality');
			$qr_code_config['size'] 		= $this->config->item('size');
			$qr_code_config['black'] 		= $this->config->item('black');
			$qr_code_config['white'] 		= $this->config->item('white');

			$this->ci_qr_code->initialize($qr_code_config);

			$image_name = 'qr_code_test.png';

			$params['data'] = ''.$kode.'';
			$params['level'] = ('H');//Kualitas
			$params['size'] = (3);//Ukuran
			
			header("Content-Type: image/png"); 
			$this->ci_qr_code->generate($params);
	}
}
// END qr_code_generate Controller class
/* End of file qr_code_generate.php */
/* Location: ./application/controllers/qr_code_generate.php */