@ -5,7 +5,7 @@
void MenuAdministrateur ( VilleIUT * tiut [ ] , int n ) {
char departement [ 30 ] , respon [ 30 ] , Vmodif [ 31 ] , tVille [ 31 ] , tdepartemnt [ 30 ] , AouD ;
int choix , nbp , i , j , comp , Mnbp , BloqueChangV , BloqueChangD ;
int choix , nbp , i , j , comp , Mnbp , good = 0 ;
VilleIUT V ;
printf ( " \n 0-Revenir au menu \n 1-Modifier place \n 2-Creer un departement \n 3-supprimer un département \n 4-Lancer et Arreter la phase de canditature \n 5-modifier nom responsable : " ) ;
@ -21,21 +21,26 @@ void MenuAdministrateur(VilleIUT *tiut[],int n){
scanf ( " %s " , Vmodif ) ;
printf ( " \n departement à modifier: " ) ;
scanf ( " %s " , departement ) ;
for ( j = 0 ; i < n ; i + + ) {
for ( i = 0 ; i < n ; i + + ) {
comp = strcmp ( tiut [ i ] - > ville , Vmodif ) ;
if ( comp = = 0 ) {
( strcmp ( tiut [ i ] - > ldept - > departement , departement ) = = 0 & & tiut [ i ] - > ldept - > AouD = = ' D ' ) ;
printf ( " pb departement arret phase de candidature " ) ;
choix = 0 ;
}
for ( j = 0 ; j < 3 ; j + + ) {
if ( strcmp ( tiut [ j ] - > ldept - > departement , departement ) = = 0 & & tiut [ j ] - > ldept - > AouD = = ' D ' ) {
printf ( " pb departement arret phase de candidature \n " ) ;
good = 1 ;
}
}
}
}
printf ( " \n nombre de place apres modification : " ) ;
scanf ( " %d " , & Mnbp ) ;
for ( i = 0 ; i < n ; i + + ) {
comp = strcmp ( tiut [ i ] - > ville , Vmodif ) ;
if ( comp = = 0 ) {
tiut [ i ] - > ldept = ModifinbP ( tiut [ i ] - > ldept , departement , Mnbp , n ) ;
}
if ( good = = 0 ) {
printf ( " \n nombre de place apres modification : " ) ;
scanf ( " %d " , & Mnbp ) ;
for ( i = 0 ; i < n ; i + + ) {
comp = strcmp ( tiut [ i ] - > ville , Vmodif ) ;
if ( comp = = 0 ) {
tiut [ i ] - > ldept = ModifinbP ( tiut [ i ] - > ldept , departement , Mnbp , n ) ;
}
}
}
}
@ -103,9 +108,6 @@ void MenuAdministrateur(VilleIUT *tiut[],int n){
affichage ( tiut , n ) ;
}
ListeD suppressionTete ( ListeD ld ) {
ListeD ldsvt ;
ldsvt = ld - > suivant ;