{ (c) 1998 CREEQ <creeq@web.de> }
program Sicherheitsabfrage;
uses Crt;
var
  a : string;
  richtig:boolean;
  x,v : byte;
label 1,2,3,4,5;
begin
  goto 2;
1:gotoxy(10,12);
  write('ID-Nummer Falsch');
  inc(v);
  if v = 4 then goto 4;
  readkey;
  goto 3;
4:gotoxy(10,14);
  write('Keine weiteren Eingaben m”glich!');
  gotoxy(10,16);
  write('System angehalten!');
  repeat
  until false;
2:richtig := false;
  v := 1;
3:
5:textbackground(black);
  textcolor(lightgray);
  clrscr;
  textcolor(lightred);
  gotoxy(26,2);
  write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
  gotoxy(26,3);
  write('³');
  textcolor(lightred+blink);
  gotoxy(33,3);
  write('!ACHTUNG!');
  textcolor(lightred);
  gotoxy(49,3);
  write('³');
  gotoxy(26,5);
  write('³');
  gotoxy(26,4);
  write('³                      ³');
  gotoxy(29,5);
  write('Sicherheitsabfrage');
  gotoxy(49,5);
  write('³');
  gotoxy(26,6);
  write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ');
  textcolor(lightblue);
  gotoxy(10,10);
  write('ID-Nummer: ');
  x := 21;
  repeat
    gotoxy(x,10);
    a := readkey;
    if x = 40 then x := 39;
    if a = chr(8) then goto 5;
    if a = chr(9) then goto 5;
    if a = chr(11) then goto 5;
    if a = chr(12) then goto 5;
    if a = chr(13) then goto 1;
    if a = chr(27) then goto 5;
    if a = '1' then begin
                      if x = 21 then begin write('*'); richtig := true; inc(x); end;
                    end
    else begin write('*'); inc(x); end;
  until richtig;
  richtig := false;
  repeat
    gotoxy(x,10);
    a := readkey;
    if x = 40 then x := 39;
    if a = chr(8) then goto 5;
    if a = chr(9) then goto 5;
    if a = chr(11) then goto 5;
    if a = chr(12) then goto 5;
    if a = chr(13) then goto 1;
    if a = chr(27) then goto 5;
    if a = '8' then begin
                      if x = 22 then begin write('*'); richtig := true; inc(x); end;
                    end
    else begin write('*'); inc(x); end;
  until richtig;
  richtig := false;
  repeat
    gotoxy(x,10);
    a := readkey;
    if x = 40 then x := 39;
    if a = chr(8) then goto 5;
    if a = chr(9) then goto 5;
    if a = chr(11) then goto 5;
    if a = chr(12) then goto 5;
    if a = chr(13) then goto 1;
    if a = chr(27) then goto 5;
    if a = '8' then begin
                      if x = 23 then begin write('*'); richtig := true; inc(x); end;
                    end
    else begin write('*'); inc(x); end;
  until richtig;
  richtig := false;
  repeat
    gotoxy(x,10);
    a := readkey;
    if x = 40 then x := 39;
    if a = chr(8) then goto 5;
    if a = chr(9) then goto 5;
    if a = chr(11) then goto 5;
    if a = chr(12) then goto 5;
    if a = chr(13) then goto 1;
    if a = chr(27) then goto 5;
    if a = '5' then begin
                      if x = 24 then begin write('*'); richtig := true; inc(x); end;
                    end
    else begin write('*'); inc(x); end;
  until richtig;
  richtig := false;
  repeat
    gotoxy(x,10);
    a := readkey;
    if x = 40 then x := 39;
    if a = chr(8) then goto 5;
    if a = chr(9) then goto 5;
    if a = chr(11) then goto 5;
    if a = chr(12) then goto 5;
    if a = chr(13) then goto 1;
    if a = chr(27) then goto 5;
    if a = '4' then begin
                      if x = 25 then begin write('*'); richtig := true; inc(x); end;
                    end
    else begin write('*'); inc(x); end;
  until richtig;
  richtig := false;
  repeat
    gotoxy(x,10);
    a := readkey;
    if x = 40 then x := 39;
    if a = chr(8) then goto 5;
    if a = chr(9) then goto 5;
    if a = chr(11) then goto 5;
    if a = chr(12) then goto 5;
    if a = chr(13) then goto 1;
    if a = chr(27) then goto 5;
    if a = '0' then begin
                      if x = 26 then begin write('*'); richtig := true; inc(x); end;
                    end
    else begin write('*'); inc(x); end;
  until richtig;
  richtig := false;
  repeat
    gotoxy(x,10);
    a := readkey;
    if x = 40 then x := 39;
    if a = chr(8) then goto 5;
    if a = chr(9) then goto 5;
    if a = chr(11) then goto 5;
    if a = chr(12) then goto 5;
    if a = chr(13) then goto 1;
    if a = chr(27) then goto 5;
    if a = '6' then begin
                      if x = 27 then begin write('*'); richtig := true; inc(x); end;
                    end
    else begin write('*'); inc(x); end;
  until richtig;
  richtig := false;
  repeat
    gotoxy(x,10);
    a := readkey;
    if x = 40 then x := 39;
    if a = chr(8) then goto 5;
    if a = chr(9) then goto 5;
    if a = chr(11) then goto 5;
    if a = chr(12) then goto 5;
    if a = chr(13) then goto 1;
    if a = chr(27) then goto 5;
    if a = '9' then begin
                      if x = 28 then begin write('*'); richtig := true; inc(x); end;
                    end
    else begin write('*'); inc(x); end;
  until richtig;
  richtig := false;
  repeat
    gotoxy(x,10);
    if a = chr(13) then goto 1;
    a := readkey;
    if a = chr(8) then goto 5;
    if a = chr(9) then goto 5;
    if a = chr(11) then goto 5;
    if a = chr(12) then goto 5;
    if a = chr(27) then goto 5;
    if x = 40 then x := 39;
    if a = chr(13) then begin
                      if x = 29 then richtig := true;
                          end
    else begin write('*'); inc(x); end;
  until richtig;
  gotoxy(10,12);
  write('ID-Nummer Korrekt');
  readkey;
  textcolor(lightgray);
  clrscr;
end.
