Program KUTUPHANE;
Uses Crt,Dos;
Type KAYIT=Record
kitapadi,kitapno,yazari,basimevi,basimtar,
sayfasi,icerigi,vertar,altar:String;
adi,soyadi,no,tel,adres1,adres2,adres3,il:String;
F:Char;
End;
Var
KAY:KAYIT;
DOSYA:FILE OF KAYIT;
KOD : INTEGER;
CEVAP :CHAR;
X:WORD;
I,S:INTEGER;
SEC,TUS:CHAR;
ARA : String;
Procedure CERCEVE;
Var
i:byte;
Begin
Clrscr;
For i:=2 To 79 Do Begin
Gotoxy(i,1);
Write('Í');
Gotoxy(i,24);
Write('Í');
End;
For i:=2 To 23 Do Begin
Gotoxy(1,i);Write('º');
Gotoxy(79,i);Write('º');
End;
Gotoxy(1,1);Write('É');
Gotoxy(79,1);Write('»');
Gotoxy(1,24);Write('È');
Gotoxy(79,24);Write('¼');
End;
Procedure KITAP_KAYIT;
Begin
Assign(Dosya,'Kutuphan.dat');
{$I-}Reset(DOSYA); KOD:=Ioresult;{$I+}
If KOD<>0 Then Rewrite(DOSYA);
cerceve;
Textcolor(15);
Textbackground(1);
Gotoxy(3,4);Write(' ¯¯¯ K˜TAP KAYIT ®®®');
Gotoxy(3,5);Write('ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ');
Gotoxy(3,6);Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(3,7);Write('ºADI...........: º');
Gotoxy(3,8);Write('ºYAZARI........: º');
Gotoxy(3,9);Write('ºKAYIT NO......: º');
Gotoxy(3,10);Write('ºBASIMEV˜......: º');
Gotoxy(3,11);Write('ºBASIM TAR˜H˜..: º');
Gotoxy(3,12);Write('ºSAYFA SAYISI..: º');
Gotoxy(3,13);Write('º˜€ER˜¦˜.......: º');
Gotoxy(3,14);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
Gotoxy(19,7);Readln(KAY.kitapadi);
Gotoxy(19,8);Readln(KAY.yazari);
Gotoxy(19,9);Readln(KAY.kitapno);
Gotoxy(19,10);Readln(KAY.basimevi);
Gotoxy(19,11);Readln(KAY.basimtar);
Gotoxy(19,12);Readln(KAY.sayfasi);
Gotoxy(19,13);Readln(kay.icerigi);
Gotoxy(20,20);Write('G˜R˜LEN KAYIT DO¦RU MU <E/H>? ');
Repeat
CEVAP:=Upcase(Readkey);
Until CEVAP In ['E','H'];
Case CEVAP Of
'E': Begin
KAY.F:='*';
Seek(DOSYA,Filesize(DOSYA));
Write(DOSYA,KAY);
Close(DOSYA);
End;
End;
End;
Procedure KITAP_ARAMA;
Begin
Assign(DOSYA,'kutuphan.DAT');
{$I-}Reset(DOSYA); KOD:=Ioresult; {$I+}
cerceve;
If KOD <>0 Then
Begin
Writeln('DOSYA YOK...');
TUS := Readkey;
Halt;
End;
Clrscr;
cerceve;
Gotoxy(15,7);
Write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
Gotoxy(15,8);
Write('³Arad§nz Kitabn Adnn Girin.: ³');
Gotoxy(15,9);
Write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ');
Gotoxy(49,8);
Readln(ARA);
If ARA='' Then EXIT;
For I:= 0 To FILESIZE (DOSYA)-1 Do
Begin
Seek(DOSYA,I);
Read(DOSYA,KAY);
If (KAY.F='*') And (KAY.kitapadi=ARA) Then
Begin
Clrscr;
cerceve;
Gotoxy(3,4);Write(' ¯¯¯ K˜TAP BUL ®®®' );
Gotoxy(3,5);Write('ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ');
Gotoxy(3,6);Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(3,7);Write('ºADI...........: º');
Gotoxy(3,8);Write('ºYAZARI........: º');
Gotoxy(3,9);Write('ºBASIMEV˜......: º');
Gotoxy(3,10);Write('ºBASIM TAR˜H˜..: º');
Gotoxy(3,11);Write('ºSAYFA SAYISI..: º');
Gotoxy(3,12);Write('º˜€ER˜¦˜.......: º');
Gotoxy(3,13);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
Gotoxy(19,7);Write(KAY.kitapadi);
Gotoxy(19,8);Write(KAY.yazari);
Gotoxy(19,9);Write(KAY.basimevi);
Gotoxy(19,10);Write(KAY.basimtar);
Gotoxy(19,11);Write(KAY.sayfasi);
Gotoxy(19,12);Write(KAY.icerigi);
Gotoxy(5,18);Write('Aranan Kayt Bu Mu?');
Repeat
TUS:=Upcase(Readkey);
Until TUS In ['E','H'];
If TUS= 'E' Then EXIT;
End;
If tus='H' Then
End;
Writeln;
Gotoxy(29,18); Write ('Aranan Kayt Yok..');
TUS:=Readkey;
End;
Procedure UYE_KAYIT;
Begin
Assign(Dosya,'UYE.dat');
{$I-} Reset(DOSYA); KOD:=Ioresult;{$I+}
If KOD<>0 Then Rewrite(DOSYA);
Clrscr;
CERCEVE;
Gotoxy(3,4);Write(' ¯¯¯ šYE KAYIT ®®®');
Gotoxy(3,5);Write('ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ');
Gotoxy(3,6);Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(3,7);Write('ºADI...........: º');
Gotoxy(3,8);Write('ºSOAYDI........: º');
Gotoxy(3,9);Write('ºšYE NO........: º');
Gotoxy(3,10);Write('ºADRES.........: º');
Gotoxy(3,11);Write('ºADRES.........: º');
Gotoxy(3,12);Write('ºADRES.........: º');
Gotoxy(3,13);Write('º˜L€E/˜L.......: º');
Gotoxy(3,14);Write('ºTELEFONU......: º');
Gotoxy(3,15);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ');
Gotoxy(19,7);Readln(KAY.adi);
Gotoxy(19,8);Readln(KAY.soyadi);
Gotoxy(19,9);Readln(KAY.no);
Gotoxy(19,10);Readln(KAY.adres1);
Gotoxy(19,11);Readln(KAY.adres2);
Gotoxy(19,12);Readln(KAY.adres3);
Gotoxy(19,13);Readln(kay.il);
Gotoxy(19,14);Readln(kay.tel);
Gotoxy(20,20);Write('G˜R˜LEN KAYIT DO¦RU MU <E/H>? ');
Repeat
CEVAP:=Upcase(Readkey);
Until cevap In ['E','H'];
Case CEVAP Of
'E': Begin
KAY.F:='*';
Seek(DOSYA,Filesize(DOSYA));
Write(DOSYA,KAY);
Close(DOSYA);
End;
End;
End;
Procedure UYE_ARAMA;
Begin
Assign (DOSYA,'uye.DAT');
{$I-}Reset(DOSYA); KOD:=Ioresult; {$I+}
cerceve;
If KOD <>0 Then
Begin
Writeln('DOSYA YOK...');
TUS := Readkey;
Halt;
End;
Gotoxy(15,7);
Write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
Gotoxy(15,8);
Write('³Arad§nz šyenin Adnn Girin.: ³');
Gotoxy(15,9);
Write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ');
Gotoxy(48,8);
Readln(ARA);
If ARA='' Then EXIT;
For I:= 0 To Filesize (DOSYA)-1 Do
Begin
Seek(DOSYA,I);
Read(DOSYA,KAY);
If (KAY.F='*') And (KAY.adi=ARA) Then
Begin
Clrscr;
cerceve;
Gotoxy(3,4);Write(' ¯¯¯ UYE ARAMA ®®®');
Gotoxy(3,5);Write('ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ');
Gotoxy(3,6);Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(3,7);Write('ºADI...........: º');
Gotoxy(3,8);Write('ºSOAYDI........: º');
Gotoxy(3,9);Write('ºšYE NO........: º');
Gotoxy(3,10);Write('ºADRES˜........: º');
Gotoxy(3,11);Write('ºADRES.........: º');
Gotoxy(3,12);Write('ºADRES.........: º');
Gotoxy(3,13);Write('º˜L€E/˜L.......: º');
Gotoxy(3,14);Write('ºTELEFONU......: º');
Gotoxy(3,15);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
Gotoxy(19,7);Write(KAY.adi);
Gotoxy(19,8);Write(KAY.soyadi);
Gotoxy(19,9);Write(KAY.no);
Gotoxy(19,10);Write(KAY.adres1);
Gotoxy(19,11);Write(KAY.adres2);
Gotoxy(19,12);Write(KAY.adres3);
Gotoxy(19,13);Write(kay.il);
Gotoxy(19,14);Write(kay.tel);
Gotoxy(3,16);Write('Aranan Kayt Bu Mu?');
Repeat
TUS:=Upcase(Readkey);
Until TUS In ['E','H'];
If TUS= 'E' Then EXIT;
End;
End;
Writeln;
Gotoxy(29,16); Write ('Aranan Kayt Yok...');
TUS:=Readkey;
End;
Procedure MENU_UYE;
Begin
Repeat
Clrscr;
cerceve;
Gotoxy(30,5); Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(30,6); Write('º [1]-šYE KAYIT º');
Gotoxy(30,7); Write('º [2]-šYE ARAMA º');
Gotoxy(30,8); Write('º [3]-€IKI <Esc> º');
Gotoxy(30,9); Write('º º');
Gotoxy(30,10);Write('º Se‡iminiz...[ ] º');
Gotoxy(30,11);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
Repeat
Gotoxy(45,10);
sec:=Upcase(Readkey);
Until sec In ['1','2','3',#27];
Case sec Of
'1' : UYE_KAYIT ;
'2' : UYE_ARAMA ;
'3' : exit ;
#27 :exit ;
End;
Until false;
End;
Procedure MENU_KITAP;
Begin
Repeat
Clrscr;
cerceve;
Gotoxy(30,5); Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(30,6); Write('º [1]-K˜TAP KAYIT º');
Gotoxy(30,7); Write('º [2]-K˜TAP BULMA º');
Gotoxy(30,8); Write('º [3]-€IKI <Esc> º');
Gotoxy(30,9); Write('º º');
Gotoxy(30,10);Write('º Se‡iminiz..[ ] º');
Gotoxy(30,11);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
Repeat
Gotoxy(45,10);
sec:=Upcase(Readkey);
Until sec In ['1','2','3',#27];
Case sec Of
'1' : KITAP_KAYIT;
'2' : KITAP_ARAMA;
'3' : EXIT;
#27 : exit;
End;
Until false;
End;
Procedure ODUNC_VERME;
Begin
Assign(Dosya,'odunc.dat');
{$I-} Reset(DOSYA); KOD:=Ioresult;{$I+}
If KOD<>0 Then Rewrite(DOSYA);
Clrscr;
cerceve;
Gotoxy(3,6); Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(3,7); Write('ºADI............: º');
Gotoxy(3,8); Write('ºSOAYDI.........: º');
Gotoxy(3,9); Write('ºšYE NO.........: º');
Gotoxy(3,10);Write('º ¯¯¯¯¯¯ALDIGI KITABIN®®®®®® º');
Gotoxy(3,11);Write('ºADI............: º');
Gotoxy(3,12);Write('ºYAZARI.........: º');
Gotoxy(3,13);Write('º˜€ER˜¦˜........: º');
Gotoxy(3,14);Write('ºNO.............: º');
Gotoxy(3,15);Write('ºVERILDIGI TARIH: º');
Gotoxy(3,16);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
Gotoxy(20,7);Readln(kay.adi);
Gotoxy(20,8);Readln(kay.soyadi);
Gotoxy(20,9);Readln(kay.no);
Gotoxy(20,11);Readln(KAY.kitapadi);
Gotoxy(20,12);Readln(KAY.yazari);
Gotoxy(20,13);Readln(kay.icerigi);
Gotoxy(20,14);Readln(kay.kitapno);
Gotoxy(20,15);Readln(kay.vertar);
Gotoxy(20,20);Write('G˜R˜LEN KAYIT DO¦RU MU <E/H>? ');
Repeat
CEVAP:=Upcase(Readkey);
Until CEVAP In ['H','E'];
Case CEVAP Of
'E': Begin
KAY.F:='*';
Seek(DOSYA,Filesize(DOSYA));
Write(DOSYA,KAY);
Close(DOSYA);
End;
End;
End;
Procedure ODUNC_ALMA;
Var
ARA: String;
Begin
Assign(DOSYA,'odunc.DAT');
Reset(DOSYA);
Clrscr;
cerceve;
Gotoxy(15,7);
Write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
Gotoxy(15,8);
Write('³Arad§nz Kayt No''sunu Girin.: ³');
Gotoxy(15,9);
Write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ');
Gotoxy(48,8);
Readln(ARA);
If ara='' Then exit;
For I:=1 To Filesize(DOSYA)-1 Do
Begin
Seek(DOSYA,I);
Read(DOSYA,KAY);
If (ARA=KAY.no) And (KAY.F='*' ) Then
Begin
cerceve;
Gotoxy(3,6); Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(3,7); Write('ºADI............: º');
Gotoxy(3,8); Write('ºSOAYDI.........: º');
Gotoxy(3,9); Write('ºšYE NO.........: º');
Gotoxy(3,10);Write('º ¯¯¯¯¯¯ALDIGI KITABIN®®®®®® º');
Gotoxy(3,11);Write('ºADI............: º');
Gotoxy(3,12);Write('ºYAZARI.........: º');
Gotoxy(3,13);Write('ºTURU...........: º');
Gotoxy(3,14);Write('ºNO.............: º');
Gotoxy(3,15);Write('ºVERILDIGI TARIH: º');
Gotoxy(3,16);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
Gotoxy(20,7);Write(kay.adi);
Gotoxy(20,8);Write(kay.soyadi);
Gotoxy(20,9);Write(kay.no);
Gotoxy(20,11);Write(kay.kitapadi);
Gotoxy(20,12);Write(kay.yazari);
Gotoxy(20,13);Write(kay.icerigi);
Gotoxy(20,14);Write(kay.kitapno);
Gotoxy(20,15);Write(kay.vertar);
Gotoxy(3,18);Write('Aranan Kayt Bu Mu?');
Repeat
TUS :=Upcase(Readkey);
Until TUS In ['E','H'];
If TUS='E' Then
Begin
cerceve;
Gotoxy(3,6); Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(3,7); Write('ºADI............: º');
Gotoxy(3,8); Write('ºSOAYDI.........: º');
Gotoxy(3,9); Write('ºšYE NO.........: º');
Gotoxy(3,10);Write('º ¯¯¯¯¯¯ALDIGI KITABIN®®®®®® º');
Gotoxy(3,11);Write('ºADI............: º');
Gotoxy(3,12);Write('ºYAZARI.........: º');
Gotoxy(3,13);Write('ºTURU...........: º');
Gotoxy(3,14);Write('ºNO.............: º');
Gotoxy(3,15);Write('ºVER˜LD˜¦˜ TAR˜H: º');
Gotoxy(3,16);Write('º˜ADE TARIH.....: º');
Gotoxy(3,17);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
Gotoxy(20,7);Write(kay.adi);
Gotoxy(20,8);Write(kay.soyadi);
Gotoxy(20,9);Write(kay.no);
Gotoxy(20,11);Write(kay.kitapadi);
Gotoxy(20,12);Write(kay.yazari);
Gotoxy(20,13);Write(kay.icerigi);
Gotoxy(20,14);Write(kay.kitapno);
Gotoxy(20,15);Write(kay.vertar);
Gotoxy(20,16);Readln(kay.ALTAR);
SEEK(DOSYA,I);
Write(DOSYA,KAY);
Gotoxy(28,18); Write('˜Ÿlem Tamam...');
Close (DOSYA);
TUS:=Readkey;
EXIT;
End;
End;
End;
Gotoxy(29,18); Write('Kayt Yok...');
Close(DOSYA);
TUS:=Readkey;
End;
Procedure
MENU_1;
Var
i:byte;
saa,dak,sn,sl:word;
g,a,y,h:word;
Begin
Repeat
Getdate(y,a,g,h);
Gettime(saa,dak,sn,sl);
Textcolor(15);
Textbackground(1);
Clrscr;
cerceve;
Gotoxy(23,2);Write('<<<<<<<KšTšPHANE PROGRAMI>>>>>>>');
Gotoxy(27,7); Write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
Gotoxy(27,8); Write('º [1]-K˜TAP ˜LEMLER˜ º');
Gotoxy(27,9); Write('º [2]-šYE ˜LEMLER˜ º');
Gotoxy(27,10);Write('º [3]-™DšN€ VERME º');
Gotoxy(27,11);Write('º [4]-™DšN€ ALMA º');
Gotoxy(27,12);Write('º [5]-€IKI <Esc> º');
Gotoxy(27,13);Write('º º');
Gotoxy(27,14);Write('º Se‡iminiz.....[ ] º');
Gotoxy(27,15);Write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
Gotoxy(1,22);Write('Ì');
Gotoxy(79,22);Write('¹');
Gotoxy(1,3);Write('Ì');
Gotoxy(79,3);Write('¹');
For i:=2 To 78 Do Begin
Gotoxy(i,22);Write(chr(205));
Gotoxy(i,3);Write(chr(205));
End;
Gotoxy(19,22);Write('Ë');
Gotoxy(64,22);Write('Ë');
Gotoxy(19,24);Write('Ê');
Gotoxy(64,24);Write('Ê');
Gotoxy(19,23);Write(Chr(186));
Gotoxy(64,23);Write(Chr(186));
Gotoxy(3,23);Write('Tarih:',g,'/',a,'/',y);
Gotoxy(66,23);Write('Saat:',saa,':',dak,':',sn);
Textcolor(14);Gotoxy(27,23);Write('Gazi šniversitesi ˜.™ Matematik ™§rt.');
Textcolor(15);
Gotoxy(12,17);Write
('Kemal ˜MEK Cemil ˜MEK');
Gotoxy(32,18);Write (' Asm ˜MEK');
Repeat
Gotoxy (45,14);
sec:=Upcase(Readkey);
Until sec In ['1','2','3','4','5',#27];
Case sec Of
'1' : MENU_KITAP ;
'2' : MENU_UYE ;
'3' : ODUNC_VERME;
'4' : ODUNC_ALMA ;
'5' : exit ;
#27 : halt ;
End;
Until false;
End;
Begin
menu_1;
End.
by kemal şimşek