video library project

video library project - /*-*/ /*-*/ /*-*/ /* VIDEO LIBRARY...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 /*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/ /* VIDEO LIBRARY MANAGEMENT SYSTEM */ /*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/ #include<stdio.h> #include<conio.h> #include<dos.h> #include<string.h> #include<graphics.h> #define PATH ".gi" #define TBG textbackground(WHITE) typedef struct customer { long id char name[20] char pn[12] char address[40] char category int doj[3] }cust typedef struct movie { long id char title[25] int copy int cponshelf int issue char sid[20] int loc }mov typedef struct transaction { long invoice int doi[3] int dor[3] char title[25] int fine long cid char cname[20] int copies int rent int tam
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 }transaction cust ctr mov mv transaction tran FILE *fc,*fm,*ft,*tmp long int size int days,k=0 struct date d void main_menu() { char *menu[]={"CUSTOMER SECTION", "MOVIE SECTION", "TRANSACTION SECTION", "EXIT"} char ch int gd=DETECT,gm,i,choice=0 setfillstyle(SOLID_FILL,RED) bar(0,0,640,480) title("MAIN MENU",180) status() box(0,menu[0]) box(1,menu[1]) box(2,menu[2]) box(3,menu[3]) selectbox(choice,menu[choice]) //72 up //80 down //75 left //77 right //13 enter //49 1 //71 Home //79 End //73 PgUp //81 PgDown //27 Escape while((ch=getch())!=13) { switch(ch) { case 80: case 81:
Background image of page 2
Sheet1 Page 3 choice++ if(choice==4) choice=0 selectbox(choice,menu[choice]) for(i=0 { if(i==choice) continue box(i,menu[i]) } break case 72: case 73: choice-- if(choice==-1) choice=3 selectbox(choice,menu[choice]) for(i=0 { if(i==choice) continue box(i,menu[i]) } } } pressbutton(choice,menu[choice]) switch(choice) { case 0: size=sizeof(ctr) customer() break case 1: movie() break case 2: transactions() break case 3: closegraph() restorecrtmode() exit(0) } } customer() { char *menu[]={ "ADD CUSTOMER", "MODIFY CUSTOMER",
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 4 "DELETE CUSTOMER", "LIST CUSTOMER", "BACK TO MAIN MENU", "EXIT" } char ch int gd=DETECT,gm int i,choice=0 setfillstyle(SOLID_FILL,RED) bar(0,0,640,480) title("CUSTOMER MENU",130) status() box(0,menu[0]) box(1,menu[1]) box(2,menu[2]) box(3,menu[3]) box(4,menu[4]) box(5,menu[5]) selectbox(choice,menu[choice]) //72 up //80 down //75 left //77 right //13 enter //49 1 //71 Home //79 End //73 PgUp //81 PgDown //27 Escape while((ch=getch())!=13) { switch(ch) { case 80: case 81: choice++ if(choice==6) choice=0 selectbox(choice,menu[choice]) for(i=0 { if(i==choice) continue box(i,menu[i]) } break
Background image of page 4
Sheet1 Page 5 case 72: case 73: choice-- if(choice==-1) choice=5 selectbox(choice,menu[choice]) for(i=0 { if(i==choice) continue box(i,menu[i]) } } } pressbutton(choice,menu[choice]) closegraph() restorecrtmode() clrscr() if((fc=fopen("c:customer.txt","rb+"))==NULL)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/06/2010 for the course UBIT 411 taught by Professor Saleemelahi during the Spring '10 term at University of Karachi.

Page1 / 56

video library project - /*-*/ /*-*/ /*-*/ /* VIDEO LIBRARY...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online