<?php
class System_model extends CI_Model {

	public function __construct() 
  {
    $this->load->database();
  }
	//SELECT
  public function sysinfo($sys) 
  {
    $query = $this->db->get_where('xi_systeminfo',array('sys_title' => $sys));
    foreach ($query->result_array() as $value) 
    {
      return $value['sys_value'];
    }
  }
	//INSERT
	//UPDATE
  public function upsysinfo($sys) 
  {
    $info = array( 'sys_value' => $this->input->post($sys) );  
    $this->db->where('sys_title',$sys); 
    $this->db->update('xi_systeminfo', $info); 
  }
	//DELETE
}
?>