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

class Parametrage extends Admin_Controller {
	
	function __construct() {
		
		parent::__construct(TRUE);
		$this->load->model('parametrage_model','',TRUE);
		
	
	}
	
	
	function speed()
	{
		//$this->load->view( 'speed' );

		if(sizeof($_POST) > 0){
			$this->parametrage_model->upddata($_POST['speed']);

			$data = array('max_speed_limit' => $_POST['speed']);
			//$this->db->where('id', $id);
			$this->db->update('assests_master', $data);
			
			//$this->parametrage_model->save($_POST);
		}

		$qrySpeed="select speed from parametrages where id=1 ";
		$rarr=$this->db->query($qrySpeed);
		$speedFlote = 0;
		foreach ($rarr->result_array() as $rowSpeed)
		{
			$speedFlote =  $rowSpeed['speed'];
		
		}
		$data['speed']=$speedFlote;
		$this->load->view('speed', $data);
	}	
	
	
	 function arsc()
	 {
	 	
	 	if(sizeof($_POST) > 0){
	 		$this->parametrage_model->updarsc($_POST['arsc']);
	 	}
	 	$qryarsc="select arsc from parametrages where id=1 ";
	 	$rarr=$this->db->query($qryarsc);
	 	$arsc = 0;
	 	foreach ($rarr->result_array() as $rowData)
	 	{
	 		$arsc =  $rowData['arsc'];
	 	
	 	}
	 	$data['arsc']=$arsc;
	 	$this->load->view('arsc', $data);
	 	
	 }
	

	
	 
	 
}
?>