-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutilisateur.c.save
68 lines (62 loc) · 2.05 KB
/
utilisateur.c.save
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void Administrateur()
{
char login[10],choix, pwd[10];
int shut = 0;
do
{
system("cls");system("color a4");
puts("\n\n\n\n\n\t\t\t\t******************************************");
puts("\t\t\t\t* VEUILLEZ VOUS CONNECTER SVP *");
puts("\t\t\t\t******************************************\n");
printf("\t\t\t\tLOGIN/USER ---> ");scanf("%s",login);
printf("\t\t\t\tPassword/MOT_DE_PASS ---> ");scanf("%s",pwd);
if(strcmp(login,"Admin")!=0 || strcmp(pwd,"admin")!=0)
{
system("color 4a");
printf("\n\n\t\t\tAttention:: Le login ou le Mot de pass et Incorrect \n");
printf("\t\t\tIls vous reste %d tentative ",3-shut);
system("pause >nul");
}
shut++;
if(shut == 4)
{
system("cls");system("color 4a");
puts("\n\n\n\t\t\t****************************************");
printf("\t\t\t* Veuillez Contacter l'Administrateur *\n");
printf("\t\t\t* TEL: +224 *\n");
printf("\t\t\t* E-mail: [email protected] *\n");
puts("\t\t\t****************************************");
system("pause >nul");
exit(-1);
}
}while(strcmp(login,"Admin")!=0 || strcmp(pwd,"admin")!=0);
system("cls");
puts("\n\n\t\t****************************************");
puts("\t\t****** BIENVENUE CHEZ LE PROJET 16 *****");
puts("\t\t****************************************");
do
{a:
system("cls");menu();
printf("\t\t\tVOTRE CHOIX ---> ");scanf("%d",&choix);
}while(choix < 1 || choix > 3);
switch(choix)
{
case 1: /// GESTION DES ARTICLES
system("cls");
f_Articles();
system("cls");
goto a;
case 2: /// GESTION DES VENTES
system("cls");
f_Ventes();
system("cls");
goto a;
case 3: /// QUITTER LE PROGRAMME
break;
default:
break;
}
}