|
|
|
@ -24,9 +24,9 @@
|
|
|
|
|
*/
|
|
|
|
|
void menu(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats, bool *phaseCandidatures, bool *phaseTraitement, Etudiant *tetudAdmis[], int *nbEtudAdmis, Etudiant *tetudAttente[], int *nbEtudAttente)
|
|
|
|
|
{
|
|
|
|
|
int choix;
|
|
|
|
|
int choix, pasMdP = 0;
|
|
|
|
|
bool c = false;
|
|
|
|
|
char etat[8];
|
|
|
|
|
char etat[8], mdp[30], MdPAdmin[30];
|
|
|
|
|
while (c == false)
|
|
|
|
|
{
|
|
|
|
|
if (*phaseCandidatures == true)
|
|
|
|
@ -49,20 +49,19 @@ void menu(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats, boo
|
|
|
|
|
switch (choix)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
// char mdp[30], MdPAdmin[30];
|
|
|
|
|
// int i = 0;
|
|
|
|
|
// strcpy(MdPAdmin, chargerMdPAdmin());
|
|
|
|
|
// printf("Veuillez entrer le mot de passe administrateur :\n> ");
|
|
|
|
|
// while(mdp != MdPAdmin)
|
|
|
|
|
// {
|
|
|
|
|
// if(i == 3)
|
|
|
|
|
// {
|
|
|
|
|
// printf("Vous avez entré 3 fois le mauvais mot de passe, veuillez réessayer plus tard.\n");
|
|
|
|
|
// }
|
|
|
|
|
// printf("Veuillez entrer le mot de passe administrateur :\n> ");
|
|
|
|
|
// scanf("%s%*c", mdp);
|
|
|
|
|
// i++;
|
|
|
|
|
// }
|
|
|
|
|
strcpy(MdPAdmin, chargerMdPAdmin());
|
|
|
|
|
printf("Veuillez entrer le mot de passe administrateur :\n> ");
|
|
|
|
|
while(mdp != MdPAdmin)
|
|
|
|
|
{
|
|
|
|
|
if(pasMdP == 3)
|
|
|
|
|
{
|
|
|
|
|
printf("Vous avez entré 3 fois le mauvais mot de passe, veuillez réessayer plus tard.\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
printf("Veuillez entrer le mot de passe administrateur :\n> ");
|
|
|
|
|
scanf("%s%*c", mdp);
|
|
|
|
|
pasMdP++;
|
|
|
|
|
}
|
|
|
|
|
menuAdministrateur(tiut, nbIUT, tetud, nbCandidats, phaseCandidatures, phaseTraitement);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
@ -109,7 +108,6 @@ void menuAdministrateur(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nb
|
|
|
|
|
bool c = false;
|
|
|
|
|
while (c == false)
|
|
|
|
|
{
|
|
|
|
|
// system("clear");
|
|
|
|
|
printf("\n\nMenu d'administrateur : Que voulez-vous faire ?\n");
|
|
|
|
|
printf("\t1 - Modifier le nombre de places dans un département\n");
|
|
|
|
|
printf("\t2 - Créer un département dans un IUT\n");
|
|
|
|
@ -174,7 +172,6 @@ void menuUtilisateur(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCan
|
|
|
|
|
bool c = false;
|
|
|
|
|
while (c == false)
|
|
|
|
|
{
|
|
|
|
|
// system("clear");
|
|
|
|
|
printf("\n\nMenu d'utilisateur : Que voulez-vous faire ?\n");
|
|
|
|
|
printf("\t1 - Voir les villes possédant un IUT\n");
|
|
|
|
|
printf("\t2 - Voir les départements dans chaque IUT\n");
|
|
|
|
@ -222,7 +219,6 @@ void menuCandidat(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandid
|
|
|
|
|
bool c = false;
|
|
|
|
|
while (c == false)
|
|
|
|
|
{
|
|
|
|
|
// system("clear");
|
|
|
|
|
printf("\n\nMenu candidat : Que voulez-vous faire ?\n");
|
|
|
|
|
printf("\t1 - S'inscrire\n");
|
|
|
|
|
printf("\t2 - Afficher ses informations\n");
|
|
|
|
@ -281,7 +277,6 @@ void menuResponsable(Etudiant *tetud[], int nbCandidats, VilleIUT *tiut[], int *
|
|
|
|
|
triNote(tetudResp, nbCandidatsDept);
|
|
|
|
|
while (c == false)
|
|
|
|
|
{
|
|
|
|
|
// system("clear");
|
|
|
|
|
printf("\n\nMenu des Responsable de Departement : Que voulez-vous faire ?\n");
|
|
|
|
|
printf("\t1 - Affichages\n");
|
|
|
|
|
printf("\t2 - Modifier le nombre de places dans un département\n");
|
|
|
|
|