status wat betreft invullen lijsten
This commit is contained in:
@@ -13,6 +13,7 @@ class Organisaties extends MY_Controller{
|
||||
"monpas/Orgversies_model",
|
||||
"monpas/Filledversions_model",
|
||||
"monpas/Scores_model",
|
||||
"monpas/Schooldetails_model",
|
||||
"monpas/Ambities_model",
|
||||
"shared/Licenties_model");
|
||||
$this->load->model($models);
|
||||
@@ -82,7 +83,15 @@ class Organisaties extends MY_Controller{
|
||||
"actief" =>1,
|
||||
);
|
||||
$newid = $this->Organisaties_model->insert_record($data);
|
||||
$licenties = $this->input->post('licenties');
|
||||
|
||||
$data = [ 'organisatie_id' =>$newid,
|
||||
'plaats' =>$this->clean_input("plaats"),
|
||||
'email1' =>$this->clean_input("email"),
|
||||
];
|
||||
$this->Schooldetails_model->insert_record($data);
|
||||
|
||||
|
||||
$licenties = $this->input->post('licenties');
|
||||
if ($licenties){
|
||||
foreach($licenties as $licentie){
|
||||
$this->Licenties_model->insert_record(array("orgid"=>$newid, "modulenr"=>$licentie));
|
||||
@@ -156,6 +165,17 @@ class Organisaties extends MY_Controller{
|
||||
// "mondiv" =>$mondiv
|
||||
);
|
||||
$this->Organisaties_model->update_record($data,$orgid);
|
||||
$detailsid = $this->Schooldetails_model->get_fieldvalue(["organisatie_id" =>$orgid], 'id');
|
||||
if($detailsid){
|
||||
$this->Schooldetails_model->update_record(["email1" =>$this->clean_input("email")], $detailsid);
|
||||
}
|
||||
else {
|
||||
$data = [ 'organisatie_id' =>$orgid,
|
||||
'plaats' =>$this->clean_input("plaats"),
|
||||
'email1' =>$this->clean_input("email"),
|
||||
];
|
||||
$this->Schooldetails_model->insert_record($data);
|
||||
}
|
||||
$this->Licenties_model->delete_record_where(array("orgid"=>$orgid));
|
||||
$licenties = $this->input->post("licenties");
|
||||
if ($licenties){
|
||||
|
||||
Reference in New Issue
Block a user