Example #1
0
 case 'add':
     show_coord_form();
     break;
 case 'modif':
     if (entites::exists($id)) {
         show_coord_form($id);
     } else {
         show_list_coord();
     }
     break;
 case 'del':
     if ($id) {
         $total2 = entites::getNbFournisseurs($id);
         $total3 = entites::has_exercices($id);
         $total4 = entites::has_budgets($id);
         $total5 = entites::has_suggestions($id);
         $total7 = entites::has_actes($id, 1);
         if ($total2 + $total3 + $total4 + $total5 + $total7 == 0) {
             entites::delete($id);
             show_list_coord();
         } else {
             $msg_suppr_err = $msg[acquisition_entite_used];
             if ($total2) {
                 $msg_suppr_err .= "<br />- " . $msg[acquisition_entite_used_fou];
             }
             if ($total3) {
                 $msg_suppr_err .= "<br />- " . $msg[acquisition_entite_used_exe];
             }
             if ($total4) {
                 $msg_suppr_err .= "<br />- " . $msg[acquisition_entite_used_bud];
             }