Example #1
0
 /**
  * Ajout d'une règle de gestion
  */
 public function add()
 {
     // Insertion en base
     $rdg = new RdG_model();
     $rdg->rdgnurdg = $this->input->post('number');
     $rdg->rdgtyrdg = $this->input->post('type');
     $rdg->rdglbeno = $this->input->post('anounce');
     $rdg->prjidprj = $this->input->post('project');
     $rdg->save($this->db);
     $this->session->set_flashdata('message', formatInfo('Nouvelle règle ajoutée'));
     // Recharge la page avec les nouvelles infos
     redirect('listrdgs/index');
 }
 /**
  * Ajout d'une règle de gestion
  */
 public function addrdg()
 {
     // Insertion en base d'une regle de gestion
     $rdg = new RdG_model();
     $rdg->rdgnurdg = $this->input->post('number');
     $rdg->rdgtyrdg = $this->input->post('type');
     $rdg->rdglbeno = $this->input->post('anounce');
     $rdg->prjidprj = $this->input->post('project');
     $rdg->save($this->db);
     $this->session->set_flashdata('message', formatInfo('Nouvelle règle ajoutée'));
     // Recharge la page avec les nouvelles infos
     redirect('editproject/index/' . $rdg->prjidprj . '#rdg_' . $rdg->rdgidrdg);
 }