برنامه دفتر تلفن (انگلیسی و فارسی) به زبان C++ همراه سورس کد

این برنامه که به زبان C++ نوشته شده که برای منو زیر منو هم طراحی شده و شامل اضافه کردن جستجو حذف داده ها از فایل است.این برنامه به صورت انگلیسی و همچنین با استفاده از سپند به صورت فارسی هم نوشته شده است

 

عکس صفحه اول برنامه :

 

این قابلیت برای موقعی هست که میخواید سیستم را ترک کنید ولی نمیخواهید برنامه را ببندید میتوانید از این گزینه استفاده کنید تا در صفحه برنامه درخواست پسورد ظاهر شود کلید میانبر F5 می باشد

 

صفحه ثبت اطلاعات :

 

منوی جستجو و زیر منوهاش :

 

کادر مربوط به جستجو :

 

جستجو و کادر مربوط به یافت نشدن مشخصات :

 

نمایش همه اطلاعات ثبت شده در برنامه :

 

منو و زیر منوی مربوط به حذف داده ها :

 

تغییر پسورد برنامه :

 

مشخصات برنامه :

 

سورس کد برنامه دفتر تلفن به زبان C++ به صورت کامل

#include conio.h 
#include stdlib.h 
#include dos.h 
#include string.h 
#include stdio.h 
#include iostream.h
struct asghar{
char n[15],f[20],a[20],t[20],p[15];};
struct asghar st,st1;
FILE *fp,*ramz,*oo,*ff;
int ii=1,ttt=3,i,k=100;
/*88888888888888888888888888888888888888888888888888888888888888 scrn 888888*/
void scrn(void)
{
  char xx5[25],pass5[25];int man=0,qq=1;
  oo=fopen("system.sys","r");
  fread(&xx5,sizeof(xx5),1,oo);
  for(i=0;i<=25;i++)xx5[i]-=10;
  do
  {
  fread(&xx5,sizeof(xx5),1,oo);
  window(1,12,80,12);textbackground(0);clrscr();
  window(45,1,45,25);textbackground(0);clrscr();
  window(60,1,60,25);textbackground(0);clrscr();
  window(40,11,65,13);textbackground(2);textcolor(0);clrscr();gotoxy(2,1);cout<<"password ";gotoxy(26,3);cout<<qq;
  window(41,12,64,12);textbackground(5);textcolor(15);clrscr();gotoxy(2,1);cin>>pass5;
  if(!strcmp(xx5,pass5))man=5;qq++;
  }while(man!=5);
fclose(oo);
}
/*88888888888888888888888888888888888888888888888888888888888888 menu 88888*/
void menu(void)
{
window(1,1,80,25);textbackground(1);textcolor(15);clrscr();
window(1,25,80,25);textbackground(7);clrscr();textcolor(4);clrscr();cout<<" F5 : password";
window(5,3,20,17);textbackground(0);clrscr();textcolor(15);
window(4,2,19,16);textbackground(2);textcolor(0);clrscr();gotoxy(16,4);cout<<"";gotoxy(16,6);cout<<"";
window(5,3,18,3);textbackground(5);textcolor(15);clrscr();cout<<" add  n.f.t.a";
window(5,5,18,5);textbackground(5);clrscr();cout<<" search n.f.t";
window(5,7,18,7);textbackground(5);clrscr();cout<<" del      n.f";
window(5,9,18,9);textbackground(5);clrscr();cout<<" display  all";
window(5,11,18,11);textbackground(5);clrscr();cout<<" chenge  pass";
window(5,13,18,13);textbackground(5);clrscr();cout<<" tamas  ba ma";
window(5,15,18,15);textbackground(5);clrscr();cout<<" exit";
}
/*88888888888888888888888888888888888888888888888888888888888888 harecat 88*/
void haracat(void)
{int a;
if(a==1){window(5,3,18,3);textbackground(4);clrscr();cout<<" add  n.f.t.a";}
if(a==2){window(5,5,18,5);textbackground(4);clrscr();cout<<" search n.f.t";}
if(a==3){window(5,7,18,7);textbackground(4);clrscr();cout<<" del      n.f";}
if(a==4){window(5,9,18,9);textbackground(4);clrscr();cout<<" display  all";}
if(a==5){window(5,11,18,11);textbackground(4);clrscr();cout<<" chenge  pass";}
if(a==6){window(5,13,18,13);textbackground(4);clrscr();cout<<" tamas  ba ma";}
if(a==7){window(5,15,18,15);textbackground(4);clrscr();cout<<" exit";}
}
/*88888888888888888888888888888888888888888888888888888888888888 add 8888888*/
void add(void)
{
fp=fopen("asghar.dat","a+b");
window(4,20,79,23);textbackground(0);clrscr();
window(3,19,78,22);textbackground(5);clrscr();
cout<<" name         famile          tel              shahr             name pedar\n";
gotoxy(1,2);cout<<"----------------------------------------------------------------------------\n";
gotoxy(2,3);cin>>st.n;
gotoxy(15,3);cin>>st.f;
gotoxy(31,3);cin>>st.t;
gotoxy(48,3);cin>>st.a;
gotoxy(66,3);cin>>st.p;
for(i=0;i<strlen(st.n);i++)st.n[i]+=k;
for(i=0;i<strlen(st.f);i++)st.f[i]+=k;
for(i=0;i<strlen(st.a);i++)st.a[i]+=k;
for(i=0;i<strlen(st.t);i++)st.t[i]+=k;
for(i=0;i<strlen(st.p);i++)st.p[i]+=k;
fwrite(&st,sizeof(struct asghar),1,fp);
fclose(fp);
}
/*---------------------------------------------------search menu------------*/
void searchmenu(void)
{
menu();
window(20,5,21,5);textbackground(2);clrscr();
window(23,4,38,14);textbackground(0);clrscr();
window(22,3,37,13);textbackground(2);clrscr();
window(23,4,36,4);textbackground(5);clrscr();cout<<" search name";
window(23,6,36,6);textbackground(5);clrscr();cout<<" search famil";
window(23,8,36,8);textbackground(5);clrscr();cout<<" search tel";
window(23,10,36,10);textbackground(5);clrscr();cout<<" search shahr";
window(23,12,36,12);textbackground(5);clrscr();cout<<" search n,f";
}
/*---------------------------------------------------search harecat------------*/
void searchharecat(void)
{int aa;
if(aa==1){window(23,4,36,4);textbackground(4);clrscr();cout<<" search name";}
if(aa==2){window(23,6,36,6);textbackground(4);clrscr();cout<<" search famil";}
if(aa==3){window(23,8,36,8);textbackground(4);clrscr();cout<<" search tel";}
if(aa==4){window(23,10,36,10);textbackground(4);clrscr();cout<<" search shahr";}
if(aa==5){window(23,12,36,12);textbackground(4);clrscr();cout<<" search n,f";}
}
/*---------------------------------------------------search name------------*/
void searchname(void)
{
  char name[15];int yy=22,so=0,rr=15,rrr=0;
  window(40,6,63,9);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,1);cout<<"name ra vared konid : ";gotoxy(1,2);cout<<"------------------------";
  gotoxy(2,3);cin>>name;ii=1;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	do{
	   if(!strcmp(st.n,name))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(2);clrscr();
	     gotoxy(2,1);cout<<" name         famile          tel              shahr             name pedar";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	  }while(!feof(fp));if(so==0){window(45,12,63,16);textbackground(2);textcolor(4);clrscr();gotoxy(2,1);cout<<"sakhsi ba in name";gotoxy(4,2);cout<<"vojod nadarad";window(52,15,55,15);textbackground(4);textcolor(15);clrscr();cout<<" ok";}
     getch();fclose(fp);
}
/*---------------------------------------------------search famil------------*/
void searchfamil(void)
{
  char famil[15];int yy=22,so=0,rrr=0,rr=15;ii=1;
  window(40,6,63,9);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,1);cout<<"famil ra vared konid : ";gotoxy(1,2);cout<<"------------------------";
  gotoxy(2,3);cin>>famil;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	do{
	   if(!strcmp(st.f,famil))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(2);clrscr();
	     gotoxy(2,1);cout<<" name         famile          tel              shahr             name pedar";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	  }while(!feof(fp));if(so==0){window(45,12,64,16);textbackground(2);textcolor(4);clrscr();gotoxy(2,1);cout<<"sakhsi ba in famil";gotoxy(4,2);cout<<"vojod nadarad.";window(52,15,55,15);textbackground(4);textcolor(15);clrscr();cout<<" ok";}
     getch();fclose(fp);
}
/*---------------------------------------------------search tel------------*/
void searchtel(void)
{
  char tel[15];int yy=22,so=0,rrr=15,rr=0;ii=1;
  window(40,6,65,9);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,1);cout<<"shomare ra vared konid : ";gotoxy(1,2);cout<<"--------------------------";
  gotoxy(2,3);cin>>tel;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	do{
	   if(!strcmp(st.t,tel))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(2);clrscr();
	     gotoxy(2,1);cout<<" name         famile          tel              shahr             name pedar";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	  }while(!feof(fp));if(so==0){window(45,12,66,16);textbackground(2);textcolor(4);clrscr();gotoxy(2,1);cout<<"sakhsi ba in shomare";gotoxy(5,2);cout<<"vojod nadarad.";window(54,15,57,15);textbackground(4);textcolor(15);clrscr();cout<<" ok";}
     getch();fclose(fp);
}
/*---------------------------------------------------search enter------------*/
void searchshahr(void)
{
  char shahr[15];int yy=22,so=0,rrr=15,rr=0;ii=1;
  window(40,6,63,9);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,1);cout<<"shahr ra vared konid : ";gotoxy(1,2);cout<<"------------------------";
  gotoxy(2,3);cin>>shahr;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	do{
	   if(!strcmp(st.a,shahr))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(2);clrscr();
	     gotoxy(2,1);cout<<" name         famile          tel              shahr             name pedar";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	  }while(!feof(fp));if(so==0){window(45,12,65,16);textbackground(2);textcolor(4);clrscr();gotoxy(2,1);cout<<"sakhsi dar in shahr";gotoxy(4,2);cout<<"vojod nadarad.";window(53,15,56,15);textbackground(4);textcolor(15);clrscr();cout<<" ok";}
     getch();fclose(fp);
}
/*---------------------------------------------------search name famil------------*/
void searchnf(void)
{char name[15],famil[15];int yy=22,so=0,rrr=15,rr=0;ii=1;
  ff=fopen("asghardel.dat","w");
  fp=fopen("asghar.dat","a+b");rewind(fp);
  window(41,7,74,12);textbackground(0);clrscr();
  window(40,6,73,11);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,1);cout<<"name va famil ra vared konid : ";
  gotoxy(2,3);cout<<"name  : ";
  gotoxy(2,5);cout<<"famil : ";
  window(50,8,72,8);textbackground(5);clrscr();
  window(50,10,72,10);textbackground(5);clrscr();
  window(50,8,72,8);textbackground(5);textcolor(15);clrscr();gotoxy(2,1);cin>>name;
  window(50,10,72,10);textbackground(5);textcolor(15);clrscr();gotoxy(2,1);cin>>famil;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	do{
	    if(!strcmp(st.n,name))
	    if(!strcmp(st.f,famil))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(2);clrscr();
	     gotoxy(2,1);cout<<" name         famile          tel              shahr             name pedar";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
	  }while(!feof(fp));if(so==0){window(45,14,70,18);textbackground(2);textcolor(4);clrscr();gotoxy(2,1);cout<<"sakhsi ba in moshakhasat";gotoxy(6,2);cout<<"vojod nadarad.";window(56,17,59,17);textbackground(4);textcolor(15);clrscr();cout<<" ok";}
     getch();fclose(fp);
}
/*---------------------------------------------------search enter------------*/
void searchenter(int aa)
{
if(aa==1)searchname();
if(aa==2)searchfamil();
if(aa==3)searchtel();
if(aa==4)searchshahr();
if(aa==5)searchnf();
}
/*88888888888888888888888888888888888888888888888888888888888888 search 8888*/
void search(void)
{int aa=1;char cc;
while(cc!='9')
 {
    searchmenu();
    searchharecat();
    cc=getch();
    if(cc==0){cc=getch();
    if(cc==72){aa--;if(aa==0)aa=5;}
    if(cc==80){aa++;if(aa==6)aa=1;}
    if(cc==75)cc='9';
    if(cc==63)scrn();
    }
    if(cc==13)searchenter(aa);
 }
}
/*------------------------------------------------------del menu------------*/
void delmenu(void)
{
menu();
window(20,7,21,7);textbackground(2);clrscr();
window(23,6,35,16);textbackground(0);clrscr();
window(22,5,34,15);textbackground(2);clrscr();
window(23,6,33,6);textbackground(5);clrscr();cout<<" del name";
window(23,8,33,8);textbackground(5);clrscr();cout<<" del famil";
window(23,10,33,10);textbackground(5);clrscr();cout<<" del n,f";
window(23,12,33,12);textbackground(5);clrscr();cout<<" del shahr";
window(23,14,33,14);textbackground(5);clrscr();cout<<" del all";
}
/*----------------------------------------------------del harecat------------*/
void delharecat(void)
{int aa;
if(aa==1){window(23,6,33,6);textbackground(4);clrscr();cout<<" del name";}
if(aa==2){window(23,8,33,8);textbackground(4);clrscr();cout<<" del famil";}
if(aa==3){window(23,10,33,10);textbackground(4);clrscr();cout<<" del n,f";}
if(aa==4){window(23,12,33,12);textbackground(4);clrscr();cout<<" del shahr";}
if(aa==5){window(23,14,33,14);textbackground(4);clrscr();cout<<" del all";}
}
/*----------------------------------------------------del all---------------*/
void delall(void)
{
fp=fopen("asghar.dat","w");
fclose(fp);
}
/*------------------------------------------------------barasi----------------*/
int barai(void)
{int as=0;
fp=fopen("asghardel.dat","r");
fread(&st,sizeof(struct asghar),1,fp);
while(!feof(fp)){
as++;
fread(&st,sizeof(struct asghar),1,fp);
}
return as;
}
/*------------------------------------------------------hazf----------------*/
void hazf(void)
{int ba=0;
ba=barai();
if(ba!=0)
{
fp=fopen("asghar.dat","w");
ff=fopen("asghardel.dat","a+b");rewind(ff);
fread(&st,sizeof(struct asghar),1,ff);
do{
     for(i=0;i<strlen(st.n);i++)st.n[i]+=k;
     for(i=0;i<strlen(st.f);i++)st.f[i]+=k;
     for(i=0;i<strlen(st.a);i++)st.a[i]+=k;
     for(i=0;i<strlen(st.t);i++)st.t[i]+=k;
     for(i=0;i<strlen(st.p);i++)st.p[i]+=k;
fwrite(&st,sizeof(struct asghar),1,fp);
fread(&st,sizeof(struct asghar),1,ff);
}while(!feof(ff));
}
else delall();
fclose(fp);fclose(ff);ff=fopen("asghardel.dat","w");fclose(ff);
}
/*-----------------------------------------------------del name--------------*/
void delname(void)
{char name[15];int sw=0;
  ff=fopen("asghardel.dat","w");
  fp=fopen("asghar.dat","a+b");rewind(fp);
  window(40,6,63,9);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,1);cout<<"name ra vared konid : ";gotoxy(1,2);cout<<"------------------------";
  gotoxy(2,3);cin>>name;
     fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
    do{
    if(!strcmp(st.n,name));
       else
       {
       fwrite(&st,sizeof(struct asghar),1,ff);
       }
    fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
  }while(!feof(fp));
  fclose(fp);fclose(ff);
  hazf();
}
/*-----------------------------------------------------del famil--------------*/
void delfamil(void)
{char famil[20];
  ff=fopen("asghardel.dat","w");
  fp=fopen("asghar.dat","a+b");rewind(fp);
  window(40,6,63,9);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,1);cout<<"famil ra vared konid : ";gotoxy(1,2);cout<<"------------------------";
  gotoxy(2,3);cin>>famil;
     fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
    do{
    if(!strcmp(st.f,famil));
    else
       {
       fwrite(&st,sizeof(struct asghar),1,ff);
       }
    fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
  }while(!feof(fp));
  fclose(fp);fclose(ff);hazf();
}
/*-----------------------------------------------------del shahr--------------*/
void delshahr(void)
{char shahr[15];
  ff=fopen("asghardel.dat","w");
  fp=fopen("asghar.dat","a+b");rewind(fp);
  window(40,6,63,9);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,1);cout<<"name ra vared konid : ";gotoxy(1,2);cout<<"------------------------";
  gotoxy(2,3);cin>>shahr;
     fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
    do{
    if(!strcmp(st.a,shahr));
    else
       {
       fwrite(&st,sizeof(struct asghar),1,ff);
       }
    fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
  }while(!feof(fp));
  fclose(fp);fclose(ff);hazf();
}
/*-----------------------------------------------------del name va famil------*/
void delnf(void)
{char name[15],famil[15];int s=0;
  ff=fopen("asghardel.dat","w");
  fp=fopen("asghar.dat","a+b");rewind(fp);
  window(41,7,74,12);textbackground(0);clrscr();
  window(40,6,73,11);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,1);cout<<"name va famil ra vared konid : ";
  gotoxy(2,3);cout<<"name  : ";
  gotoxy(2,5);cout<<"famil : ";
  window(50,8,72,8);textbackground(5);clrscr();
  window(50,10,72,10);textbackground(5);clrscr();
  window(50,8,72,8);textbackground(5);textcolor(15);clrscr();gotoxy(2,1);cin>>name;
  window(50,10,72,10);textbackground(5);textcolor(15);clrscr();gotoxy(2,1);cin>>famil;
     fread(&st,sizeof(struct asghar),1,fp);
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
    do{
    if(!strcmp(st.n,name))
    if(!strcmp(st.f,famil))s=1;
    if(s==0)
       {
       fwrite(&st,sizeof(struct asghar),1,ff);
       }
    fread(&st,sizeof(struct asghar),1,fp);s=0;
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
  }while(!feof(fp));
  fclose(fp);fclose(ff);hazf();
}
/*----------------------------------------------------del enter-------------*/
void delenter(int aa)
{
if(aa==1)delname();
if(aa==2)delfamil();
if(aa==3)delnf();
if(aa==4)delshahr();
if(aa==5)delall();
}
/*88888888888888888888888888888888888888888888888888888888888888 del 8888888*/
void del(void)
{int aa=1;char cc;
while(cc!='9')
 {
    delmenu();
    delharecat();
    cc=getch();
    if(cc==0){cc=getch();
    if(cc==72){aa--;if(aa==0)aa=5;}
    if(cc==80){aa++;if(aa==6)aa=1;}
    if(cc==75){cc='9';}
    if(cc==63)scrn();
    }
    if(cc==13)delenter(aa);
 }
}
/*88888888888888888888888888888888888888888888888888888888888888 display 888*/
void display(void)
{int yy=5,rr=0,rrr=1;ii=1;
window(23,4,79,6);textbackground(0);clrscr();
window(22,3,78,5);textbackground(2);textcolor(4);clrscr();
gotoxy(5,1);cout<<"name         famile         tel           shahr";
gotoxy(1,2);cout<<"---------------------------------------------------------";
fp=fopen("asghar.dat","r");
rewind(fp);
fread(&st,sizeof(struct asghar),1,fp);
if(!feof(fp))
do{
window(23,yy,79,yy+1);textbackground(0);clrscr();
window(22,yy,78,yy);textbackground(2);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
   gotoxy(1,1);cout<<ii;
	     for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	     for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	     for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	     for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	     for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
  gotoxy(5,1);cout<<st.n;
  gotoxy(18,1);cout<<st.f;
  gotoxy(33,1);cout<<st.t;
  gotoxy(47,1);cout<<st.a;yy++;ii++;
     if(ii==19||ii==38||ii==57||ii==76||ii==95||ii==114||ii==133||ii==152||ii==171||ii==190||ii==209||ii==228||ii==247||ii==266||ii==285)
     {
      window(3,19,19,21);textbackground(2);textcolor(4);clrscr();gotoxy(1,1);cout<<" press any key";gotoxy(1,2);cout<<" to continue ... ";
      getch();yy=5;window(21,5,78,24);textbackground(1);clrscr();
      window(3,19,19,21);textbackground(1);clrscr();
     }
  fread(&st,sizeof(struct asghar),1,fp);
}while(!feof(fp));
getch();fclose(fp);
}
/*88888888888888888888888888888888888888888888888888888888888888 tamas 88888*/
void tamas(void)
{char b[14]="be name khoda",salam[42]="ba salam va khaste nabashid khedmate shoma",
sa[46]="in barname tavasote in janeb yani asghar.kohi",
as1[41]=" dar tarikh 1385.3.17 neveshte shode ast.",as2[36]="omid varam az barname razi bashid.",
as3[50]="dar har hal mitavanid nazare khod ra nesbat be",as4[37]="in barname be in Emile ersal konid :",
em1[28]="Email : asghar.kohi@yahoo.com";int har;
window(23,6,71,16);textbackground(0);clrscr();
window(22,5,70,15);textbackground(3);textcolor(0);clrscr();
gotoxy(17,1);
for(har=0;har<=13;har++)
	 {delay(150);cout<<b[har];}
  gotoxy(2,2);textcolor(4);
for(har=0;har<=42;har++)
	 {delay(150);cprintf("%c",salam[har]);}
  gotoxy(2,3);
for(har=0;har<=43;har++)
	 {delay(150);cprintf("%c",sa[har]);}
  gotoxy(2,4);
for(har=0;har<=40;har++)
	 {delay(150);cprintf("%c",as1[har]);}
  gotoxy(7,5);
for(har=0;har<=34;har++)
	 {delay(150);cprintf("%c",as2[har]);}
  gotoxy(2,7);
for(har=0;har<=45;har++)
	 {delay(150);cprintf("%c",as3[har]);}
  gotoxy(2,8);
for(har=0;har<=36;har++)
	 {delay(150);cprintf("%c",as4[har]);}
  gotoxy(2,10);
for(har=0;har<=27;har++)
	 {delay(150);cprintf("%c",em1[har]);}
getch();
}
/*88888888888888888888888888888888888888888888888888888888888888 pass 888888*/
void pass(void)
{char xx[25],zz[25],xx1[25],xx2[25];
ramz=fopen("system.sys","r");
window(26,6,51,13);textbackground(0);clrscr();
window(25,5,50,12);textbackground(2);textcolor(0);clrscr();
gotoxy(2,1);cout<<"password mojod  ";
gotoxy(2,4);cout<<"password jadid :";
gotoxy(2,6);cout<<"tekrare password :";
window(26,9,49,9);textbackground(5);clrscr();
window(26,11,49,11);textbackground(5);clrscr();
window(26,6,49,6);textbackground(5);textcolor(15);clrscr();
gotoxy(2,1);cin>>zz;
fread(&xx,sizeof(xx),1,ramz);
for(i=0;i<=25;i++)xx[i]-=10;
if(!strcmp(zz,xx))
  {
  window(26,9,49,9);textbackground(5);clrscr();gotoxy(2,1);cin>>xx1;if(strlen(xx1)<6){window(28,15,46,19);textbackground(2);clrscr();gotoxy(2,1);cout<<"tole password";gotoxy(2,2);cout<<"kamtar az 6 ast.";window(35,18,38,18);textbackground(4);clrscr();cout<<" ok";getch();}
  if(strlen(xx1)>=6){window(26,11,49,11);textbackground(5);clrscr();gotoxy(2,1);cin>>xx2;if(!strcmp(xx1,xx2)){window(30,16,37+strlen(xx2),16);textbackground(5);clrscr();cout<<" << "<<xx1<<" >> ";fclose(ramz);ramz=fopen("system.sys","w");for(i=0;i<=25;i++)xx2[i]+=10;fwrite(&xx2,sizeof(xx2),1,ramz);getch();}
	else{window(28,15,46,19);textbackground(2);clrscr();gotoxy(2,1);cout<<"tekrar password";gotoxy(2,2);cout<<"  eshtebah ast.";window(35,18,38,18);textbackground(4);clrscr();cout<<" ok";getch();}}
  }
else{window(28,15,46,19);textbackground(2);clrscr();gotoxy(2,1);cout<<"password eshtebah";gotoxy(8,2);cout<<"ast.";window(35,18,38,18);textbackground(4);clrscr();cout<<" ok";getch();}
fclose(ramz);
}
/*88888888888888888888888888888888888888888888888888888888888888 enter 88888*/
void enter(int a)
{
if(a==1)add();
if(a==2)search();
if(a==3)del();
if(a==4)display();
if(a==5)pass();
if(a==6)tamas();
}
/*88888888888888888888888888888888888888888888888888888888888888 exit 888888*/
void exit(void)
{int x,y=81;
window(1,1,1,1);textbackground(0);clrscr();
for(x=0;x<=80;x+=2)
{delay(100);
window(x,1,x,25);textbackground(0);clrscr();
window(y,1,y,25);textbackground(0);clrscr();y-=2;
}}
/*88888888888888888888888888888888888888888888888888888888888888 password 8888*/
int password(void)
{
  char xx[25],pass[25];int mo=0,ee;
  oo=fopen("system.sys","r");
  fread(&xx,sizeof(xx),1,oo);
  window(1,1,80,50);textbackground(0);clrscr();
  window(30,5,55,7);textbackground(1);clrscr();gotoxy(2,1);cout<<"password << asgharkohi >>";gotoxy(26,3);cout<<ttt;
  window(31,6,54,6);textbackground(5);clrscr();gotoxy(2,1);cin>>pass;ttt--;fclose(oo);
  for(ee=0;ee<=25;ee++)xx[ee]=xx[ee]-10;
  if(!strcmp(xx,pass)){return mo=5;fclose(oo);}
}
/*88888888888888888888888888888888888888888888888888888888888888 main() 8888*/
main()
{
int a=1,mo,tt=0;char c;
  for(tt=0;tt<3;tt++)
  {
  mo=password();
  if(mo==5)
  {
  tt=5;
      while(c!='5')
      {
	menu();
	haracat();
	c=getch();
	if(c==0)
	   {
	    c=getch();
	    if(c==72){a--;if(a==0)a=7;}
	    if(c==80){a++;if(a==8)a=1;}
	    if(c==77)
		{
		if(a==3)del();
		if(a==2)search();
		}
	    if(c==63)scrn();
	   }
	   if(c==13){if(a==7){exit();c='5';}enter(a);}
       }
    }
  }
}

 


نسخه فارسی این برنامه همراه سورس کد

 

صفحه مربوط به تنظیمات فارسی سپند :

 

صفحه مربوط به ثبت مشخصات :

 

صفحه مربوط به جستجو داده های ثبت شده :

 

نمایش نتیجه جستجو :

 

نمایش همه لیست :

 

صفحه مربوط به حذف داده های ثبت شده :

 

صفحه مربوط به دریافت مشخصات جهت ویرایش داده های ثبت شده :

 

صفحه مربوط جهت تائید اصلاح :

 

صفحه مربوط به ویرایش داده های ثبت شده :

 

صفحه مربوط به تغییر پسورد برنامه :

 

صفحه مربوط به اطلاعات برنامه :

 

سورس کد کامل نسخه فارسی این برنامه :

#includeconio.h
#includestdlib.h
#includedos.h
#includestring.h
#includestdio.h
#includeiostream.h

struct asghar{
char n[15],f[20],a[20],t[20],p[15];};
struct asghar st,st1;
FILE *fp,*ramz,*oo,*ff;
int ii=1,ttt=3,i,k=100,a1,a2,h=0;
char c;
/*88888888888888888888888888888888888888888888888888888888888888 scrn 888888*/
void scrn(void){
  char xx5[25],pass5[25];int man=0,qq=1;
  oo=fopen("system.sys","r");
  fread(&xx5,sizeof(xx5),1,oo);
  for(i=0;i<=25;i++)xx5[i]-=10;
  do{
	  fread(&xx5,sizeof(xx5),1,oo);
	  window(1,12,80,12);textbackground(0);clrscr();
	  window(45,1,45,25);textbackground(0);clrscr();
	  window(60,1,60,25);textbackground(0);clrscr();
	  window(40,11,65,13);textbackground(2);textcolor(0);clrscr();gotoxy(2,1);cout<<":¢‏÷î ¢¤گّ گ¤ ¢¤ّ¨•";gotoxy(26,3);cout<<qq;
	  window(41,12,64,12);textbackground(6);textcolor(15);clrscr();gotoxy(2,1);cin>>pass5;
	  if(!strcmp(xx5,pass5))man=5;qq++;
  }while(man!=5);
fclose(oo);
}
/*88888888888888888888888888888888888888888888888888888888888888 searchman 8888*/
void serchman(void){
	window(20,5,21,5);textbackground(2);clrscr();
	window(23,4,38,16);textbackground(0);clrscr();
	window(22,3,37,15);textbackground(2);clrscr();
}
void asleasle(void){
	window(1,1,80,25);textbackground(1);textcolor(15);clrscr();
	window(1,25,80,25);textbackground(7);clrscr();textcolor(4);clrscr();cout<<" F5 : ùںê¬ àê‘ںُ                                ¤—ّ‏•ُ‘î ù—ھ¤ üّ›ھ÷گ¢ üûّî ¤ç¬گ";
	window(5,3,20,17);textbackground(0);clrscr();textcolor(15);
	window(4,2,19,16);textbackground(2);textcolor(0);clrscr();gotoxy(16,4);cout<<"";gotoxy(16,6);cout<<"";textcolor(15);
}
/*-------------------------------------------------- exitcod ---------------*/
void pac(void){
	for(i=0;i<15;i++)st.n[i]=NULL;
	for(i=0;i<20;i++)st.f[i]=NULL;
	for(i=0;i<20;i++)st.a[i]=NULL;
	for(i=0;i<20;i++)st.t[i]=NULL;
	for(i=0;i<15;i++)st.p[i]=NULL;
}
/*-------------------------------------------------- exitcod ---------------*/
void exitcod(void){
	for(i=0;i<strlen(st.n);i++)st.n[i]-=k;
	for(i=0;i<strlen(st.f);i++)st.f[i]-=k;
	for(i=0;i<strlen(st.a);i++)st.a[i]-=k;
	for(i=0;i<strlen(st.t);i++)st.t[i]-=k;
	for(i=0;i<strlen(st.p);i++)st.p[i]-=k;
}
/*88888888888888888888888888888888888888888888888888888888888888 menu 88888*/
void menu(void){
	window(5,3,18,3);textbackground(5);clrscr();cout<<"   ِ¢¤î ùê‘®گ";
	window(5,5,18,5);textbackground(5);clrscr();cout<<"        ّ›—¨›";
	window(5,7,18,7);textbackground(5);clrscr();cout<<"          é£ں";
	window(5,9,18,9);textbackground(5);clrscr();cout<<"       ©‏گ¤‏ّ";
	window(5,11,18,11);textbackground(5);clrscr();cout<<"   ¢¤ّ¨•¤‏‏ç—";
	window(5,13,18,13);textbackground(5);clrscr();cout<<"   ُِ ‘“ §‘ُ—";
	window(5,15,18,15);textbackground(5);clrscr();cout<<"         ڑّ¤،";
}
/*88888888888888888888888888888888888888888888888888888888888888 harecat 88*/
void haracat(void){
	int a;
	if(a==1){window(5,3,18,3);textbackground(4);clrscr();cout<<"   ِ¢¤î ùê‘®گ";}
	if(a==2){window(5,5,18,5);textbackground(4);clrscr();cout<<"        ّ›—¨›";}
	if(a==3){window(5,7,18,7);textbackground(4);clrscr();cout<<"          é£ں";}
	if(a==4){window(5,9,18,9);textbackground(4);clrscr();cout<<"       ©‏گ¤‏ّ";}
	if(a==5){window(5,11,18,11);textbackground(4);clrscr();cout<<"   ¢¤ّ¨•¤‏‏ç—";}
	if(a==6){window(5,13,18,13);textbackground(4);clrscr();cout<<"   ُِ ‘“ §‘ُ—";}
	if(a==7){window(5,15,18,15);textbackground(4);clrscr();cout<<"         ڑّ¤،";}
}
/*88888888888888888888888888888888888888888888888888888888888888 add 8888888*/
void add(void){
	pac();
	fp=fopen("asghar.dat","a+b");
	window(4,20,79,23);textbackground(0);clrscr();
	window(3,19,78,22);textbackground(5);clrscr();
	cout<<" ô‘÷         üَ‏ُ‘ê          ِêَ—              ¤ْھ             ¤¢• ô‘÷\n";
	gotoxy(1,2);cout<<"----------------------------------------------------------------------------\n";
	gotoxy(2,3);cin>>st.n;
	gotoxy(15,3);cin>>st.f;
	gotoxy(31,3);cin>>st.t;
	gotoxy(48,3);cin>>st.a;
	gotoxy(66,3);cin>>st.p;
	for(i=0;i<strlen(st.n);i++)st.n[i]+=k;
	for(i=0;i<strlen(st.f);i++)st.f[i]+=k;
	for(i=0;i<strlen(st.a);i++)st.a[i]+=k;
	for(i=0;i<strlen(st.t);i++)st.t[i]+=k;
	for(i=0;i<strlen(st.p);i++)st.p[i]+=k;
	fwrite(&st,sizeof(struct asghar),1,fp);
	fclose(fp);
	asleasle();menu();
}
/*---------------------------------------------------search menu------------*/
void searchmenu(void){
	window(23,4,36,4);textbackground(5);clrscr();cout<<"          ô‘÷";
	window(23,6,36,6);textbackground(5);clrscr();cout<<"       üَ‏ُ‘ê";
	window(23,8,36,8);textbackground(5);clrscr();cout<<"   ِêَ— ù¤‘ُھ";
	window(23,10,36,10);textbackground(5);clrscr();cout<<"          ¤ْھ";
	window(23,12,36,12);textbackground(5);clrscr();cout<<"  üَ‏ُ‘êّ ô‘÷";
	window(23,14,36,14);textbackground(5);clrscr();cout<<"     ٌî ©‏‘ُ÷";
}
/*---------------------------------------------------search harecat------------*/
void searchharecat(void){
	int aa;
	if(aa==1){window(23,4,36,4);textbackground(4);clrscr();cout<<"          ô‘÷";}
	if(aa==2){window(23,6,36,6);textbackground(4);clrscr();cout<<"       üَ‏ُ‘ê";}
	if(aa==3){window(23,8,36,8);textbackground(4);clrscr();cout<<"   ِêَ— ù¤‘ُھ";}
	if(aa==4){window(23,10,36,10);textbackground(4);clrscr();cout<<"          ¤ْھ";}
	if(aa==5){window(23,12,36,12);textbackground(4);clrscr();cout<<"  üَ‏ُ‘êّ ô‘÷";}
	if(aa==6){window(23,14,36,14);textbackground(4);clrscr();cout<<"     ٌî ©‏‘ُ÷";}
}
/*------------------------------------------------------ kadre ------------*/
void kadre(void){
	window(46,7,69,10);textbackground(0);clrscr();
	window(45,6,68,9);textbackground(2);textcolor(0);clrscr();
}
/*------------------------------------------------------ kadre1 -----------*/
void kadre1(void){
	window(46,8,67,8);textbackground(6);textcolor(1);clrscr();
}
/*--------------------------------------------------- khatasearch ----------*/
void khatasearch(void){
	window(48,14,67,19);textbackground(0);clrscr();
	window(47,13,66,13);textbackground(6);textcolor(15);clrscr();cout<<"             !!!‘¯،";
	window(47,14,66,18);textbackground(2);clrscr();
	window(47,14,66,16);textbackground(2);textcolor(0);clrscr();
}
/*---------------------------------------------------search name------------*/
void searchname(void){
  char name[15];int yy=22,so=0,rr=0,rrr=15;
  kadre();
  gotoxy(2,1);cout<<": ¢‏÷î ¢¤گّ گ¤ ô‘÷ ";gotoxy(1,2);cout<<"------------------------";
  kadre1();
  gotoxy(2,1);cin>>name;ii=1;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
      exitcod();
	do{
	   if(!strcmp(st.n,name))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(15);clrscr();
	     gotoxy(2,1);cout<<"  ô‘÷        ü‏َ‏ُ‘ê          ِêَ—             ¤ْھ               ¤¢• ô‘÷";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	    exitcod();
	  }while(!feof(fp));if(so==0){khatasearch();cout<<"   ô‘÷ ِ‏گ‘“ ü¬،ھ";gotoxy(4,2);cout<<"  .¢¤گ¢÷ ¢ّ›ّ";window(55,17,59,17);textbackground(4);textcolor(15);clrscr();cout<<" ’ّ،";}
     getch();fclose(fp);
asleasle();menu();serchman();
}
/*---------------------------------------------------search famil------------*/
void searchfamil(void){
  char famil[15];int yy=22,so=0,rrr=15,rr=0;ii=1;
  kadre();
  gotoxy(2,1);cout<<": ¢‏÷î ¢¤گّ گ¤ üَ‏ُ‘ê";gotoxy(1,2);cout<<"------------------------";
  kadre1();gotoxy(2,1);cin>>famil;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
	exitcod();
	do{
	   if(!strcmp(st.f,famil))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(15);clrscr();
	     gotoxy(2,1);cout<<"  ô‘÷        ü‏َ‏ُ‘ê          ِêَ—             ¤ْھ               ¤¢• ô‘÷";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	    exitcod();
	  }while(!feof(fp));if(so==0){khatasearch();cout<<" üَ‏ُ‘ê ِ‏گ‘“ ü¬،ھ";gotoxy(4,2);cout<<" .¢¤گ¢÷ ¢ّ›ّ";window(55,17,59,17);textbackground(4);textcolor(15);clrscr();cout<<" ’ّ،";}
     getch();fclose(fp);
asleasle();menu();serchman();
}
/*---------------------------------------------------search tel------------*/
void searchtel(void){
  char tel[15];int yy=22,so=0,rrr=15,rr=0;ii=1;
  kadre();
  gotoxy(2,1);cout<<": ¢‏÷î ¢¤گّ گ¤ ِêَ—";gotoxy(1,2);cout<<"------------------------";
  kadre1();gotoxy(2,1);cin>>tel;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
	exitcod();
	do{
	   if(!strcmp(st.t,tel))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(15);clrscr();
	     gotoxy(2,1);cout<<"  ô‘÷        ü‏َ‏ُ‘ê          ِêَ—             ¤ْھ               ¤¢• ô‘÷";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	    exitcod();
	  }while(!feof(fp));if(so==0){khatasearch();cout<<"  ù¤‘ُھ ِ‏گ‘“ ü¬،ھ";gotoxy(5,2);cout<<" .¢¤گ¢÷ ¢ّ›ّ";window(55,17,59,17);textbackground(4);textcolor(15);clrscr();cout<<" ’ّ،";}
     getch();fclose(fp);
asleasle();menu();serchman();
}
/*---------------------------------------------------search enter------------*/
void searchshahr(void){
  char shahr[15];int yy=22,so=0,rrr=15,rr=0;ii=1;
  kadre();
  gotoxy(2,1);cout<<"    : ¢‏÷î ¢¤گّ گ¤ ¤ْھ";gotoxy(1,2);cout<<"------------------------";
  kadre1();gotoxy(2,1);cin>>shahr;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
	exitcod();
	do{
	   if(!strcmp(st.a,shahr))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(15);clrscr();
	     gotoxy(2,1);cout<<"  ô‘÷        ü‏َ‏ُ‘ê          ِêَ—             ¤ْھ               ¤¢• ô‘÷";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	    exitcod();
	  }while(!feof(fp));if(so==0){khatasearch();cout<<"  ¤ْھ ِ‏گ¤¢ ü¬،ھ";gotoxy(4,2);cout<<" .¢¤گ¢÷ ¢ّ›ّ";window(55,17,59,17);textbackground(4);textcolor(15);clrscr();cout<<" ’ّ،";}
     getch();fclose(fp);
asleasle();menu();serchman();
}
/*---------------------------------------------------search name famil------------*/
void searchnf(void){
char name[15],famil[15];int yy=22,so=0,rrr=15,rr=0;ii=1;
  ff=fopen("asghardel.dat","w");
  fp=fopen("asghar.dat","a+b");rewind(fp);
  window(41,7,74,12);textbackground(0);clrscr();
  window(40,6,73,6);textbackground(6);textcolor(15);clrscr();gotoxy(2,1);cout<<"      .¢‏÷î ¢¤گّ گ¤ üَ‏ُ‘ê ّ ô‘÷";
  window(40,7,73,11);textbackground(2);textcolor(0);clrscr();
  gotoxy(2,2);cout<<"    ô‘÷: ";
  gotoxy(2,4);cout<<"üَ‏ُ‘ê : ";
  window(50,8,72,8);textbackground(5);clrscr();
  window(50,10,72,10);textbackground(5);clrscr();
  window(50,8,72,8);textbackground(5);textcolor(15);clrscr();gotoxy(2,1);cin>>name;
  window(50,10,72,10);textbackground(5);textcolor(15);clrscr();gotoxy(2,1);cin>>famil;
  fp=fopen("asghar.dat","r");rewind(fp);
      fread(&st,sizeof(struct asghar),1,fp);
       exitcod();
	do{
	    if(!strcmp(st.n,name))
	    if(!strcmp(st.f,famil))
	    {
	     window(2,yy-1,79,yy);textbackground(0);clrscr();
	     window(2,yy-2,78,yy);textbackground(5);textcolor(15);clrscr();
	     gotoxy(2,1);cout<<"  ô‘÷        ü‏َ‏ُ‘ê          ِêَ—             ¤ْھ               ¤¢• ô‘÷";
	     gotoxy(1,2);cout<<"-----------------------------------------------------------------------------\n";
	     window(3,23,79,23);textbackground(0);clrscr();
	     window(2,yy,78,yy);textbackground(5);textcolor(15);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
	     gotoxy(1,1);cout<<ii;
	     gotoxy(3,1);cout<<st.n;
	     gotoxy(16,1);cout<<st.f;
	     gotoxy(32,1);cout<<st.t;
	     gotoxy(49,1);cout<<st.a;
	     gotoxy(67,1);cout<<st.p;yy--;so++;ii++;
	    }
	    fread(&st,sizeof(struct asghar),1,fp);
	    exitcod();
	  }while(!feof(fp));if(so==0){khatasearch();cout<<" –‘¬،ھُ ِ‏گ ‘“ ü¬،ھ";gotoxy(6,2);cout<<".¢¤گ¢÷ ¢ّ›ّ";window(55,17,59,17);textbackground(4);textcolor(15);clrscr();cout<<" ’ّ،";}
     getch();fclose(fp);
asleasle();menu();serchman();
}
/*88888888888888888888888888888888888888888888888888888888888888 display 888*/
void display(void){
int yy=5,rr=0,rrr=1;ii=1;
window(22,4,79,24);textbackground(1);clrscr();
window(23,4,79,6);textbackground(0);clrscr();
window(22,3,78,5);textbackground(2);textcolor(4);clrscr();
gotoxy(5,1);cout<<" ô‘÷         üَ‏ُ‘ê          ِêَ—         ¤ْھ";
gotoxy(1,2);cout<<"---------------------------------------------------------";
fp=fopen("asghar.dat","r");
rewind(fp);
fread(&st,sizeof(struct asghar),1,fp);
if(!feof(fp))
do{
window(23,yy,79,yy+1);textbackground(0);clrscr();
window(22,yy,78,yy);textbackground(2);textcolor(rr);clrscr();rrr=rr+rrr;rr=rrr-rr;rrr=rrr-rr;
   gotoxy(1,1);cout<<ii;
   exitcod();
  gotoxy(5,1);cout<<st.n;
  gotoxy(18,1);cout<<st.f;
  gotoxy(33,1);cout<<st.t;
  gotoxy(47,1);cout<<st.a;yy++;ii++;
     if(ii==19||ii==38||ii==57||ii==76||ii==95||ii==114||ii==133||ii==152||ii==171||ii==190||ii==209||ii==228||ii==247||ii==266||ii==285)
     {
      window(3,19,19,21);textbackground(2);textcolor(4);clrscr();gotoxy(1,1);cout<<" ...¢‏û¢ ¤‘ھêگ¤ ü¢‏َî ";
      getch();yy=5;window(21,5,78,24);textbackground(1);clrscr();
      window(3,19,19,21);textbackground(1);clrscr();
     }
  fread(&st,sizeof(struct asghar),1,fp);
}while(!feof(fp));
getch();fclose(fp);
asleasle();menu();serchman();
}
/*---------------------------------------------------search enter------------*/
void searchenter(int aa){
	if(aa==1)searchname();
	if(aa==2)searchfamil();
	if(aa==3)searchtel();
	if(aa==4)searchshahr();
	if(aa==5)searchnf();
	if(aa==6)display();
}
/*88888888888888888888888888888888888888888888888888888888888888 search 8888*/
void search(void)
{int aa=1;char cc;
serchman();
pac();
while(cc!='9'){
    searchmenu();
    searchharecat();
    cc=getch();
    if(cc==0){cc=getch();
    if(cc==72){aa--;if(aa==0)aa=6;}
    if(cc==80){aa++;if(aa==7)aa=1;}
    if(cc==75)cc='9';
    if(cc==63){scrn();asleasle();menu();serchman();}
    }
    if(cc==13)searchenter(aa);
 }
asleasle();menu();
}
/*---------------------------------------------------asleasledel -----------*/
void asleasledel(void){
	menu();
	window(20,7,21,7);textbackground(2);clrscr();
	window(23,6,35,16);textbackground(0);clrscr();
	window(22,5,34,15);textbackground(2);clrscr();
}
/*------------------------------------------------------  khata ------------*/
void khata(void){
	textcolor(15);
	window(43,14,68,18);textbackground(0);clrscr();
	window(42,13,67,13);textbackground(6);clrscr();
	gotoxy(16,1);cout<<"   !!! ‘¯،";textcolor(0);
	window(42,14,67,17);textbackground(2);clrscr();
	cout<<" ¢ھ÷ گ¢‏• ù¢ھ ù¢گ¢ –‘¬،ھُ";
	window(53,16,57,16);textbackground(4);textcolor(15);clrscr();cout<<" ’ّ،";
	getch();
	asleasle();menu();asleasledel();fclose(fp);fclose(ff);
}
/*------------------------------------------------------del menu------------*/
void delmenu(void){
	window(23,6,33,6);textbackground(5);clrscr();cout<<"       ô‘÷";
	window(23,8,33,8);textbackground(5);clrscr();cout<<"    üَ‏ُ‘ê";
	window(23,10,33,10);textbackground(5);clrscr();cout<<" ٌ‏ُ‘êّô‘÷";
	window(23,12,33,12);textbackground(5);clrscr();cout<<"       ¤ْھ";
	window(23,14,33,14);textbackground(5);clrscr();cout<<"    ٌî é£ں";
}
/*----------------------------------------------------del harecat------------*/
void delharecat(void){
	int aa;
	if(aa==1){window(23,6,33,6);textbackground(4);clrscr();cout<<"       ô‘÷";}
	if(aa==2){window(23,8,33,8);textbackground(4);clrscr();cout<<"    üَ‏ُ‘ê";}
	if(aa==3){window(23,10,33,10);textbackground(4);clrscr();cout<<" ٌ‏ُ‘êّô‘÷";}
	if(aa==4){window(23,12,33,12);textbackground(4);clrscr();cout<<"       ¤ْھ";}
	if(aa==5){window(23,14,33,14);textbackground(4);clrscr();cout<<"    ٌî é£ں";}
}
/*----------------------------------------------------del all---------------*/
void delall(void){
	window(38,11,76,15);textbackground(0);clrscr();
	textcolor(15);
	window(37,10,75,10);textbackground(6);clrscr();gotoxy(28,1);cout<<"!!!  ¤گ¢ھû";
	textcolor(0);window(37,11,75,14);textbackground(2);clrscr();
	cout<<"   Œ¢ّھ é£ں –‘ن‘َ¯گ ù‏َî ¢‏ûگّ، üُ ‘‏گ";
	textcolor(15);
	c=NULL;a1=1;
	while(c!=1)
	   {
	   window(45,13,50,13);textbackground(5);clrscr();cout<<" ùَ“";
	   window(60,13,65,13);textbackground(5);clrscr();cout<<" ¤‏،";
	   if(a1==1){window(45,13,50,13);textbackground(4);clrscr();cout<<" ùَ“";}
	   if(a1==2){window(60,13,65,13);textbackground(4);clrscr();cout<<" ¤‏،";}
	   c=getch();
	   if(c==13)
		  {
		  if(a1==2)c=1;
		  if(a1==1){fp=fopen("asghar.dat","w");fclose(fp);c=1;}
		  }
	   if(c==0)
		  {
		  c=getch();
		  if(c==75){a1++;if(a1==3)a1=1;}
		  if(c==77){a1--;if(a1==0)a1=2;}
		  }
	   }
	asleasle();menu();asleasledel();
}
/*------------------------------------------------------barasi----------------*/
int barai(void){
	int as=0;
	fp=fopen("asghardel.dat","r");
	fread(&st,sizeof(struct asghar),1,fp);
	while(!feof(fp)){
		as++;
		fread(&st,sizeof(struct asghar),1,fp);
	}
	return as;
}
/*------------------------------------------------------hazf----------------*/
void hazf(void)
{int ba=0;
ba=barai();
if(ba!=0)
{
fp=fopen("asghar.dat","w");
ff=fopen("asghardel.dat","a+b");rewind(ff);
fread(&st,sizeof(struct asghar),1,ff);
do{
     for(i=0;i<strlen(st.n);i++)st.n[i]+=k;
     for(i=0;i<strlen(st.f);i++)st.f[i]+=k;
     for(i=0;i<strlen(st.a);i++)st.a[i]+=k;
     for(i=0;i<strlen(st.t);i++)st.t[i]+=k;
     for(i=0;i<strlen(st.p);i++)st.p[i]+=k;
fwrite(&st,sizeof(struct asghar),1,fp);
fread(&st,sizeof(struct asghar),1,ff);
}while(!feof(ff));
}
else delall();
fclose(fp);fclose(ff);ff=fopen("asghardel.dat","w");fclose(ff);
pac();
}
/*-------------------------------------------------- hoshdar ---------------*/
int hoshdar(void)
{h=0;
window(38,14,76,18);textbackground(0);clrscr();
textcolor(15);
window(37,13,75,13);textbackground(6);clrscr();gotoxy(28,1);cout<<"!!!  ¤گ¢ھû";
textcolor(0);window(37,14,75,17);textbackground(2);clrscr();
cout<<"   Œ¢ّھ é£ں –‘ن‘َ¯گ ِ‏گ ¢‏ûگّ، üُ ‘‏گ";
textcolor(15);
c=NULL;a1=1;
while(c!=1)
   {
   window(45,16,50,16);textbackground(5);clrscr();cout<<" ùَ“";
   window(60,16,65,16);textbackground(5);clrscr();cout<<" ¤‏،";
   if(a1==1){window(45,16,50,16);textbackground(4);clrscr();cout<<" ùَ“";}
   if(a1==2){window(60,16,65,16);textbackground(4);clrscr();cout<<" ¤‏،";}
   c=getch();
   if(c==13)
      {
      if(a1==2){h=2;c=1;}
      if(a1==1){h=1;c=1;}
      }
   if(c==0)
      {
      c=getch();
      if(c==75){a1++;if(a1==3)a1=1;}
      if(c==77){a1--;if(a1==0)a1=2;}
      }
   }
return h;
asleasle();menu();asleasledel();
}
/*-------------------------------------------------- hoshdaredit -----------*/
int hoshdaredit(void)
{h=0;
window(38,11,76,15);textbackground(0);clrscr();
textcolor(4);
window(37,10,75,10);textbackground(6);clrscr();gotoxy(28,1);cout<<"!!!  ¤گ¢ھû";
textcolor(0);window(37,11,75,14);textbackground(2);clrscr();
cout<<"  Œ¢ّھ ©‏گ¤‏ّ –‘ن‘َ¯گ ِ‏گ ¢‏ûگّ، üُ ‘‏گ";
textcolor(15);
c=NULL;a1=1;
while(c!=1)
   {
   window(45,13,50,13);textbackground(5);clrscr();cout<<" ùَ“";
   window(60,13,65,13);textbackground(5);clrscr();cout<<" ¤‏،";
   if(a1==1){window(45,13,50,13);textbackground(4);clrscr();cout<<" ùَ“";}
   if(a1==2){window(60,13,65,13);textbackground(4);clrscr();cout<<" ¤‏،";}
   c=getch();
   if(c==13)
      {
      if(a1==2){h=2;c=1;}
      if(a1==1){h=1;c=1;}
      }
   if(c==0)
      {
      c=getch();
      if(c==75){a1++;if(a1==3)a1=1;}
      if(c==77){a1--;if(a1==0)a1=2;}
      }
   }
return h;
asleasle();menu();asleasledel();
}
/*-----------------------------------------------------del name--------------*/
void delname(void)
{char name[15];a2=0;
  ff=fopen("asghardel.dat","w");
  fp=fopen("asghar.dat","a+b");rewind(fp);
  kadre();
  gotoxy(2,1);cout<<" : ¢‏÷î ¢¤گّ گ¤ ô‘÷ ";gotoxy(1,2);cout<<"------------------------";
  kadre1();gotoxy(2,1);cin>>name;

    fread(&st,sizeof(struct asghar),1,fp);
    exitcod();
    do{
    if(!strcmp(st.n,name))a2++;
    fread(&st,sizeof(struct asghar),1,fp);
    exitcod();
    }while(!feof(fp));
    if(a2!=0)
    h=hoshdar();
    if(h==1)
    {
       rewind(fp);
       fread(&st,sizeof(struct asghar),1,fp);
       exitcod();
       do{
       if(!strcmp(st.n,name));
       else
	 {
	 fwrite(&st,sizeof(struct asghar),1,ff);
	 }
       fread(&st,sizeof(struct asghar),1,fp);
       exitcod();
      }while(!feof(fp));
      fclose(fp);fclose(ff);
      hazf();
    }
if(a2==0)khata();
asleasle();menu();asleasledel();
}
/*-----------------------------------------------------del famil--------------*/
void delfamil(void)
{char famil[20];
  ff=fopen("asghardel.dat","w");
  fp=fopen("asghar.dat","a+b");rewind(fp);
  kadre();
  gotoxy(2,1);cout<<" : ¢‏÷î ¢¤گّ گ¤ üَ‏ُ‘ê";gotoxy(1,2);cout<<"------------------------";
  kadre1();gotoxy(2,1);cin>>famil;
     a2=0;

    fread(&st,sizeof(struct asghar),1,fp);exitcod();
    do{
    if(!strcmp(st.f,famil))a2++;
    fread(&st,sizeof(struct asghar),1,fp);
    exitcod();
    }while(!feof(fp));
    if(a2!=0)
    h=hoshdar();
    if(h==1)
    {  rewind(fp);
       fread(&st,sizeof(struct asghar),1,fp);exitcod();
       do{
       if(!strcmp(st.f,famil));
	 else
	  {
	   fwrite(&st,sizeof(struct asghar),1,ff);
	  }
       fread(&st,sizeof(struct asghar),1,fp);
       exitcod();
     }while(!feof(fp));
  fclose(fp);fclose(ff);hazf();
  }
if(a2==0)khata();
asleasle();menu();asleasledel();
}
/*-----------------------------------------------------del shahr--------------*/
void delshahr(void)
{char shahr[15];
  ff=fopen("asghardel.dat","w");
  fp=fopen("asghar.dat","a+b");rewind(fp);
  kadre();gotoxy(2,1);cout<<" : ¢‏÷î ¢¤گّ گ¤ ¤ْھ";gotoxy(1,2);cout<<"------------------------";
  kadre1();gotoxy(2,1);cin>>shahr;a2=0;
     fread(&st,sizeof(struct asghar),1,fp);exitcod();
    do{
      if(!strcmp(st.a,shahr))a2++;
      fread(&st,sizeof(struct asghar),1,fp);
      exitcod();
     }while(!feof(fp));
     if(a2!=0)
     h=hoshdar();
     if(h==1)
     {
       rewind(fp);
       fread(&st,sizeof(struct asghar),1,fp);exitcod();
       do{
       if(!strcmp(st.a,shahr));
       else
	{
	fwrite(&st,sizeof(struct asghar),1,ff);
	}
    fread(&st,sizeof(struct asghar),1,fp);
    exitcod();
  }while(!feof(fp));
  fclose(fp);fclose(ff);hazf();
 }
if(a2==0)khata();
asleasle();menu();asleasledel();
}