misc/KNOCKED.PAS
9.7 KB
5064608f4c046c33…
{
▄ ▌ ▐▌ ▐ ▌
██ ▐█ █ ▐ ▐█ ▐ ▄▄▄▄▄▄▄▄▄
▐▐█ ██▌ ▐▐▓▌ ▐█▌ ▐█▌ ▐▌ ▄▄▄▄▀▀▀▀ ▀▀▀▀▄▄▄
███ ▐▐▓█ ▄ ███ ███ ██▌ █ ▄▄▀▀▀ ▄▄▄▄▄ ▀▀█▄
▐▐▓▌ ██▀ ▄▄▄▄ ▀▀▄ ██▓ █▓█ ▓▌ ▄▀ █████████▄ ▐▌
███ █ ▄█████▓▄ █▐▐██▌ ███ ███ ▐▌ ▐██ ▄▄▄▄ ▀█▌ █
▐▐█▐▌▐████████▌▐▌█▓██ ▐▐▓█ █▐█▌ █ ▀█▄ ████ ▀ ▐▌
█▓█ █▐█▀ ▀███ ▌██▀▀ ▀▀▀█▌ █▓ ▐▌ ▐██▓▌ n f u s i o n . . . █
▐▐▌▐██▌ ▐▓█▌▐ ▄▄███▄▄ ▐▐█▌ █ █▓███ █
█▌▐ █▌ ▐██▌ ███▀▀████ ██ ▐▌ ▄███████▄ █
▐▐ █▐█▄ ▄███ ▐ ▐▌ ▐█▓█▌▐▌ █ ▐▌
▀ ▐██████▓█▌ ███▄▄█▓██ ▀ █▀ " s i m p l y t h e b e s t " █
▄█ ▀█▀████▀ █▄ ▀▀▀▀▀▀▀ ▄ █▀ infusion external usered ▐▌
████▄▄▄▄ ▄▄▄██▀███ ███████ ▄▀ ▄▄ started on o2/3/98 █
▐████ ██▄▄▄▄▄▄▄▓▄▄▄██▓████▌ ▀▀▀▀▀▀▀▀▀ ▀▀▀▄▄▄▄ ▄▄▄▀
███ ▐█████▓████████▓█████ ▀▀▀▀▀▄▄▄▄▄▄▄▄▄▀▀▀▀
▀▀███▀███████▄▄███████▀▀
▄▄▄▄▄▄▄▄
▄███████████████▄▄▄▄▄▄▄▄▄▄███████████████▄
▐████████████▄█████▄ █████ █████████████▌
█████████████▀█████▀ █████ ████████████████
███████████ █▄▄▄▄▄▄▄█ ██████████████████████
████████████▐███████▌ ██████ █ █ ██████████
█████████▌▐█ ███████ n f u s i o n▌▐████████
██████████ ▀▀▀▀▀ █████ █████ █████████
}
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Program userEdit;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Uses Crt,Dos,skaShit,textUnit,genSubs,genTypes,dosMem,Control,configRt;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
{$I .\ART\USEREDIT.ART}
{$I .\ART\FADEANSI.PAS}
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Type
uSmallRec = Record
handle : Mstr;
acslevel : integer;
end;
uSmallArray = array[1..500] of uSmallRec;
uInfoRec = record
totalUsers : word;
currentUser : word;
lastUser : word;
lastPos : 12..17;
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Const
userFunc : array[1..2,1..19] of String = ((
' nick : :',' name..:......:',' pass :......:','..phone.........',
'..birth ',' aphilz ','..skillz........',' sop note ',
'..priv. note....',' acs level ','..acs flags.....',' u/d level ',
' u/d points....',' scrn lines ',' total calls ',': u/d k ratio ',
': u/d f ratio...',': jah votes ',': nah votes.....'),(
{=======================================================================}
' nick ',' name ',' pass ',' phone ',
' birth ',' aphilz ',' skillz ',' sop note ',
' priv. note ',' acs level ',' acs flags ',' u/d level ',
' u/d points ',' scrn lines ',' total calls ',' u/d k ratio ',
' u/d f ratio ',' jah votes ',' nah votes '));
{=======================================================================}
barFunc : array[1..7] of string = (
' validate ',' blacklist ',' default ',' edit sig ',' view .inf''s ',
' insert ',' quit ');
{=======================================================================}
userXY : array[1..2,1..19] of byte = (
(6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,28,28,28,28),
(8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,19,20,21,22));
{=======================================================================}
barXY : array[1..7] of byte = (2,13,25,35,46,60,69);
{=======================================================================}
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Var
uSmall : ^uSmallArray;
uInfo : uInfoRec;
uData : UserRec;
curBar : array[1..3] of word;
Last : array[1..3] of word;
curHalf : 1..3;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uInitMem;
begin
Dos_GetMem(uSmall,SizeOf(uSmall^) + 1);
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uNewUsers;
begin
loadtextscreen('temp.$$$');
skawrite('|CR|08■ |07error - run USERINIT.EXE to make new users datafile ...|CR|CR');
halt(5);
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uLoadUsers;
var uCount : 1..500;
uF : file of userRec;
begin
readcfg(false);
if not exist(cfg.datadir+'USERS') then uNewUsers;
assign(uF,cfg.datadir+'USERS.');
reset(uF);
seek(uF,1);
for uCount := 1 to fileSize(uF)-1 do begin
read(uF,uData);
uSmall^[uCount].handle := uData.Handle;
uSmall^[uCount].AcsLevel := uData.Level
end;
close(uF);
uInfo.totalUsers := uCount;
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uDrawScreens(scrn : byte);
begin
if (scrn=1) then
begin
FadeDown;
clrscr;
SavePal;
FadeWhite;
move(fade,mem[$b800:0000],sizeof(fade));
Unfade;
delay(1000);
FadeWhite;
delay(300);
Move(UserMain,mem[$b800:0000],sizeof(UserMain));
UnFade;
cursor_(false);
end;
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uDrawBars(bar : byte);
begin
if (bar=1) then
begin
gotoxy(userXY[1,last[1]],UserXY[2,last[1]]);
skawrite('|B0|07'+userFunc[1,last[1]]);
gotoxy(userXY[1,curbar[1]],UserXY[2,curbar[1]]);
skawrite('|B3|00'+userFunc[2,curbar[1]]);
end else
if (bar=2) then
begin
gotoxy(barXY[last[2]],25);
skawrite('|B0|03'+barFunc[last[2]]);
gotoxy(barXY[curbar[2]],25);
skawrite('|B3|08'+barFunc[curBar[2]]);
end;
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uSelectUser;
var uCount : word;
begin
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uSelectFunc;
var Done : boolean;
key : char;
begin
repeat
key := bioskey;
case key of
#27 : done := true;
#9 : begin
if (curHalf=1) then curHalf := 2 else curHalf := 1;
end;
#200 : begin
if (curhalf = 1) then
begin
last[1] := CurBar[1];
dec(CurBar[1]);
if (last[1]<16) and (CurBar[1]<1) then CurBar[1] := 15 else
if (last[1]>=16) and (curBar[1]=15) then curBar[1] := 19;
uDrawBars(1);
end else
if (curhalf = 2) then
begin
last[2] := curBar[2];
dec(CurBar[2]);
if (CurBar[2]<1) then CurBar[2] := 7;
uDrawBars(2);
end;
end;
#208 : begin
if (curHalf = 1) then
begin
last[1] := CurBar[1];
inc(curBar[1]);
if (last[1]<16) and (curBar[1]>15) then curBar[1] := 1 else
if (last[1]>=16) and (curBar[1]>19) then curBar[1] := 16;
uDrawBars(1);
end else
if (curHalf = 2) then
begin
last[2] := curBar[2];
inc(curBar[2]);
if (curBar[2] > 7) then curBar[2] := 1;
uDrawBars(2);
end;
end;
#205 : begin
if (curHalf=1) then
begin
Last[1] := curBar[1];
if (curBar[1]=12) then curBar[1] := 16;
if (curBar[1]=13) then curBar[1] := 17;
if (curBar[1]=14) then curBar[1] := 18;
if (curBar[1]=15) then curBar[1] := 19;
uDrawBars(1);
end else
if (curHalf = 2) then
begin
last[2] := curBar[2];
inc(curBar[2]);
if (curBar[2] > 7) then curBar[2] := 1;
uDrawBars(2);
end;
end;
#203 : begin
if (curHalf=1) then
begin
last[1] := curBar[1];
if (curBar[1]=16) then curBar[1] := 12;
if (curBar[1]=17) then curBar[1] := 13;
if (curBar[1]=18) then curBar[1] := 14;
if (curBar[1]=19) then curBar[1] := 15;
uDrawBars(1);
end else
if (curhalf = 2) then
begin
last[2] := curBar[2];
dec(CurBar[2]);
if (CurBar[2]<1) then CurBar[2] := 7;
uDrawBars(2);
end;
end;
end;
until (done=true);
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uMainProc;
begin
uInfo.currentUser := 1;
uInfo.lastUser := 1;
uSelectUser;
uSelectFunc;
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uInitProc;
begin
uInitMem;
SaveTextScreen('temp.$$$');
uLoadUsers;
uDrawScreens(1);
CurBar[1] := 1;CurBar[2] := 1;
CurHalf := 1;Last[1] := 1;Last[2] := 1;
uDrawBars(1);uDrawBars(2);
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
Procedure uTerminate;
begin
cursor_(true);
loadtextscreen('temp.$$$');
skawrite('|B0|CR|07-|08────────────|07(|15(|03infusion bbs knocka editor|15)|07)|08────────────-|07-|CR');
skawrite('|07-(c)skaboy101 & _esc_ 1998 .. (life has never been *this* good...)|CR');
skawrite('|08user #1 - '+uSmall^[1].handle);
end;
{::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::}
begin
cursor_(false);
uInitProc;
uMainProc;
uTerminate;
end.