<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class CR extends MY_Controller{
	public function index(){
		$this->load->model("cr_model");
		$post = $this->input->post();
		
		//To prevent loss---
		$this->fm->keep_all_page_filter();
		//------------------
		
		if($this->input->post('REPORT') != ""){
			$data['RPTNAME'] = $post['REPORT'];
			$data['IPADD'] = $_SERVER['REMOTE_ADDR'];
//			$data['FORMULA'] = "";
//			$data['PDFNAME'] = "";
//			$data['PREVIEW'] = FALSE;
//			$data['UI'] = FALSE;
//			$data['DELAY'] = 5;
			
			$this->cr_model->save($data);
		}
	}
}