commit
This commit is contained in:
parent
bd738652a5
commit
031b51a916
10 changed files with 172 additions and 146 deletions
|
@ -113,18 +113,18 @@ void menuConf(ptConf confChain, ptListener listenerChain) {
|
|||
{
|
||||
case 1:
|
||||
{
|
||||
ptConf px = confChain;
|
||||
ptConf px = confChain -> next;
|
||||
|
||||
while (px -> next != NULL) {
|
||||
printf(" Id : %d\n Titre : %s\n Conferencier : %s\n", px -> id, px -> title, px -> speaker);
|
||||
printf(" Date : %d/%d/%d\n",px -> day, px -> month, px -> year);
|
||||
printf(" Nombre de participants : %d\n", confParticipations(px));
|
||||
printf("Id : %d\nTitre : %s\nConferencier : %s\n", px -> id, px -> title, px -> speaker);
|
||||
printf("Date : %d/%d/%d\n",px -> day, px -> month, px -> year);
|
||||
printf("Nombre de participants : %d\n", confParticipations(px));
|
||||
if (px -> listeners -> next != NULL ) {
|
||||
printListenerList(px -> listeners);
|
||||
printListenerList(px -> listeners -> next);
|
||||
}
|
||||
int avg;
|
||||
if ((avg = confGradeAvg(px) != -1)) {
|
||||
printf(" Moyenne des notes : %d\n", confGradeAvg(px));
|
||||
printf("Moyenne des notes : %d\n", confGradeAvg(px));
|
||||
}
|
||||
printf("\n");
|
||||
px = px -> next;
|
||||
|
@ -141,19 +141,19 @@ void menuConf(ptConf confChain, ptListener listenerChain) {
|
|||
char speaker[20];
|
||||
|
||||
id = findConfId(confChain);
|
||||
printf(" Titre de la conference : ");
|
||||
printf("Titre de la conference : ");
|
||||
scanf("%29s", &title);
|
||||
printf(" Nom du conferencier : ");
|
||||
printf("Nom du conferencier : ");
|
||||
scanf("%19s", &speaker);
|
||||
printf(" Jour : ");
|
||||
printf("Jour : ");
|
||||
scanf("%d", &day);
|
||||
printf(" Mois : ");
|
||||
printf("Mois : ");
|
||||
scanf("%d", &month);
|
||||
printf(" Annee : ");
|
||||
printf("Annee : ");
|
||||
scanf("%d", &year);
|
||||
|
||||
addConf(confChain, id, title, speaker, day, month, year);
|
||||
saveConf(confChain);
|
||||
saveConf(confChain -> next);
|
||||
menuConf(confChain, listenerChain);
|
||||
break;
|
||||
}
|
||||
|
@ -162,11 +162,11 @@ void menuConf(ptConf confChain, ptListener listenerChain) {
|
|||
{
|
||||
int id;
|
||||
|
||||
printf(" Id de la conference a supprimer : ");
|
||||
printf("Id de la conference a supprimer : ");
|
||||
scanf("%d", &id);
|
||||
|
||||
removeConf(confChain, id);
|
||||
saveConf(confChain);
|
||||
saveConf(confChain -> next);
|
||||
menuConf(confChain, listenerChain);
|
||||
break;
|
||||
}
|
||||
|
@ -174,11 +174,11 @@ void menuConf(ptConf confChain, ptListener listenerChain) {
|
|||
case 4:
|
||||
{
|
||||
int day, month, year, time;
|
||||
printf(" Jour : ");
|
||||
printf("Jour : ");
|
||||
scanf("%d", &day);
|
||||
printf(" Mois : ");
|
||||
printf("Mois : ");
|
||||
scanf("%d", &month);
|
||||
printf(" Annee : ");
|
||||
printf("Annee : ");
|
||||
scanf("%d", &year);
|
||||
|
||||
time = day + 31 * month + 365 * year;
|
||||
|
@ -197,7 +197,7 @@ void menuConf(ptConf confChain, ptListener listenerChain) {
|
|||
}
|
||||
}
|
||||
|
||||
saveConf(confChain);
|
||||
saveConf(confChain -> next);
|
||||
|
||||
menuConf(confChain, listenerChain);
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ void menuAbo(ptConf confChain, ptListener listenerChain) {
|
|||
system("cls");
|
||||
drawMenu(options, 4);
|
||||
goToCoords(0, 12);
|
||||
printf(" Que voulez-vous faire ? : ");
|
||||
printf("Que voulez-vous faire ? : ");
|
||||
int choice;
|
||||
scanf("%d", &choice);
|
||||
|
||||
|
@ -224,12 +224,12 @@ void menuAbo(ptConf confChain, ptListener listenerChain) {
|
|||
{
|
||||
case 1:
|
||||
{
|
||||
ptListener py = listenerChain;
|
||||
ptListener py = listenerChain -> next;
|
||||
|
||||
while (py -> next != NULL) {
|
||||
printf(" Id : %d\n Nom: %s\n Age: %d\n Niveau: %d\n", py -> id, py -> name, py -> age, py -> level);
|
||||
printf("Id : %d\nNom: %s\nAge: %d\nNiveau: %d\n", py -> id, py -> name, py -> age, py -> level);
|
||||
if (py -> confs -> next != NULL) {
|
||||
printConfList(py -> confs);
|
||||
printConfList(py -> confs -> next);
|
||||
}
|
||||
printf("\n");
|
||||
py = py -> next;
|
||||
|
@ -245,17 +245,17 @@ void menuAbo(ptConf confChain, ptListener listenerChain) {
|
|||
char name[20];
|
||||
|
||||
id = findListenerId(listenerChain);
|
||||
printf(" Nom : ");
|
||||
printf("Nom : ");
|
||||
scanf("%19s", &name);
|
||||
printf(" Age : ");
|
||||
printf("Age : ");
|
||||
scanf("%d", &age);
|
||||
printf(" Niveau : ");
|
||||
printf("Niveau : ");
|
||||
scanf("%d", &level);
|
||||
|
||||
if (addListener(listenerChain, id, name, age, level) != -1) {
|
||||
saveListeners(listenerChain);
|
||||
saveListeners(listenerChain -> next);
|
||||
} else {
|
||||
printf(" Le niveau de l'abonne doit etre compris entre 0 et 5.\n\n");
|
||||
printf("Le niveau de l'abonne doit etre compris entre 0 et 5.\n\n");
|
||||
system("pause");
|
||||
}
|
||||
menuAbo(confChain, listenerChain);
|
||||
|
@ -266,11 +266,11 @@ void menuAbo(ptConf confChain, ptListener listenerChain) {
|
|||
{
|
||||
int id;
|
||||
|
||||
printf(" Id de l'abonne a supprimer : ");
|
||||
printf("Id de l'abonne a supprimer : ");
|
||||
scanf("%d", &id);
|
||||
|
||||
removeListener(listenerChain, id);
|
||||
saveListeners(listenerChain);
|
||||
saveListeners(listenerChain -> next);
|
||||
menuAbo(confChain, listenerChain);
|
||||
break;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ void menu(ptConf confChain, ptListener listenerChain)
|
|||
goToCoords(0, 13);
|
||||
tasse();
|
||||
printf("\n");
|
||||
printf(" Que voulez-vous faire ? : ");
|
||||
printf("Que voulez-vous faire ? : ");
|
||||
int choice;
|
||||
scanf("%d", &choice);
|
||||
|
||||
|
@ -309,17 +309,17 @@ void menu(ptConf confChain, ptListener listenerChain)
|
|||
case 3:
|
||||
{
|
||||
int confId, listenerId, grade;
|
||||
printf(" Entrez l'ID de la conference : ");
|
||||
printf("Entrez l'ID de la conference : ");
|
||||
scanf("%d", &confId);
|
||||
printf(" Entrez l'ID du participant : ");
|
||||
printf("Entrez l'ID du participant : ");
|
||||
scanf("%d", &listenerId);
|
||||
printf(" Entrez la note attribuee par le participant : ");
|
||||
printf("Entrez la note attribuee par le participant : ");
|
||||
scanf("%d", &grade);
|
||||
|
||||
if (participateToConf(confChain, listenerChain, confId, listenerId, grade) != -1) {
|
||||
saveRelations(confChain);
|
||||
} else {
|
||||
printf(" La note doit etre comprise entre 0 et 5 et l'abonne ne doit pas avoir deja participe a la conference\n\n");
|
||||
printf("La note doit etre comprise entre 0 et 5 et l'abonne ne doit pas avoir deja participe a la conference\n\n");
|
||||
system("pause");
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ void menu(ptConf confChain, ptListener listenerChain)
|
|||
px = px -> next;
|
||||
}
|
||||
|
||||
printf(" La conférence la mieux notee est : %s\n\n", confMax -> title);
|
||||
printf("La conférence la mieux notee est : %s\n\n", confMax -> title);
|
||||
|
||||
system("pause");
|
||||
menu(confChain, listenerChain);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue