You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
752 B
39 lines
752 B
<?php |
|
defined('BASEPATH') OR exit('No direct script access allowed'); |
|
|
|
/** |
|
* Regio model |
|
*/ |
|
class Edit_model extends CI_Model |
|
{ |
|
|
|
public function __construct() |
|
{ |
|
parent::__construct(); |
|
} |
|
|
|
public function get_lijst() |
|
{ |
|
$this->db->select('id, naam, actief'); |
|
$this->db->from('lijst'); |
|
$this->db->where('jaar', date('Y')); |
|
$this->db->where('regioid', $this->session->regio); |
|
$this->db->order_by('naam', 'ASC'); |
|
|
|
$query = $this->db->get(); |
|
|
|
return $query->result_array(); |
|
} |
|
|
|
public function change_lijst($id, $val) |
|
{ |
|
$data = array( |
|
'actief' => $val |
|
); |
|
$this->db->where('id', $id); |
|
$this->db->where('regioid', $this->session->regio); |
|
$this->db->where('jaar', date('Y')); |
|
$this->db->update('lijst', $data); |
|
} |
|
|
|
} |