C Project

Library Management System

Originally Programmed by Bijay Kumar Chaurasiya
Platform: C Language    |   Compatible: Windows XP only
For presentation and final report leave your email address below in comment Box.


Original CODE- Compiled in Turbo C Compiler


----------------------------------------------------------------------------------------------------------------------------------


#include"stdio.h"
#include"conio.h"
#include"stdlib.h"
#include"graphics.h"
#include"dos.h"

#include"string.h"
struct time now;
struct date today;
int i,j,l=3,values,num;
char ch='k',choice,id[10];
char a,c,*p;
char user,username[20],pass,password[20],terminate[1]="e";

FILE *bookrecord,*membersrecord,*settings,*ft;
long int recsizes,recsizeb,recsizem;

typedef struct book
{
char stat[10];
char book[50];
char id[10];
char author[50];
char publication[50];
char price[5];
char index[5];
}book;
book b;
typedef struct members
{
char name[50];
char id[10];
char batch[10];
char faculty[20];
char sem[10];
char address[30];
char contact[14];
}members;
members m;
typedef struct setting
{
char oname[50];
char add[30];
char ph[14];
char estd[5];
char web[30];
char user[15];
char pass[15];
char repass[15];
}setting;
setting s;

int main(void)
{
int ch,f;
clrscr();
textmode(64);
textcolor(BLACK);
settings=fopen("settings.DAT","rb+");
bookrecord=fopen("bookrecord.DAT","rb+");
membersrecord=fopen("membersrecord.DAT","rb+");
if(bookrecord==NULL)
{
bookrecord=fopen( "bookrecord.DAT","wb+");
if(bookrecord==NULL)
 {
 cprintf("Can't Open File");
 }
}
if(membersrecord==NULL)
{
membersrecord=fopen( "membersrecord.DAT","wb+");
if(membersrecord==NULL)
 {
 cprintf("Can't Open File");
 }
}
if(settings==NULL)
{
settings=fopen( "settings.DAT","wb+");
f=1;
if(settings==NULL)
 {
 cprintf("Can't Open File");
 }
}

recsizes=sizeof(s);
recsizeb=sizeof(b);
recsizem=sizeof(m);
if(f==1)
{
seetings();
help();
}
fpassword();

c1:
mainscreen();
while(1)
{
choice=choice2();
switch(choice)
{
case 'b':
clrscr();
mainscreen();
bcolor();
bookarea();
break;
case 'm':
clrscr();
mainscreen();
mcolor();
memberarea();
break;
case 'i':
border();
bookissue();
break;
case 'l':
clrscr();
main();
break;
case 'r': //return book
mainscreen();
mcolor();
bookreturn();
break;
case 'h':
help();
mainscreen();
break;
case 'c':
exit(0);
default:
{
gotoxy(51,47);
cprintf("Invalid Choice!!");        //Invalid Delay
delay(500);
goto c1;
}
}    //1...switch closed
}   //while closed
}      //main end

bookissue()          //issue book
{
char bid[10],mid[10]; int total=0,flag=0,i,searchnum=0;
clrscr();
border();
textcolor(BLACK);textbackground(CYAN);
rewind(membersrecord);
rewind(bookrecord);
gotoxy(35,8);cprintf("BOOK ISSUE");
gotoxy(35,9);cprintf("==========");

gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:

gotoxy(10,15);cprintf("      ID:");gotoxy(30,15);cprintf("   Name:");
gotoxy(10,16);cprintf("   Batch:");gotoxy(30,16);cprintf("Faculty:");
gotoxy(10,17);cprintf("Address:");
gotoxy(10,18);cprintf(" Contact:");
gotoxy(10,20);cprintf("Issued Books are...");
gotoxy(5,22);
cprintf(" SN|    ID    |             NAME             |       AUTHOR       |INDEX|");
gotoxy(5,23);
cprintf("---+----------+------------------------------+--------------------+-----+");
gotoxy(10,12);
cprintf("Enter the Member ID: ");
i: gotoxy(32,12);
fflush(stdin);
flushall();
gets(mid);
if(strlen(mid)<8 || strlen(mid)>8)
{
goto i;
}
while(fread(&m,recsizem,1,membersrecord)==1)
{
if(strcmp(m.id,mid)==0)
{
flag=1;
gotoxy(20,15);cprintf("%-10.8s",m.id);gotoxy(39,15);cprintf("%-35.33s",m.name);
gotoxy(20,16);cprintf("%-10.8s",m.batch);gotoxy(39,16);cprintf("%-35.33s",m.faculty);
gotoxy(20,17);cprintf("%-35.33s",m.address);
gotoxy(20,18);cprintf("%-20.15s",m.contact);
}
}
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.stat,mid)==0)
{
total++;
gotoxy(5,23+total);
cprintf(" %d)|%-10.8s|%-30.28s|%-20.18s|%-5.3s|",total,b.id,b.book,b.author,b.index);
searchnum++;
if(searchnum==8)    //book issue limit=8
{
gotoxy(15,40);cprintf("sorry 8 books has been allready issued!!!");
flag=5;
}
}
}
if(flag!=5) //book issue limit
{
if(flag==0)
{
gotoxy(10,40);
cprintf("Record not found\a");
goto e;
}
addmore:
gotoxy(10,36);
cprintf("Enter the Book ID: ");
i1: gotoxy(29,36);
fflush(stdin);
flushall();
gets(bid);
if(strlen(bid)<8 || strlen(bid)>8)
{
goto i1;
}
rewind(bookrecord);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.id,bid)==0)   //compare book id in the book record
{
flag=2;
if(strlen(b.stat)<=1)  //compare string for issued or not
{                      //not issued
gotoxy(10,38);
cprintf("Enter Student ID again: ");
fflush(stdin);
flushall();
gets(b.stat);   //modify record
if(strcmp(b.stat,mid)==0)  //again member id match or not
{                          //if yes
fseek(bookrecord,-recsizeb,SEEK_CUR);
fwrite(&b,recsizeb,1,bookrecord);
gotoxy(10,40);   total=0;
cprintf("%s - %s book has been successfully issued to %s ",bid,b.book,mid);
}
else {gotoxy(10,40);cprintf("Member ID mismatched\a");}
}
else {gotoxy(10,40);cprintf("Sorry, %s book has been allready Issued\a",bid);}
}
}                        rewind(bookrecord);total=0;
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.stat,mid)==0)
{
total++;
gotoxy(5,23+total);
cprintf(" %d)|%-10.8s|%-30.28s|%-20.18s|%-5.3s|",total,b.id,b.book,b.author,b.index);
}
}
if(flag!=2)  //book not in the record
{
gotoxy(10,40);
cprintf("Record not found\a");
}
gotoxy(30,42);cprintf("Want to issue more books?");
rrepeat:
gotoxy(35,43);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
goto pprocessed;
}
else if(ch==13 || ch==121 || ch==32)
{
goto addmore;
}
else{goto rrepeat;}
e:
}
pprocessed:
end:
if(flag==10)
{
clrscr();mainscreen();
}
mainscreen();
return;
}              //end book issue function

bookreturn()  //Book return function oprning
{
char bid[10]; int flag=0;
clrscr();
border();
textcolor(BLACK);textbackground(CYAN);
gotoxy(35,8);cprintf("BOOK RETURN");
gotoxy(35,9);cprintf("===========");
gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:
gotoxy(10,13);cprintf("      ID:");gotoxy(30,13);cprintf("   Name:");
gotoxy(10,14);cprintf("   Batch:");gotoxy(30,14);cprintf("Faculty:");
gotoxy(10,15);cprintf(" Address:");
gotoxy(10,16);cprintf(" Contact:");
gotoxy(10,11);
cprintf("Enter the Book ID: ");
i1: gotoxy(29,11);
fflush(stdin);
flushall();
gets(bid);
rewind(bookrecord);
rewind(membersrecord);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.id,bid)==0)
{
flag=1;
while(fread(&m,recsizem,1,membersrecord)==1)
{
if(strcmp(m.id,b.stat)==0)
{
gotoxy(20,13);cprintf("%s",m.id);gotoxy(39,13);cprintf("%s",m.name);
gotoxy(20,14);cprintf("%s",m.batch);gotoxy(39,14);cprintf("%s",m.contact);
gotoxy(20,15);cprintf("%s",m.address);
gotoxy(20,16);cprintf("%s",m.contact);
}
}
s:
gotoxy(10,30);
gotoxy(27,30);cprintf("                                          ");
gotoxy(10,30);
cprintf("Static");gotoxy(27,30);fflush(stdin);flushall();gets(b.stat);
if(strlen(b.stat)>1 || strlen(b.stat)<1)
{
gotoxy(30,30);cprintf("Static should be any one character");
delay(1000);
goto s;
}
fseek(bookrecord,-recsizeb,SEEK_CUR);
fwrite(&b,recsizeb,1,bookrecord);
} //if close
else flag=2;
}//while close

end:
if(flag==10)
{
clrscr();mainscreen();
}
if(flag==1)
{
gotoxy(20,35);cprintf("Book id %s is Returned Successfully",bid);
}
if(flag==2)
{
gotoxy(20,35);cprintf("Sorry book is not in the record...");
}
return;
}

bookadd()        //function book Add
{
char bid[10];int flag=0;
textcolor(BLACK);textbackground(CYAN);
gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:

rewind(bookrecord);
fseek(bookrecord,0,SEEK_END);

s:
gotoxy(10,18);
cprintf("Static");gotoxy(27,18);fflush(stdin);flushall();gets(b.stat);
if(strlen(b.stat)>1 || strlen(b.stat)<1)
{
gotoxy(30,18);cprintf("Static should be any one character");
goto s;
}

i:
flag=0;
gotoxy(27,20);fflush(stdin);flushall();gets(bid);
if(strlen(bid)<8 || strlen(bid)>8)
{
goto i;
}
rewind(bookrecord);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.id,bid)==0)
{
flag=1;
gotoxy(50,20);
textcolor(BLACK);textbackground(CYAN);
cprintf("\xDB                           ");
gotoxy(50,20);
textcolor(RED);
cprintf("\xDB %s id allready exist\a",bid);
goto i;
}
if(flag!=1)
{
gotoxy(50,20);
textcolor(BLACK);textbackground(CYAN);
cprintf("\xDB                           ");
gotoxy(50,20);textcolor(RED);
cprintf("\xDB re-enter ID");}
}

i11:
textcolor(BLACK);textbackground(CYAN);
gotoxy(27,20);fflush(stdin);flushall();gets(b.id);
if(strlen(b.id)<8 || strlen(b.id)>8)
{goto i11;}
if(strcmp(bid,b.id)==0)
{
goto b;
}
else
{
gotoxy(50,20);textbackground(CYAN);
cprintf("\xDB                            ");
textcolor(RED);gotoxy(50,20);
cprintf("\xDB id mismatched",bid);
goto i;
}
b:
gotoxy(50,20);textcolor(RED);
cprintf("\xDB ID is available");
gotoxy(26,20);cprintf("%c",127);
gotoxy(27,22);fflush(stdin);flushall();gets(b.book);

c:
gotoxy(26,22);cprintf("%c",127);
gotoxy(27,24);fflush(stdin);flushall();gets(b.author);

d:
gotoxy(26,24);cprintf("%c",127);
gotoxy(27,26);fflush(stdin);flushall();gets(b.publication);

f:
gotoxy(26,26);cprintf("%c",127);
gotoxy(27,28);fflush(stdin);flushall();gets(b.price);

g:
gotoxy(26,28);cprintf("%c",127);
gotoxy(27,30);fflush(stdin);flushall();gets(b.index);
gotoxy(26,30);textcolor(BLUE);cprintf("%c",127);

gotoxy(40,36);cprintf("Done!!!");
fwrite(&b,recsizeb,1,bookrecord);

end:
if(flag==10)
{
clrscr();
mainscreen();
bcolor();
bookarea();
}
return;

}

deletebook()
{
char bid[10];  int flag;
clrscr();
border();
textcolor(BLACK);textbackground(CYAN);
gotoxy(37,8);
cprintf("DELETE BOOK");
gotoxy(37,9);
cprintf("===========");
gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:
gotoxy(10,15);
cprintf("Enter the Book ID: ");
i1: gotoxy(29,15);
fflush(stdin);
flushall();
gets(bid);
if(strlen(bid)<8 || strlen(bid)>8)
{
goto i1;
}
rewind(bookrecord);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strlen(b.stat)>1)
{
flag=2;
goto end;
}
else if(strcmp(b.id,bid)==0)
{
flag=0;
}
}

if(flag==0)
{
gotoxy(30,23);
textcolor(RED);textbackground(GREEN);
cprintf("Are you sure to delete?");
gotoxy(20,24);cprintf("'Enter' to delete or press 'Esc' to escape");

del:
gotoxy(40,27);
fflush(stdin);
flushall();
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==13)
{
ft=fopen("temp.DAT","wb");
rewind(bookrecord);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.id,bid)!=0)
{
fwrite(&b,recsizeb,1,ft);
}}
fclose(bookrecord);
fclose(ft);
remove("bookrecord.DAT");
rename("temp.DAT","bookrecord.DAT");
bookrecord=fopen("bookrecord.DAT","rb+");
gotoxy(25,30);
cprintf("Book has been deleted successfully...",bid);
}
else if(ch==27)
{
gotoxy(30,30);
cprintf("Deleting process escaped",bid);
}
else
{
cprintf("\a");
goto del;
}
}
if(flag!=0)
{
gotoxy(30,30);
cprintf("%s record not found!!!",bid);
}
end:
if(flag==10)
{
clrscr();
mainscreen();
bcolor();
bookarea();
}
if(flag==2)
{
gotoxy(30,23);
textcolor(RED);
cprintf("Sorry this book is issued.");
gotoxy(27,24);cprintf("Please Deposit before Delete.");
}
return;
}

searchbook()
{
char bid[10],status[15];int flag=0,searchnum=0;
clrscr();
border();
textcolor(BLACK);textbackground(CYAN);
gotoxy(37,8);
cprintf("SEARCH BOOK");
gotoxy(37,9);
cprintf("===========");
gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:
gotoxy(18,12);
cprintf("Search the Book by | ID | Name | Author | Index");
gotoxy(18,13);
cprintf("===================+====+======+========+======");
i1: gotoxy(18,15);
fflush(stdin);
flushall();
gets(bid);
rewind(bookrecord);
textbackground(CYAN);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.id,bid)==0)
 {
 flag=1;
 textcolor(RED);
 gotoxy(12,22);cprintf("ID: %s",b.id);
 gotoxy(12,24);cprintf("Name: %s",b.book);
 gotoxy(12,26);cprintf("Author: %s",b.author);
 gotoxy(12,28);cprintf("Publication: %s",b.publication);
 gotoxy(12,30);cprintf("Price: %s",b.price);
 gotoxy(12,32);cprintf("Index: %s",b.index);
 if(strlen(b.stat)>1)
  {
  gotoxy(12,34);cprintf("Status: Book is issued to Member ID: %s",b.stat);
  }
 else {gotoxy(12,34);cprintf("Status: Book is not issued\a");}
 } //end id if

 else if(strcmp(b.book,bid)==0)
 {
 flag=1;
 searchnum++;
   gotoxy(9,17);
   cprintf("|   ID     |             AUTHOR           | INDEX |  STATUS  |");
   gotoxy(9,18);
   cprintf("|----------+------------------------------+-------+----------|");
   if(strlen(b.stat)>1)
   {
   strcpy(status,"Issued");
   }
   else {strcpy(status,"Not Issued");}
   gotoxy(9,18+searchnum);
   cprintf("|%-10.8s|%-30.28s|%-4.3s   |%-10.9s|",b.id,b.author,b.index,status);
 }  //end book if




 else if(strcmp(b.author,bid)==0)
 {
 flag=1;
  searchnum++;
   gotoxy(9,17);
   cprintf("|   ID     |              BOOK            | INDEX |  STATUS  |");
   gotoxy(9,18);
   cprintf("|----------+------------------------------+-------+----------|");
   if(strlen(b.stat)>1)
   {
   strcpy(status,"Issued");
   }
   else {strcpy(status,"Not Issued");}
   gotoxy(9,18+searchnum);
   cprintf("|%-10.8s|%-30.28s|%-4.3s   |%-10.9s|",b.id,b.book,b.index,status);
 } //end author if

  else if(strcmp(b.index,bid)==0)
 {
 flag=1;
  searchnum++;
   gotoxy(9,17);
   cprintf("|   ID     |              BOOK            | PRICE |  STATUS  |");
   gotoxy(9,18);
   cprintf("|----------+------------------------------+-------+----------|");
   if(strlen(b.stat)>1)
   {
   strcpy(status,"Issued");
   }
   else {strcpy(status,"Not Issued");}
   gotoxy(9,18+searchnum);
   cprintf("|%-10.8s|%-30.28s|%-4.3s   |%-10.9s|",b.id,b.book,b.price,status);
 } //end author if

} //end while
if(flag!=1)
{
gotoxy(30,30);cprintf("%s not found in the record!!!\a",bid);
}
end:
{
clrscr();
mainscreen();
bcolor();
bookarea();
}
return;
}

bookmodify()
{
char bid[10];int flag=0;
clrscr();
border();
bookbox();
textcolor(BLACK);textbackground(CYAN);
rewind(bookrecord);
gotoxy(37,8);
cprintf("BOOK MODIFY");
gotoxy(37,9);
cprintf("===========");
gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:
gotoxy(10,15);
cprintf("Enter the Book ID: ");
i1: gotoxy(29,15);
fflush(stdin);
flushall();
gets(bid);
if(strlen(bid)<8 || strlen(bid)>8)
{
goto i1;
}
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.id,bid)==0)
{
if(strlen(b.stat)>1)
{
flag=1;
gotoxy(10,40);
cprintf("Sorry this book id is issued. Please deposit before modify\a");
}
}
}//while close


if(flag==0)
{
ft=fopen("temp.DAT","wb");
rewind(bookrecord);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.id,bid)!=0)
fwrite(&b,recsizeb,1,ft);
}
fclose(bookrecord);
fclose(ft);
remove("bookrecord.DAT");
rename("temp.DAT","bookrecord.DAT");
bookrecord=fopen("bookrecord.DAT","rb+");
bookadd();
}
end:
if(flag==10)
{
clrscr();
mainscreen();
bcolor();
bookarea();
}
return;
}

viewbookrecord()
{
int i,j,vj,k,flag=0,n=0;
clrscr();
border();  i=0;j=0;vj=0;
rewind(bookrecord);
textcolor(BLACK);textbackground(CYAN);
gotoxy(35,8);cprintf("BOOKS RECORD");
gotoxy(35,9);cprintf("============");
gotoxy(5,11);cprintf("    ID   |           NAME          |         AUTHOR         |PRICE|INDEX");
gotoxy(5,12);cprintf("---------+-------------------------+------------------------+-----+-----");
while(fread(&b,recsizeb,1,bookrecord)==1)
{
j++;
vj=j;
}
rewind(bookrecord);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
i++;
k=i;
vj--;
gotoxy(5,12+k);
cprintf("%-9.8s|%-25.24s|%-24.24s|%-5.4s|%-5.4s",b.id,b.book,b.author,b.price,b.index);
if(vj==0)
{
flag=2;
}
gotoxy(27,44);cprintf("(%d) record remaining out of (%d)",vj,j);
gotoxy(10,45);cprintf("Press enter/space to View more records or Esc/Backspace to Skip");
if(k==28)
{
i=0;
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{ goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto re;
}
}
re:
for(n=7;n<12;n++)  //search result background
{
textbackground(CYAN);
gotoxy(5,n);
cprintf("                                                                          ");
}
}
if(flag==2)
{
gotoxy(32,43);cprintf("Record Finished!!!");
}
end:
getch();
mainscreen();
bcolor();
return;
}

bookarea()
{
int fl,flag,i,j,k;
char bid[10],bid1[10],bid2[10],a[30];
c1:

while(1)
{
choice=choice2();
switch(choice)   //book options
{
case 'a':                   //add
clrscr();
border();
bookbox();
textcolor(BLACK);textbackground(CYAN);
gotoxy(35,8);cprintf("ADD BOOK");
gotoxy(35,9);cprintf("========");
bookadd();
break;

case 'v':
viewbookrecord();
break;
case 'e':
bookmodify();
break;

case 'd':
deletebook();
break;

case 's':
searchbook();
break;


case 'i':     //issue
clrscr();
mainscreen();
mcolor();
bookissue();
bcolor();
break;

case 'm':    //member area
clrscr();
mainscreen();
mcolor();
memberarea();
break;
case 'r': //return book
clrscr();
bookreturn();
bcolor();
break;
case 'l':      //logout
clrscr();
main();
break;
case 'h':
help();
clrscr();
mainscreen();
bcolor();
break;
case 'c':
exit(0);
default:
{
gotoxy(51,47);
cprintf("Invalid Choice!!\a");        //Invalid Delay
delay(500);
goto c1;
}
}    //book switch closed
}    // while close
}

memberarea()         //members details...
{
c1:
while(1)
{
choice=choice2();
switch(choice)   //members options
{
case 'a':                   //add
clrscr();
border();
memberbox();
textcolor(BLACK);textbackground(CYAN);
gotoxy(27,32);
textbackground(CYAN);
cprintf("                                    ");
gotoxy(35,8);cprintf("ADD MEMBER");
gotoxy(35,9);cprintf("==========");
memberadd();
break;
case 'v':
viewmemberrecord();
break;
case 'b':
mainscreen();
bcolor();
bookarea();
break;
case 's':
searchmember();
break;

case 'd':
deletemember();
break;

case 'e':
membermodify();
break;
case 'i':     //issue
mainscreen();
mcolor();
bookissue();
mcolor();
break;
case 'r': //return book
clrscr();
bookreturn();
mcolor();
break;
case 'l':      //logout
clrscr();
main();
break;
case 'h':

help();
mainscreen();
mcolor();
break;

case 'c':
exit(0);
default:
{
gotoxy(51,47);
cprintf("Invalid Choice!!\a");        //Invalid Delay
delay(500);
goto c1;
}
}    //member switch closed
}    // while closed
}     //member area closed
viewmemberrecord()
{
int vj,j,i,k=0,flag=0;
clrscr();
border();  i=0;j=0;vj=0;
rewind(membersrecord);
textcolor(BLACK);textbackground(CYAN);
gotoxy(35,8);cprintf("MEMBERS RECORD");
gotoxy(35,9);cprintf("==============");
gotoxy(5,11);cprintf("|    ID   |           NAME          |     FACULTY    |BATCH|  CONTACT  |");
gotoxy(5,12);cprintf("+---------+-------------------------+----------------+-----+-----------+");
while(fread(&m,recsizem,1,membersrecord)==1)
{
j++;
vj=j;
}
rewind(membersrecord);
while(fread(&m,recsizem,1,membersrecord)==1)
{
i++;
k=i;
vj--;
gotoxy(5,12+k);
cprintf("|%-9.8s|%-25.24s|%-16.15s|%-5.4s|%-11.10s|",m.id,m.name,m.faculty,m.batch,m.contact);
if(vj==0)
{
flag=2;
}
gotoxy(27,44);cprintf("(%d) record remaining out of (%d)",vj,j);
gotoxy(22,45);cprintf("Press enter or space to View more records");
if(k==28)
{
i=0;
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{ goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto re;
}
}
re:
}
if(flag==2)
{
gotoxy(32,43);cprintf("Record Finished!!!");
}
end:
getch();
mainscreen();
mcolor();
return;
}
memberadd()
{
char mid[10]; int flag=0;
textcolor(BLACK);textbackground(CYAN);
gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:

rewind(membersrecord);
fseek(membersrecord,0,SEEK_END);

i:
gotoxy(27,20);fflush(stdin);flushall();
gets(mid);
if(strlen(mid)<8 || strlen(mid)>8)
{
goto i;
}
rewind(membersrecord);
while(fread(&m,recsizem,1,membersrecord)==1)
{
if(strcmp(m.id,mid)==0)
{
gotoxy(50,20);
textbackground(CYAN);
cprintf("\xDB                           ");
gotoxy(50,20);
textcolor(RED);
cprintf("\xDB %s id allready exist\a",mid);
goto i;
}
else {
gotoxy(50,20);
textcolor(BLACK);textbackground(CYAN);
cprintf("\xDB                           ");
gotoxy(50,20);textcolor(RED);
cprintf("\xDB re-enter ID");}
}

i11:
gotoxy(27,20);fflush(stdin);flushall();gets(m.id);
if(strlen(m.id)<8 || strlen(m.id)>8)
{goto i11;}
if(strcmp(mid,m.id)==0)
{
goto b;
}
else
{
gotoxy(50,20);textbackground(CYAN);
cprintf("\xDB                          ");
textcolor(RED);gotoxy(50,20);
cprintf("\a\xDB id mismatched",mid);
textcolor(BLACK);textbackground(CYAN);
goto i;
}

b:
gotoxy(26,20);cprintf("%c",127);
gotoxy(27,22);fflush(stdin);flushall();gets(m.name);

c:
gotoxy(26,22);cprintf("%c",127);
gotoxy(27,24);fflush(stdin);flushall();gets(m.faculty);

d:
gotoxy(26,24);cprintf("%c",127);
gotoxy(27,26);fflush(stdin);flushall();gets(m.batch);

f:
gotoxy(26,26);cprintf("%c",127);
gotoxy(27,28);fflush(stdin);flushall();gets(m.address);

g:
gotoxy(26,28);cprintf("%c",127);
gotoxy(27,30);fflush(stdin);flushall();gets(m.contact);
gotoxy(26,30);cprintf("%c",127);

gotoxy(40,36);cprintf("Done!!!");
fwrite(&m,recsizem,1,membersrecord);
end:
if(flag==10)
{
clrscr();
mainscreen();
mcolor();
memberarea();
}

return;
}

membermodify()
{
char mid[10];int flag=0,searchnum=0;
clrscr();
border();
memberbox();
textcolor(BLACK);textbackground(CYAN);
gotoxy(27,32);
textbackground(CYAN);
cprintf("                                    ");
rewind(membersrecord);
gotoxy(37,8);
cprintf("MEMBER MODIFY");
gotoxy(37,9);
cprintf("=============");
gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:
gotoxy(10,15);
cprintf("Enter the Member ID: ");
i1: gotoxy(32,15);
fflush(stdin);
flushall();
gets(mid);
if(strlen(mid)<8 || strlen(mid)>8)
{
goto i1;
}
rewind(bookrecord);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
if(strcmp(b.stat,mid)==0)
{
flag=1;
searchnum++;
textcolor(RED);
gotoxy(10,33);cprintf("\aSorry!!! %s id has issued book.Deposit the issued before Modify.",mid);
gotoxy(10,35);
textcolor(BLACK);textbackground(CYAN);
cprintf("   ID    |             NAME             |        AUTHOR      |INDEX |");
gotoxy(10,36);
cprintf("---------+------------------------------+--------------------+------+");
gotoxy(10,36+searchnum);
cprintf("%-9.8s|%-30.28s|%-20.18s|%-4.3s  |",b.id,b.book,b.author,b.index);
}
}
if(flag==0)
{
ft=fopen("temp.DAT","wb");
rewind(membersrecord);
while(fread(&m,recsizem,1,membersrecord)==1)
{
if(strcmp(m.id,mid)!=0)
fwrite(&m,recsizem,1,ft);
}
fclose(membersrecord);
fclose(ft);
remove("membersrecord.DAT");
rename("temp.DAT","membersrecord.DAT");
membersrecord=fopen("membersrecord.DAT","rb+");
memberadd();
      }
end:
if(flag==10)
{
clrscr();
mainscreen();
mcolor();
memberarea();
}
return;
}

deletemember()
{
char mid[10];  int flag;
clrscr();
border();
textcolor(BLACK);textbackground(CYAN);
gotoxy(37,8);
cprintf("DELETE MEMBER");
gotoxy(37,9);
cprintf("=============");
gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:
gotoxy(10,15);
cprintf("Enter the Member ID: ");
i1: gotoxy(29,15);
fflush(stdin);
flushall();
gets(mid);
if(strlen(mid)<8 || strlen(mid)>8)
{
goto i1;
}
rewind(membersrecord);
while(fread(&m,recsizem,1,membersrecord)==1)
{
if(strcmp(m.id,mid)==0)
{
flag=0;
}
}

if(flag==0)
{
gotoxy(30,23);
textcolor(RED);textbackground(CYAN);
cprintf("Are you sure to delete?");
gotoxy(20,24);cprintf("'Enter' to delete or press 'Esc' to escape");

del:
gotoxy(40,27);
fflush(stdin);
flushall();
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==13)
{
ft=fopen("temp.DAT","wb");
rewind(membersrecord);
while(fread(&m,recsizem,1,membersrecord)==1)
{
if(strcmp(m.id,mid)!=0)
{
fwrite(&m,recsizem,1,ft);
}}
fclose(membersrecord);
fclose(ft);
remove("membersrecord.DAT");
rename("temp.DAT","membersrecord.DAT");
membersrecord=fopen("membersrecord.DAT","rb+");
gotoxy(25,30);
cprintf("%s book has been deleted successfully...",mid);
}
else if(ch==27)
{
gotoxy(30,30);
cprintf("Deleting process escaped\a");
}
else
{
cprintf("\a");
goto del;
}
}
if(flag!=0)
{
gotoxy(30,30);
cprintf("%s record not found!!!\a",mid);
}
end:
if(flag==10)
{
clrscr();
mainscreen();
mcolor();
memberarea();
}
return;
}

searchmember()
{
char mid[10];int flag=0,searchnum=0;
clrscr();
border();
textcolor(BLACK);textbackground(CYAN);
gotoxy(37,8);
cprintf("SEARCH MEMBER");
gotoxy(37,9);
cprintf("=============");
gotoxy(10,10);cprintf("Want to proceed?");
repeat:
gotoxy(39,10);
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}
if(ch==27 || ch==8 || ch==110)
{
flag=10;
goto end;
}
else if(ch==13 || ch==121 || ch==32)
{
goto proceed;
}
else{goto repeat;}
proceed:
gotoxy(18,12);
cprintf("Search the Member by | ID | Name");
gotoxy(18,13);
cprintf("=====================+====+======");
i1: gotoxy(18,14);
fflush(stdin);
flushall();
gets(mid);
rewind(membersrecord);
textbackground(CYAN);
while(fread(&m,recsizem,1,membersrecord)==1)
{
if(strcmp(m.id,mid)==0)
 {
 flag=1;
 textcolor(RED);
 gotoxy(12,16);cprintf("Name: %s",m.name);
 gotoxy(12,18);cprintf("Faculty: %s",m.faculty);
 gotoxy(12,20);cprintf("Batch: %s",m.batch);
 gotoxy(12,22);cprintf("Address: %s",m.address);
 gotoxy(12,24);cprintf("Contact: %s",m.contact);
 rewind(bookrecord);
 while(fread(&b,recsizeb,1,bookrecord)==1)
 {
 if(strcmp(b.stat,mid)==0)
 {
 searchnum++;
 gotoxy(12,26);cprintf("Number of issued Book: %d",searchnum);
 gotoxy(5,28);
 cprintf("|   ID     |              NAME            |       AUTHOR       | INDEX |");
 gotoxy(5,29);
 cprintf("|----------+------------------------------+--------------------+-------|");
 gotoxy(5,29+searchnum);
 cprintf("|%-10.8s|%-30.28s|%-20.19s|%-7.3s|",b.id,b.book,b.author,b.index);
 }
 }

 } //end id if

 else if(strcmp(m.name,mid)==0)
 {
 flag=1;
 searchnum++;
   gotoxy(9,17);
   cprintf("|   ID     |      FACULTY       |BATCH|  CONTACT   | ISSUED BOOK |");
   gotoxy(9,18);
   cprintf("|----------+--------------------+-----+------------+-------------|");
   gotoxy(9,18+searchnum);
   cprintf("|%-10.8s|%-20.18s|%-5.4s|%-12.10s|%-13d|",m.id,m.faculty,m.batch,m.contact,searchnum);
 }  //end name if

} //end while
if(flag!=1)
{
gotoxy(30,30);cprintf("\a%s not found in the record!!!",mid);
}
end:
if(flag==10)
{
clrscr();
mainscreen();
mcolor();
memberarea();
}
return;
}


mainscreen()
{
int tm=0,tb=0,tbi=0,tba=0;
clrscr();
border();
rarea();
textcolor(BLACK);textbackground(CYAN);
gotoxy(17,25);
cprintf("> ISSUE BOOK        > RETURN BOOK        > HELP");
gotoxy(17,29);
cprintf("> LOGOUT            > CLOSE");
rewind(membersrecord);
while(fread(&m,recsizem,1,membersrecord)==1)
{
tm++;
}
rewind(bookrecord);
while(fread(&b,recsizeb,1,bookrecord)==1)
{
tb++;
if(strlen(b.stat)>1)
{
tbi++;
}
if(strlen(b.stat)==1)
{
tba++;
}
textcolor(BLACK);textbackground(CYAN);
gotoxy(25,34);cprintf("Books Available in  stock: %d",tba);
gotoxy(25,36);cprintf("Total    Books     Issued: %d",tbi);
gotoxy(25,38);cprintf("Books   in   the   Record: %d",tb);
gotoxy(25,40);cprintf("Members  in  the   Record: %d",tm);
} //end while
textcolor(RED);
gotoxy(12,9);
cprintf("***********************************************************");
gotoxy(12,23);
cprintf("***********************************************************");
gotoxy(12,32);
cprintf("***********************************************************");
gotoxy(12,42);
cprintf("***********************************************************");
for(i=9;i<43;i++)
{
gotoxy(11,i);
cprintf("*");
}
for(i=9;i<43;i++)
{
gotoxy(71,i);
cprintf("*");
}
return;
}

rarea()
{
textcolor(BLACK);textbackground(CYAN);
gotoxy(20,11);cprintf("BOOK AREA");gotoxy(20,14);cprintf("> ADD");
gotoxy(20,12);cprintf("=========");
gotoxy(20,16);cprintf("> EDIT");gotoxy(20,18);cprintf("> DELETE");
gotoxy(20,20);cprintf("> SEARCH");
gotoxy(50,11);cprintf("MEMBERS AREA");
gotoxy(50,12);cprintf("============");
gotoxy(50,14);cprintf("> ADD");gotoxy(50,16);cprintf("> EDIT");
gotoxy(50,18);cprintf("> DELETE");gotoxy(50,20);cprintf("> SEARCH");
return;
}
bcolor()
{
textbackground(CYAN);textcolor(BLUE);gotoxy(20,11);cprintf("BOOK AREA");
gotoxy(20,12);cprintf("=========");
gotoxy(20,14);cprintf("> ADD");gotoxy(20,16);cprintf("> EDIT");
gotoxy(20,18);cprintf("> DELETE");gotoxy(20,20);cprintf("> SEARCH");
return;
}
mcolor()
{
textbackground(CYAN);textcolor(BLUE);gotoxy(50,11);cprintf("MEMBERS AREA");
gotoxy(50,12);cprintf("============");
gotoxy(50,14);cprintf("> ADD");gotoxy(50,16);cprintf("> EDIT");
gotoxy(50,18);cprintf("> DELETE");gotoxy(50,20);cprintf("> SEARCH");
return;
}

border()
{
for(i=0;i<53;i++)
{
textbackground(RED);
gotoxy(1,i);
cprintf("                                                                                ");
}
textcolor(CYAN);
gotoxy(30,4);cprintf("LIBRARY MANAGEMENT SYSTEM");
for(i=6;i<49;i++)  //search result background
{
textcolor(BLUE);
gotoxy(3,i);
cprintf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2");
}
for(i=7;i<48;i++)  //search result background
{
textbackground(CYAN);
gotoxy(4,i);
cprintf("                                                                          ");
}


rewind(settings);
while(fread(&s,recsizes,1,settings)==1)
{textbackground(RED);
gotoxy(10,2);
cprintf(" %s, (%s),ESTD: %s ",s.oname,s.add,s.estd);
}
textcolor(BLACK);
return;
}

choice2()
{
gotoxy(30,47);
textcolor(LIGHTBLUE);
textbackground(CYAN);
cprintf("ENTER YOUR CHOICE : ");
flushall();
fflush(stdin);
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
}

return;
}
choice1()
{
flushall();
fflush(stdin);
ch=getche();
return;
}

bookbox() //book entry formate...
{
textcolor(BLACK);textbackground(CYAN);
gotoxy(8,20);
cprintf("Book ID: ");
gotoxy(8,22);
cprintf("     Name: ");
gotoxy(8,24);
cprintf("     Author: ");
gotoxy(8,26);
cprintf("     Publication: ");
gotoxy(8,28);
cprintf("     Price: ");
gotoxy(8,30);
cprintf("     Index: ");
return;
}
memberbox() //members entry formate...
{
textcolor(BLACK);textbackground(CYAN);
gotoxy(8,20);
cprintf("Member ID: ");
gotoxy(8,22);
cprintf("       Name: ");
gotoxy(8,24);
cprintf("       Faculty: ");
gotoxy(8,26);
cprintf("       Batch: ");
gotoxy(8,28);
cprintf("       Address: ");
gotoxy(8,30);
cprintf("       Contact: ");
textbackground(WHITE);
gotoxy(27,32);
cprintf("                                    ");
return;
}


fpassword()
{
border();
programmer();
rewind(settings);
while(fread(&s,recsizes,1,settings)==1)
{
textcolor(RED);textbackground(CYAN);
gotoxy(40,12);
cprintf("%s",s.oname);
gotoxy(40,14);
cprintf("%s",s.add);
gotoxy(40,16);
cprintf("Phone No.: %s",s.ph);
gotoxy(40,18);
cprintf("Estd.: %s",s.estd);
gotoxy(40,20);
cprintf("%s",s.web);
}
for(i=7;i<40;i++)
{
textbackground(CYAN);
textcolor(BLACK);
gotoxy(30,i);
cprintf("\xB6");
}
start:
if(l==0)
{
e:
gotoxy(20,41);
textcolor(LIGHTBLUE);
cprintf("Thank You For Using Library System");
gotoxy(20,43);
cprintf("Please be Patient Program is Closing in Safe Mode");
delay(2000);
exit(0);
}
textcolor(LIGHTBLUE);
textbackground(CYAN);
gotoxy(12,20);
cprintf("USER NAME");
gotoxy(12,24);
cprintf("PASSWORD");
gotoxy(16,21);
i=0;

do
{       textcolor(RED);
user=getch();cprintf("%c",user);if(i==15){cprintf("\b\a");cprintf(" \b");--i;}
cprintf("\b");
username[i]=user;i++;
}while(user!=13);
      username[--i]='\0';
gotoxy(16,25);
i=0;
do
{        textcolor(RED);
pass=getch();cprintf("*");if(i==15){cprintf(" \b\b\a");cprintf(" \b");--i;}
cprintf("\b");password[i]=pass;i++;
}while(pass!=13);
password[--i]='\0';
rewind(settings);
while(fread(&s,recsizes,1,settings)==1)
if(strcmp(s.user,username)==0)
{
if(strcmp(s.pass,password)==0)
{
goto done;
}
else
{
goto false;
}
}
else
{
false:
textcolor(RED+BLINK);
gotoxy(4,30);
cprintf("MISSMATCH TRY REMAINING %d",l-1);
--l;
goto start;
}
done:
return;
}

seetings()
{
border();
textcolor(BLACK);textbackground(CYAN);
gotoxy(10,10);
cprintf("----------SETTINGS---LIBRARY MANAGEMENT SYSTEM--------------");
textcolor(LIGHTBLUE);
gotoxy(10,14);
cprintf("Organization Name:");
gotoxy(10,16);
cprintf("Address:");
gotoxy(10,18);
cprintf("Phone number:");
gotoxy(10,20);
cprintf("ESTD Date:");
gotoxy(10,22);
cprintf("Website:");
gotoxy(10,24);
cprintf("User Name:");
gotoxy(10,26);
cprintf("Password:");
gotoxy(10,28);
cprintf("Re-enter Password:");
fseek(settings,0,SEEK_END);
gotoxy(29,14);fflush(stdin);flushall();gets(s.oname);
gotoxy(29,16);fflush(stdin);flushall();gets(s.add);
gotoxy(29,18);fflush(stdin);flushall();gets(s.ph);
gotoxy(29,20);fflush(stdin);flushall();gets(s.estd);
gotoxy(29,22);fflush(stdin);flushall();gets(s.web);
gotoxy(29,24);fflush(stdin);flushall();gets(s.user);
re:
gotoxy(28,26);
i=0;
do
{        textcolor(RED);
pass=getch();cprintf("*");if(i==15){cprintf(" \b\b\a");cprintf(" \b");--i;}
cprintf("\b");s.pass[i]=pass;i++;
}while(pass!=13);
s.pass[--i]='\0';
/*i=0;
do
{
a=getch();cprintf("%c",a);if(i==15){cprintf("\b\a");cprintf(" \b");--i;}s.pass[i]=a;i++;
}while(a!=13);
s.pass[--i]='\0';      */
gotoxy(28,28);
i=0;
do
{        textcolor(RED);
pass=getch();cprintf("*");if(i==15){cprintf(" \b\b\a");cprintf(" \b");--i;}
cprintf("\b");s.repass[i]=pass;i++;
}while(pass!=13);
s.repass[--i]='\0';
      /* i=0;
do
{
a=getch();cprintf("%c",a);if(i==15){cprintf("\b\a");cprintf(" \b");--i;}s.repass[i]=a;i++;
}while(a!=13);
s.repass[--i]='\0';*/
gotoxy(20,40);
if(strcmp(s.repass,s.pass)==0)
{
cprintf("Settings has been updated successfully.");
delay(1000);
}
else
{
goto re;
}
fwrite(&s,recsizes,1,settings);
return;
}
programmer()
{
clrscr();
border();
textcolor(RED);textbackground(CYAN);
gotoxy(50,25);
cprintf("Programmers");
gotoxy(50,26);
cprintf("===========");
gotoxy(40,28);
cprintf("Bijay Kumar Chaurasiya - 9003");
gotoxy(40,30);
cprintf("Madan Kumar Singh - 9011");
gotoxy(40,32);
cprintf("Santosh Yadav - 9019");
gotoxy(40,34);
cprintf("Swadesh Raj Chaudhary - 9025");
return;
}
help()
{
clrscr();
border();
textcolor(BLACK);textbackground(CYAN);
gotoxy(40,8);cprintf("HELP");gotoxy(40,9);cprintf("====");
gotoxy(10,11);cprintf("\xDF To access the %cBook Area%c Press B/b.",34,34);
gotoxy(10,12);cprintf("\xDF To access the %cMember Area%c Press M/m.",34,34);
gotoxy(10,13);cprintf("\xDF After entering %cBook Area%c or %cMember Area%c press:",34,34,34,34);
gotoxy(15,15);cprintf("\xDF A/a - to add the Record.");
gotoxy(15,16);cprintf("\xDF D/d - to delete the Record.");
gotoxy(15,17);cprintf("\xDF E/e - to Edit(Modify) the Record.");
gotoxy(15,18);cprintf("\xDF S/s - to Search the Record.");
gotoxy(15,19);cprintf("\xDF I/i - to issue the Book.");
gotoxy(15,20);cprintf("\xDF R/r - to Return the Book.");
gotoxy(15,21);cprintf("\xDF L/l - to Logout.");
gotoxy(15,22);cprintf("\xDF H/h - for help.");
gotoxy(15,23);cprintf("\xDF C/c - to Close the Program.");
gotoxy(10,25);cprintf("\xDF If you are in %cBook Area%c and want to jump in %cMember Area%c",34,34,34,34);
gotoxy(10,26);cprintf("  or vice-versa then press:");
gotoxy(15,28);cprintf("\xDF B/b to jump in %cBook Area%c.",34,34);
gotoxy(15,29);cprintf("\xDF M/m to jump in %cMember Area%c.",34,34);
gotoxy(10,31);cprintf("\xDF If asked that %cWant to Proceed?%c then press:",34,34);
gotoxy(15,33);cprintf("\xDF Enter/Space/Y/y - to access.");
gotoxy(15,34);cprintf("\xDF Esc/Backspace/N/n - to abort.");
gotoxy(10,36);cprintf("\xDF In %cStatic%c of the Book information field any & only 1 character",34,34);
gotoxy(10,37);cprintf("  is entered.");
gotoxy(10,39);cprintf("\xDF %cMember ID%c & %cBook ID%c muust be of 8 character.",34,34,34,34);
gotoxy(15,40);cprintf("\xDF eg.:- Member Id: 9003CE10. '9003' is bathch,'CE' is COMPUTER");
gotoxy(15,41);cprintf("        & '10' is roll number.");
gotoxy(15,42);cprintf("\xDF       Book Id: 004PH001. '004' is edition, 'PH' is Physics");
gotoxy(15,43);cprintf("        & '001' is book number.");
gotoxy(35,47);cprintf("Thank You!!!");
getch();
return;
}

No comments:

Post a Comment