|
|
|
@ -7,22 +7,24 @@
|
|
|
|
|
int choixInterface(void) {
|
|
|
|
|
int choix;
|
|
|
|
|
printf("Choix de l'interface: \n");
|
|
|
|
|
printf("• Interface 'responsable' (0, par défaut): Permet de tout faire, via un menu interactif \n");
|
|
|
|
|
printf("• Interface 'Client' (1) : Permet de \n");
|
|
|
|
|
printf("Tout autre nombre saisit mène au choix par défaut.\n");
|
|
|
|
|
printf("1. Interface 'responsable': Pour les responsables \n");
|
|
|
|
|
printf("2. Interface 'Client' : Pour les clients\n");
|
|
|
|
|
printf("Vous choisissez l'interface n°: ");
|
|
|
|
|
scanf("%d", &choix);
|
|
|
|
|
if (choix < 0 || choix > 1) choix = 0;
|
|
|
|
|
if (choix < 0 || choix > 1) {
|
|
|
|
|
fprintf(stderr,"Veuillez entrer un choix valide ! \n");
|
|
|
|
|
}
|
|
|
|
|
switch (choix) {
|
|
|
|
|
case 0: printf("Vous avez choisit l'interface par défaut.\n"); break;
|
|
|
|
|
case 1: printf("Vous avez choisit d'effectuer les tests.\n");
|
|
|
|
|
case 1: printf("Vous avez choisit l'interface responsable.\n"); break;
|
|
|
|
|
case 2: printf("Vous avez choisit l'interface client.\n");
|
|
|
|
|
}
|
|
|
|
|
return choix;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main(){
|
|
|
|
|
switch (choixInterface()) {
|
|
|
|
|
case 1: global_client();
|
|
|
|
|
//case 1: global_resp();
|
|
|
|
|
case 2: global_client();
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|