option_save($data); print $serialcirc_diff->show_form(); } break; case 'ficheformat_form': if(!isset($data)) $data = array(); if($action=='save'){ $serialcirc_diff->ficheformat_save($data); print $serialcirc_diff->show_form(5); } elseif($action=='add_field'){ $serialcirc_diff->ficheformat_add_field($data); print $serialcirc_diff->show_form(5); } elseif($action=='del_field'){ $serialcirc_diff->ficheformat_del_field($data); print $serialcirc_diff->show_form(5); } elseif($action=='change_fields'){ $serialcirc_diff->ficheformat_change_fields($data); print $serialcirc_diff->show_form(5); } break; case 'empr_form': if($action=='save'){ $data['duration']=$duration; $data['id_empr']=$id_empr; $serialcirc_diff->empr_save($id_diff,$data); $serialcirc_diff->sort_diff(); print $serialcirc_diff->show_form($form_ask); } break; case 'group_form': if($action=='save'){ $data['group_name']=$group_name; $data['type_diff']=$type_diff; // circ en Marguerite ou normal $data['duration']=$duration; $data['add_type']=$add_type; $data['caddie_select']=$caddie_select; $data['group_circ_select']=$group_circ_select; for($i=0;$i<=$empr_count;$i++){ $id_empr=0; eval("\$id_empr=\$id_empr_".$i.";"); if($id_empr){ $data['empr_list'][]=$id_empr; } } $data['empr_resp']=$empr_resp; $serialcirc_diff->group_save($id_diff,$data); $serialcirc_diff->sort_diff(); print $serialcirc_diff->show_form(); } break; case 'del_empr': print $serialcirc_diff->del_empr($id_empr); break; case 'del_diff': if(count($diff_list)) foreach($diff_list as $id_diff){ $serialcirc_diff->del_diff($id_diff); } print $serialcirc_diff->show_form(1); break; case 'delete': if($msg_error=$serialcirc_diff->delete($num_abt)){ $retour = "./circ.php?categ=serialcirc"; error_message('', $msg_error, 1, $retour); print $serialcirc_diff->show_form(); }else { $query="select num_notice from abts_abts where abt_id=$num_abt"; $result = pmb_mysql_query($query); if(pmb_mysql_num_rows($result)){ $r = pmb_mysql_fetch_object($result); print ""; } } break; case 'sort_diff': $serialcirc_diff->sort_diff(); print $serialcirc_diff->show_form(); break; default : if($empr_id){ print $serialcirc_diff->show_form(4,$empr_id); }else print $serialcirc_diff->show_form(); break; }