|
|
|
@ -13,7 +13,7 @@ MaillonDept lireM(FILE *f)//lire maillon
|
|
|
|
|
return m;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MaillonDept lireStdin(void)
|
|
|
|
|
MaillonDept lireStdin(void)//lire un maillon mais à l'aide de l'entrée standard
|
|
|
|
|
{
|
|
|
|
|
MaillonDept m;
|
|
|
|
|
printf("Département :\t");
|
|
|
|
@ -179,7 +179,7 @@ void MaJnbP(VilleIUT **tV, int nb)
|
|
|
|
|
{
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
v = searchVille(tV, ville, nb);
|
|
|
|
|
v = searchVille(tV, reponse, nb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printf("Département : \t");
|
|
|
|
@ -196,7 +196,7 @@ void MaJnbP(VilleIUT **tV, int nb)
|
|
|
|
|
{
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
elt = recherche(tV[v]->ldept, dpt);
|
|
|
|
|
elt = recherche(tV[v]->ldept, reponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printf("Nouveau nombre de places disponibles : \t");
|
|
|
|
@ -250,7 +250,7 @@ void createIUT(VilleIUT **tV, int nb)//crée un IUT dans la ville souhaitée.
|
|
|
|
|
{
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
v = searchVille(tV, ville, nb);
|
|
|
|
|
v = searchVille(tV, reponse, nb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m = lireStdin();//on lit un maillon sur l'entrée standard
|
|
|
|
@ -402,7 +402,6 @@ int Admin(VilleIUT **tV, int nb)
|
|
|
|
|
//printf("*--------------------6-Retour-----------------------*\n");
|
|
|
|
|
printf("*****************************************************\n");
|
|
|
|
|
scanf("%d", &reponse);
|
|
|
|
|
printf("%d", reponse);
|
|
|
|
|
switch(reponse)
|
|
|
|
|
{
|
|
|
|
|
case 1: MaJnbP(tV, nb); return 0;
|
|
|
|
@ -422,7 +421,7 @@ int Admin(VilleIUT **tV, int nb)
|
|
|
|
|
|
|
|
|
|
int utilisateur (VilleIUT **tV, int nb){//Onglet accueille des utilisateurs
|
|
|
|
|
|
|
|
|
|
int reponse, i;
|
|
|
|
|
int reponse, i;
|
|
|
|
|
char rdpt[20];
|
|
|
|
|
MaillonDept * ldepart;
|
|
|
|
|
|
|
|
|
@ -435,11 +434,10 @@ MaillonDept * ldepart;
|
|
|
|
|
printf("*****************************************************\n");
|
|
|
|
|
|
|
|
|
|
scanf("%d", &reponse);
|
|
|
|
|
printf("%d", reponse);
|
|
|
|
|
while ( reponse == 1 || reponse == 2 || reponse == 3 || reponse == 4){
|
|
|
|
|
if ( reponse == 1 ){
|
|
|
|
|
Affichetableau(tV, nb);
|
|
|
|
|
return 0;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
if ( reponse == 2){
|
|
|
|
|
AffichenbPtableau(tV, nb);
|
|
|
|
@ -455,9 +453,9 @@ MaillonDept * ldepart;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
if ( reponse == 4 )
|
|
|
|
|
return 2;
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
|
|
|
|
return 0 ;
|
|
|
|
|
return 0 ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -466,7 +464,7 @@ void test (void){ // fonction globale
|
|
|
|
|
int acc, nb, nbville, repAdm, repVis;
|
|
|
|
|
VilleIUT *tV[200];
|
|
|
|
|
|
|
|
|
|
nbville = Chargement(tV, 200, "part1.don");
|
|
|
|
|
nbville = Chargement(tV, 200, "testpart.don");
|
|
|
|
|
|
|
|
|
|
printf("*****************************************************\n");
|
|
|
|
|
printf("*---------------------Accueil-----------------------*\n");
|
|
|
|
@ -483,7 +481,7 @@ void test (void){ // fonction globale
|
|
|
|
|
}
|
|
|
|
|
if (acc == 2){
|
|
|
|
|
repVis = utilisateur (tV, nbville);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (repVis == 2){
|
|
|
|
|
acc = 3;
|
|
|
|
|
}
|
|
|
|
@ -499,10 +497,10 @@ void test (void){ // fonction globale
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* SOUCIS AVEC LA FONCTION TEST, JE N'ARRIVE PAS A SORTIR DU WHILE POUR RETOURNER AU MENU PRINCIPAL
|
|
|
|
|
ADMIN/ VISITEUR. FONCTION RECURCIVE?
|
|
|
|
|
ADMIN/ VISITEUR. FONCTION RECURCIVE?
|
|
|
|
|
|
|
|
|
|
FONCTION RECHERCHE DANS TEST NE RETURN RIEN
|
|
|
|
|
FONCTION AFFICHAGE nbP AFFICHE QUAND MEME LE NOM DES RESPONSABLE... MAIS PAS TOUS
|
|
|
|
|
JE PEUX Y REVENIR DEMAIN SUR MA PARTIE, PAR CONTRE SUR TA PARTIE JE CROIS QU'IL Y A DES ERREURS
|
|
|
|
|
DE SEGMENTATION HESITE PAS A FAIRE RE RUN LE TRUC
|
|
|
|
|
*/
|
|
|
|
|
*/
|
|
|
|
|