|
|
@ -54,12 +54,13 @@ void ageInput() |
|
|
|
|
|
|
|
if((checkIfInteger(userInput))&& (agePermission(age))) |
|
|
|
{ |
|
|
|
//age = strtol(userInput,&userInputPointer,10); |
|
|
|
|
|
|
|
printf("Access granted!\n\n\n\n"); |
|
|
|
|
|
|
|
showMenu(); |
|
|
|
|
|
|
|
menuInput(); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
@ -84,6 +85,57 @@ void ageInput() |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
void menuInput() |
|
|
|
{ |
|
|
|
|
|
|
|
char choiceInput[20]; |
|
|
|
|
|
|
|
char* choiceInputPointer; |
|
|
|
|
|
|
|
int selection; |
|
|
|
|
|
|
|
scanf("%s",choiceInput); |
|
|
|
|
|
|
|
while(true) |
|
|
|
{ |
|
|
|
selection = strtol(choiceInput,&choiceInputPointer,10); |
|
|
|
|
|
|
|
if(chooseOption(selection) == true && checkIfInteger(choiceInput) == true) |
|
|
|
{ |
|
|
|
switch(selection) |
|
|
|
{ |
|
|
|
|
|
|
|
case 1 : printf("\nLoginAsCostumer() function will be implemented here soon\n\n"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 2 : printf("\ncreateCostumerAccount() function will be implemented here soon\n\n"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 3 : printf("\nLoginAsEmployee() function will be implemented here soon\n\n"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 4 : printf("\e[1;1H\e[2J"); |
|
|
|
|
|
|
|
printf("\nsee you next time !\n\n"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
{ |
|
|
|
printf("Input invalid! try again!\n"); |
|
|
|
|
|
|
|
scanf("%s",choiceInput); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void showMenu() |
|
|
|