|
|
|
@ -69,7 +69,7 @@ void clientMenu(float *weight, float *volume, float *price, int tabItemRef[], fl
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* La fonction `adminMenu` permet à l'utilisateur administrateur de pouvoir utiliser des fonctions permettant
|
|
|
|
|
* @brief La fonction `adminMenu` permet à l'utilisateur administrateur de pouvoir utiliser des fonctions permettant
|
|
|
|
|
* d'ajouter/supprimer/modifier des articles du panier/ des clients, et afficher les informations
|
|
|
|
|
* du client/de l'article.
|
|
|
|
|
*
|
|
|
|
@ -144,4 +144,37 @@ void adminMenu(int clientID[], int clientPassword[], float cagnotte[], int suspe
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Pour faire opposition et débloquer son compte lorsqu'il est suspendu.
|
|
|
|
|
* @param clientID Tableau des identifiants client
|
|
|
|
|
* @param clientPassword Tableau des mots de passe
|
|
|
|
|
* @param suspended Tableau des états de compte
|
|
|
|
|
* @param tlogClient Taille logique du tableau des clients
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
void opposition(int clientID[], int clientPassword[], int suspended[], int tlogClient)
|
|
|
|
|
{
|
|
|
|
|
int id, password, index, found;
|
|
|
|
|
printf("Entrez votre identifiant: ");
|
|
|
|
|
scanf("%d%*c", &id);
|
|
|
|
|
index = searchTab(clientID, id, tlogClient, &found);
|
|
|
|
|
if (found == 0)
|
|
|
|
|
{
|
|
|
|
|
errorHandling(-7);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
printf("Entrez votre mot de passe: ");
|
|
|
|
|
scanf("%d%*c", &password);
|
|
|
|
|
if (password == clientPassword[index])
|
|
|
|
|
{
|
|
|
|
|
suspended[index] = 0;
|
|
|
|
|
printf("Votre compte a été réactivé.\n");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
errorHandling(-9);
|
|
|
|
|
}
|
|
|
|
|
}
|