);
? ? ? ? ? ? ? ? break;
? ? ? ? case 3:
? ? ? ? ? ? ? ? printf("please enter the sex you want to Search:");
? ?? ???scanf("%s",b);
? ???? ? ? ? if((fp=fopen("information.txt","rb")) == NULL)
? ? ? ? ? ? ? ? {
? ? ? ?? ???? ? ? ? puts("errow opening file!!!");
? ? ? ?? ???? ? ? ? getch();
? ? ? ?? ?? ?? ? ? ? exit(1);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? Panel();
? ? ? ? ? ? puts("");
? ? ? ? ? ? while((fread(&a,sizeof(a),1,fp)) == 1)
? ? ? ? ? ? ? ? {
? ? ? ?? ???? ? ? ? if((strcmp(a.sex,b))==0)
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ?? ???FormatOutputInfo(a);
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? getch();
? ? ? ? ? ? fclose(fp);
? ? ? ? ? ? ? ? break;
? ? ? ? case 4:
? ? ? ? ? ? ? ? printf("please enter the age you want to Search:");
? ?? ???scanf("%s",b);
? ???? ? ? ? if((fp=fopen("information.txt","rb")) == NULL)
? ? ? ? ? ? ? ? {
? ? ? ?? ???? ? ? ? puts("errow opening file!!!");
? ? ? ?? ???? ? ? ? getch();
? ? ? ?? ?? ?? ? ? ? exit(1);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? Panel();
? ? ? ? ? ? puts("");
? ? ? ? ? ? while((fread(&a,sizeof(a),1,fp)) == 1)
? ? ? ? ? ? ? ? {
? ? ? ?? ???? ? ? ? if((strcmp(a.age,b))==0)
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ?? ???FormatOutputInfo(a);
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? getch();
? ? ? ? ? ? fclose(fp);
? ? ? ? ? ? ? ? break;
? ? ? ? case 5:
? ? ? ? ? ? ? ? printf("please enter the address you want to Search:");
? ?? ???scanf("%s",b);
? ???? ? ? ? if((fp=fopen("information.txt","rb")) == NULL)
? ? ? ? ? ? ? ? {
? ? ? ?? ???? ? ? ? puts("errow opening file!!!");
? ? ? ?? ???? ? ? ? getch();
? ? ? ?? ?? ?? ? ? ? exit(1);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? Panel();
? ? ? ? ? ? puts("");
? ? ? ? ? ? while((fread(&a,sizeof(a),1,fp)) == 1)
? ? ? ? ? ? ? ? {
? ? ? ?? ???? ? ? ? if((strcmp(a.address,b))==0)
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ?? ???FormatOutputInfo(a);
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? getch();
? ? ? ? ? ? fclose(fp);
? ? ? ? ? ? ? ? break;
? ? ? ? }
}
void ModifyPassword()
{
? ? ? ? char a[10]={1,2,3,4,5,1,2,3,4};
? ? ? ? printf("please enter the old password:");
? ? ? ? gets(a);
? ? ? ? if(strcmp(a,password_you_entering) == 0)
? ? ? ? {
? ? ? ? ? ? ? ? Initial();
? ?? ???system("CLS");
? ? ? ? ? ? ? ? printf("modification is successful, the new password you modified is %s.\n", initialization_pas);
? ? ? ? ? ? ? ? getch();
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? ? ? puts("the password you enterde is wrong, you will go back to menu.");
? ? ? ? ? ? ? ? getch();
? ? ? ? }
}
void AdministratorInterface()
{
? ? ? ? system("CLS");
? ? ? ? puts("welcome to the administrator privilege`s contacts interface!!!");
? ? ? ? puts("\t\t\t[1]New");
? ? ? ? puts("\t\t\t[2]Modify");
? ? ? ? puts("\t\t\t[3]Delet");
? ? ? ? puts("\t\t\t[4]Display");
? ? ? ? puts("\t\t\t[5]Search");
? ? ? ? puts("\t\t\t[6]ModifyPassword");
? ? ? ? puts("\t\t\t[7]exit");
? ? ? ? printf("please enter the number to select function what you want to executive:[ ]\b\b");
}
void SelectOption(int *a)
{
? ? ? ? char b;
? ? ? ? fflush(stdin);
? ? ? ? b=getchar();
? ? ? ? fflush(stdin);??
? ? ? ? *a=atoi(&b);
}
void ExecutiveFunction1(int *a)
{
? ? ? ? switch(*a)
? ? ? ? {
? ? ? ? case 1:
? ? ? ? ? ? ? ? New();
? ? ? ? ? ? ? ? break;
? ? case 2:
? ? ? ? ? ? ? ? Modify();
? ? ? ? ? ? ? ? break;
? ? ? ? case 3:
? ? ? ? ? ? ? ? Delet();
? ? ? ? ? ? ? ? break;
? ? ? ? case 4:
? ? ? ? ? ? ? ? Display();
? ? ? ? ? ? ? ? break;
? ? ? ? case 5:
? ? ? ? ? ? ? ? Search();
? ? ? ? ? ? ? ? break;
? ? ? ? case 6:
? ? ? ? ? ? ? ? ModifyPassword();
? ? ? ? ? ? ? ? break;
? ? ? ? case 7:
? ? ? ? ? ? ? ? exit(0);
? ? ? ? ? ? ? ? break;
? ? ? ? }
}
void NormalUserInterface()
{
? ? ? ? system("CLS");
? ? ? ? puts("welcome to the normal user privilege`s contacts interface!!!");
? ? ? ? puts("\t\t\t[1]Display");
? ? ? ? puts("\t\t\t[2]Search");
? ? ? ? puts( |