'Cuz, I havnt worked it in years, if someone want to take menu.pas for ideas. If ppl want I can try to get vp/2 dosshell working again.

--chris
http://nxdos.sourceforge.net/

John Hupp wrote:

Picking up on this thread, which is of continuing interest, at least to me!

I said originally that I was looking for suggestions/opinions regarding freeware or open source DOS GUI interfaces. That I was familiar with

{$A+,B-,D+,E+,F+,G+,I+,L+,N+,O+,P+,Q+,R+,S+,T+,V+,X+,Y+}
{$M 65520, 65520, 131040}
(* MENU.PAS    - An eXecmenu for Virus Park (c) 1993-2002 DMSoftware, Ltd.
 * ------------- By: [EMAIL PROTECTED];
 *   see history.doc
 * ---------------------------------------------------------------------------
 *)
uses dos, crt, overlay, ovrstart,
     sfx, sbdsp,                                          { sound support }
     mousetbx, sysid, mtbwin, vpsystem,                        { vp/2 OS3 }
     dsansi, inimgr,
     logtool, myextras, mytoolbx;
     {$O dsansi} {$O inimgr} {$O logtool} {$O myextras} {$O mytoolbx}
const {$I c:\mysrc\compiled.inc}     { $I c:\mysrc\warez\sysmenu~.inc}
var
   oldmin, lastkeyp_Min : word;
   mfp, mainmenu, Submenu, advancedsnd : Integer;
   registered, welc, fades, FX, clockbeep, sounddevice, Quit : Boolean;
   { temporary measure until the system is runable feb 14 2002 }

procedure playsoundfx(sndfx:string);
begin
     if advancedsnd = 1 then
        begin
             if not(on_floppy) then
                Spawn_it(externalplayer,soundeffect(sndfx),true);
       end else
       begin
            {playvocwav(....)}
            if pos('.VOC',soundeffect(sndfx)) > 0 then
            if not(playvoc(soundeffect(sndfx))) then beep;
       end;
end;

function Closeup(errlvl : byte; mstr : string) : boolean;
var ctr, a, c, i : integer;
    crap : string;
    shutdowntype : byte; {0 = NORMAL.. to dos
                          1 = REBOOT,
                          2 = SHUTDOWN AND RELOAD
                          3 = LOCK SYSTEM (no exit)
                          4 = PUREDOS }
Begin
     closeup := true;
     shutdowntype := 0;
     crap := get_shutdownnow_setting('EXIT');
     if (crap = '') or (crap = 'NORMAL') then shutdowntype := 0 else
     if crap = 'REBOOT' then shutdowntype := 1 else
     if crap = 'RESTART' then shutdowntype := 2 else
     if crap = 'LOCK' then shutdowntype := 3 else
     if crap = 'PUREDOS' then shutdowntype := 4;
     if shutdowntype =  1 then mytoolbx.boot($0000);
     if shutdowntype =  2 then { ... restart system ... };
     if shutdowntype =  3 then
        begin
             closeup := false;
             exit;
        end;
     if (shutdowntype =  0) or
        (shutdowntype =  4) then { ... pure dos mode ... }
     if (errlvl = exitnum[3]) and (shutdowntype = 0) then
        begin
             i:=mb('The system shell is about to shutdown!   '+
                    'Are you sure you wish to commence with  '+
                    'this course of action?                  ',
                    'SHUTDOWN');
             if i = 3 then msgstatus('! Select YES to shutdown or CANCEL to 
duuh cancel');
             if i = 2 then msgstatus('> shutdown cancelled.');
             if i = 1 then msgstatus('> Now exiting... ');
             delay(800);
             if (i = 2) or (i = 3) then
                begin
                     closeup := false;
                     exit;
                end;
        end;
     gotoxy(1, rows);
{     if (fileexist(scriptspath+'\shutdown.now')) and
        (not shutdowntype = 4) then deletefile(scriptspath+'\shutdown.now'); }
     If fileexist(scriptspath+'\shutdown.x2c') then
        begin
             writeln(' { run the shutdown script }');
        end;
     If (FX) Then
        begin
             SwitchVmode(3);
             gotoxy(1, rows);
        end;
     If (Mouse.found>0) then hidemouse;
     if (errlvl = exitnum[1]) and (fades) then fadeout(5);
     textattr:=$07;
     restorescreen;
     forecolor(7);
     rearcolor(0);
     writeln;
     if errlvl=exitnum[1] then ;
     if errlvl=exitnum[2] then ;
        begin
             beep;
             pipeln('!15System Shell has exited with an !12LOGIN FAILURE!14!  
');
             pipeln('!01---------------------------------------------- ');
             pipeln('!03Contact the Sys-Admin if you believe this an ');
             pipeln('!03error. System will now be in !11locked!03 mode!01.');
             pipeln('!01---------------------------------------------- ');
             pipeln('!04Look at you hacker, you pathetic creature of ');
             pipeln('!04meat and bone, running though my cooridors. ');
             pipeln('!04What makes you think you can hack *me*, a ');
             pipeln('!04a master rage of machine ? ');
             writeln;
             pipeln('!15!!! !10ACCESS DENIED!15!!! !08{!07ERRORÄ505!08} ');
             writeln;
        end;
     if errlvl=exitnum[3] then writeln;
     if errlvl=exitnum[4] then writeln;
     if errlvl=exitnum[5] then
        begin
             beep;
             pipeln('!15System Shell has exited with an !12FATAL ERROR!14!');
             pipeln('!01----------------------------------------------');
             pipeln('!03If the Cyberdeck is behaving un-stable you may');
             pipeln('!03wish to issue the !11reboot !03command, to 
restart!01..');
             writeln;
        end;
     if errlvl=exitnum[6] then
        begin
             beep;
             pipeln('!15System Shell has exited with an !12SYSTEM ERROR!14!');
             pipeln('!01----------------------------------------------');
             pipeln('!03If the Cyberdeck is behaving un-stable you may');
             pipeln('!03wish to issue the !11reboot !03command, to 
restart!01..');
             writeln;
        end;
    gotoxy(1,rows); {wherey}
    if (advancedsnd = 1) then
       begin
            writeln;
            if (errlvl = exitnum[2]) then playsoundfx('SYSTEMHACKER');
            if (errlvl = exitnum[3]) then playsoundfx('SYSTEMEXIT');
            if (errlvl = exitnum[4]) then playsoundfx('SYSTEMBATCH');
            if (errlvl = exitnum[5]) then playsoundfx('SYSTEMFATAL');
            if (errlvl = exitnum[6]) then playsoundfx('SYSTEMERROR');
       end;
    if (fades) then fadein(5);
     gotoxy(1,rows); {wherey}
     pipeln('|12'+sys.name+' GUI |08(|04gooie|08) |15.|07.|08. |15 '+mstr);
     writeln;
     If (NOT(registered)) or (is_switch(false,'SHAREWARE')) then
        begin
             Centerwin(0, 62, 15, 11, 1, 1,
                       sys.name+' '+wtover(sys.version)+' Copyright (c) 
DataMunchers; '+compiled,
                       'Unregistered Shareware Copy',true);
             forecolor(9); Writeln; writeln;
             Writeln(' If this works for you, please register with the author: 
');
             writeln;
             Writeln(' Datamunchers, ultd.       Portable : (916)-541-1222');
             Writeln(' Fidonet BBX: 1:203/4269.0 +1.916.381.3250 (8N1 24/7)');
             Writeln(' Internet: [EMAIL PROTECTED] http://tkp.darktech.org');
             writeln;
             Writeln(' Please print out the REGISTER.TXT file if you want to    
  ');
             Writeln(' to receive a registered package of the latest version of 
  ');
             Writeln(' '+sys.name+'.');
             Writeln;
             pausedelay(false, '','Y', 5000);
             closewindow;
             rearcolor(0);
             beep;
             pipeln('|03Businesses, government agencies and institutions 
require a registered version.');
             pipeln('This is an |11*UNREGISTERED*|03 shareware copy.  This 
software should be registered!');
             writeln;
             writeln('Shell-menu down...  don''t forget to register!  =")');
        end;
     checkbreak := true;
{      gettextattr(1);}
     Showcursor;
     writeln;
     { undoheap; }
     System.halt(errlvl);
End;

procedure commandlinehelp;
begin
     writeln(' í Starts up the '+sys.name+' shell menu program. í');
     writeln;
     writeln(' ',paramstr(0),' [switches:<options>] ');
     writeln;
     writeln(' /BW:[LCD]              black and white color scheme.    ');
     writeln(' /MOUSE:[ON, OFF]       enables/disables the mouse.      ');
     writeln(' /WM:[ON,OFF]           enables/disables welcome messie. ');
     writeln(' /T:[25, 50]            specifies textmode.              ');
     writeln(' /FX:[ON, OFF]          enable fancy fadeing effects.    ');
     writeln(' /SELECT:[##]           auto-select a registry option.   ');
     writeln(' /SCRIPT:[filename.ext] run a script upon startup        ');
     writeln(' /BOOTSCRIPT:[filename] run a script upon bootup         ');
     writeln(' /SOUNDDEVICE           toggles on/off the ADLIB device  ');
     writeln(' /CLOCKTICK             turns on clock-tick. (annoying)  ');
     writeln(' /LOGIN                 login as a particular user.      ');
     writeln(' /GETPW                 internal use only.               ');
     writeln;
     writeln(' Some switches and or options may not be implemented.');
     writeln;
     highvideo;

     lowvideo;
     system.halt(exitnum[3]);
end;

procedure displaydatetime;
var  clrtt : word;
     c : integer;
begin
     if (clockbeep) { and (min - 1 = oldmin)} then
        begin {digital clock}
             if not(sounddevice) then blip else
                begin
                     FOR c := 1 TO 5 do
                         begin
                              if keypressed then break;
                              adlsound(50); delay(20);
                              adlsound(1600); delay(10);
                              adlsound(40); delay(40);
                              adlsound(3000); delay(10);
                              adlsound(50); delay(20);
                              adlsound(0); delay(10);
                         end;
                     adlnosound;
                end;
        end;
     clrtt := textattr;
     txt_color(configdata.statlne_Fc, configdata.statlne_Bk);
     gotoxy(cols - 11, rows);
     if not(sounddevice) then write('PC') else
         begin
              if advancedsnd = 0 then write('AD') else write('SB')
         end;
     gotoxy(cols - 9, rows);
     write(formatdatetime);
     textattr := clrtt;
{     Fastwrite(cols - 9, rows, $17, nk);}
end;

Procedure Initialize_screen; {Init_Scr}
Var ctr, one , two, bd1, bdt : Integer;
    bkd, fooo : text;
    dt   : datetime;
    t3, t2, bkdrp : string;
begin
     txt_color(7,0); Clrscr; One := rows div 2; Two := One + 1; t_winhdr(1);
     {display backdrop}
     { --------------------------------------------------------------------- }
     t3 := readini(systempath+'DISPLAYS\BACKDROP.INI','MAXBACKDROPS','');
     val(t3, bdt, ctr);
     if ctr > 0 then bdt := 1
        else ;
     bd1 := random(bdt);
     if bd1 = 0 then inc(bd1,1);
     t3 := 
readini(systempath+'DISPLAYS\BACKDROP.INI','BACKDROP'+l_zero(bd1,2),'');
     { --------------------------------------------------------------------- }
     bkdrp := displayfiles + t3;
     If Getenv('ANSI') = 'NO' then bkdrp := bkdrp + '.ASC' else bkdrp := bkdrp 
+ '.ANS';
     If fileexist(bkdrp) then
        begin
             {for ctr := 1 to length(t2) do crt_ansi(t2[ctr]);}
             Assign(bkd, bkdrp);
             {$I-} Reset(bkd); {$I+}
             if ioresult <> 0 then
              else
               begin
                    while not eof(bkd) do
                          begin
                               readln(bkd, t2);
                               _Ansiwrite(t2 + #13 + #10);
                          end;
               end;
             close(bkd);
        end else
        begin {defualt backdrop} {running default configuration!}
             Fil_scr('±', rows, 80, 0, 7); {²±°} {8,7} {gotoxy(1,25);}
             txt_color(8, 7);
             center(' ',''+sys.name +#32+ wtover(sys.version)+'', 1, rows div 
2, 80, FALSE);
             center(' ','Copyright (c) '+compiled+' DataMunchers, Ltd.',1, rows 
div 2 + 1,80,FALSE);
             txt_color(7, 0);
        end;
     {titlebar}
     Gotoxy(1,1); txt_color(configdata.deskt_fc, configdata.deskt_bk); clreol;
     forecolor(configdata.deskt_fc); Write(' [');
     forecolor(configdata.deskt_fc + 7); Write('þ');
     forecolor(configdata.deskt_fc); Write('] ');
     forecolor(configdata.deskt_fc + 7); write(' Desktop ');
     forecolor(configdata.deskt_fc); write('- ');
     forecolor(configdata.deskt_fc + 7);
     If configdata.titlestr = '' then for ctr := wherex to 80 do write('Ä') else
        write(configdata.titlestr);
     {statusline etc}
     {xy 1,2 For i := 1 to 80 do Write('Ä');} {8,7}
     {For i := 1 to 80 do Write('Ä');}  {5,0}
     {System Intergrator}
     {|10S|02ystem   |10F|02ile   |10M|02enus   |10H|02elp}
     txt_color(configdata.statlne_fc, configdata.statlne_bk);
     Gotoxy(1,rows); clreol;
     gotoXY(2, rows); write('³'); gotoXY(10, rows); write('³');
     for ctr := 1 to 57 do write(#32); write('³');
     {-----------------------------------------------------------------}
     rearcolor(configdata.statlne_bk);
     gotoxy(4,rows);
     highvideo;
     forecolor(15);
     write('S');
     lowvideo;
     forecolor(configdata.statlne_fc);
     write('tart');
     {-----------------------------------------------------------------}
     If (Mouse.found>0)then ShowMouse;
     displaydatetime;
end;
function login:integer;
var done:boolean; i, mode:byte; ch:char; user, password:string[40];
begin
     user:=''; password:='';
     savescreen; txt_color(14,3); clrscr;
     gotoxy(1,1); write('NX-DOS v8');
     gotoxy(1,2); hrline(0, 11, 3, 'Ä', #00);
     gotoxy(1,rows-1); hrline(0, 11, 3, 'Ä', #00);
     gotoxy(cols-21,rows); write('Press ALT-L to login');
     done:=false; mode:=0;
     centerwin(0, 50, 6, 15, 7, 9, 'login', '', true);
     gotoxy(1,2); clreol; write('Username: ');
     gotoxy(1,4); clreol; write('Password: ');
     while not(done) do
           begin
                if keypressed then
                   begin
                        if mode =1 then
                           begin
                                gotoxy(11,2); clreol; write(user);
                           end;
                        if mode =2 then
                           begin
                                gotoxy(11,4); clreol;
                                if ord(password[0])>0 then for i := 1 to 
ord(password[0]) do write('*');
                           end;
                        ch := getkey;
                        if not(scankey) then
                           begin
                                case ch of
                                     #13 : begin
                                                if mode=1 then mode:=2 else
                                                if mode=2 then mode:=3;
                                           end;
                                     else begin
                                          if mode=1 then user:=user+ch else
                                          if mode=2 then password:=password+ch;
                                          end;
                                end; { case }
                           end else
                           begin
                                case ch of
                            {ALT-S}  #31 : mode:=31;
                            {ALT-L}  #38 : mode:=38;
                                end;
                           end; { scankey }
                   end; { keyp }
                done:=boolean(mode>2);
           end;
     restorescreen;
     login:=mode;
end;

procedure init;      {VPSMNU1993}
var templong : longint;
    i, ctr, code : integer;
    t2, t1 : string;
    w1, w2, w3 : word;
begin
     { t2 := paramstr(0);  delete(t2, length(t2) - 3, 4); }
     {  old ovrlay code init moved to ovrstart - oct 2000 }
     randomize;
     checkbreak := false;
     initfade;
     vpsysinit;
     Hidecursor;
     { gettextattr(0);}
     t_winhdr(1);
     txt_color(7,0);
     writeln;
     coolWriteln(sys.name+', v.'+wtover(sys.version)+', RELEASE SOFTWARE',2);
     coolWriteln('        Copyright (c) '+compiled+' by Datamunchers, ltd.',2);
     writeln;
     writeuptime;
     bullet('|12þ','|15'+machinemodel,true);
     writeln;
     write('þ Central processor is a 80x',CPUTYPE,'86 CPU with ');
     if ndpdetected = 0 then write('no math coprocessor') else
        write('a ',ndpdetected,'87');
     writeln(' installed.');
     writeln;
     writeln('þ System Bootstrap, DOS Version 
',lo(dosversion),'.',hi(dosversion),' SOFTWARE');
     writeln('  (system restarted by error - Zero Divide, PC 0x142F8)');
     writeln;
     if get_shutdownnow_setting('EXIT')='PUREDOS' then
        Closeup(exitnum[3],'System is configured only DOS prompt operation 
mode.');
     shutdownnow('NORMAL','-');
     Coolwriteln(' úúú Loading system module(s) úúú',4);
     writeln;
     { --- load and configure modules --- }
     sounddevice := false;
     advancedsnd := 0; {     configspath+'SYSTEM.INF' }
     if pos('ADLIB',readini(inifile(''), 'BLASTER_HW', ''))=1 then sounddevice 
:= true;
     if pos('XWAVE',readini(inifile(''), 'BLASTER_HW', ''))=1 then advancedsnd 
:= 2 else advancedsnd := 1;
     if advancedsnd = 2 then
        begin
             write('Sound Blaster has ');
             if getenv('BLASTER') = '' then
                begin
                     t2 := readini(inifile(''), 'BLASTER_HW', '');
                     val(t2[pos('IRQ',t2)+4], w1, code);
                     if code > 0 then w1 := 5;
                     t1 := t2[pos(' PORT',t2)+5] + t2[pos(' PORT',t2)+6] +
                           t2[pos(' PORT',t2)+7];
                     w2 := hextonum(t1);
                     if w2 = 0 then w2 := $220;
                     val(t2[pos(' DMA',t2)+4], w3, code);
                     if code > 0 then w3 := 1;
                end;
             if initialize_sb(w1, w2, w3) = false then
                begin
                     write('NOT ');
                     advancedsnd := 0
                end;
             writeln('been initialized.');
        end;
     If is_switch(false, 'SOUNDDEVICE') then tog(sounddevice);
     { loadconfig; }
     txt_color(7,0);
     If is_switch(false, 'BW') then
         begin
              if fup(switchdata(false, 'BW')) = 'LCD' then
                 begin
                      configdata.deskt_fc := 7; configdata.deskt_bk := 1;
                      configdata.menu_fc := 7;  configdata.menu_bk := 1;
                      configdata.statlne_fc := 7; configdata.statlne_bk := 1;
                 end else
                 begin
                      configdata.deskt_fc := 8; configdata.deskt_bk := 7;
                      configdata.menu_fc := 8;  configdata.menu_bk := 7;
                      configdata.statlne_fc := 8; configdata.statlne_bk := 7;
                 end;
        end;
     If (is_switch(false, 'CLOCKTICK')) then clockbeep := true else clockbeep 
:= false;
     If (configdata.xfx) or (is_switch(false, 'T')) then
        begin
             FX := true;
             t1 := switchdata(false, 'T');
             if t1 = '25' then FX := false else FX := true;
        end;
     If (configdata.fades) or (is_switch(false, 'FX')) then
        begin
             fades := true;
             if is_switch(false, 'FX') then
                if fup(switchdata(false, 'FX')) = 'ON' then else fades := false;
        end;
     If (configdata.welcome) or (is_switch(false,'WM')) then
        begin
             welc := true;
             if is_switch(false, 'WM') then
                if fup(switchdata(false, 'WM')) = 'ON' then else welc := false;
        end;
     If (configdata.Mouse) or (is_switch(false, 'MOUSE')) then
        begin   {9 3 9}   {nomouse}
             write('þ initializing mouse... ');
             Mouse.found := 0;
             If is_switch(false, 'MOUSE') then
                begin
                     if fup(switchdata(false, 'MOUSE')) = 'ON' then initmouse;
                end else initmouse;
             if NOT(initmouse) then writeln(#13,#10,#07,' *** MOUSE NOT 
INSTALLED OR DETECTED *** ') else
                begin
                     highvideo; Writeln(' OK.'); lowvideo; mouseinfo;
                end;
        end;
     { --- calculate user registration --- }
     registered := false;
     templong := templong xor templong;
     for ctr := 1 to length(configdata.username) do
         begin
              templong := templong + (ord(configdata.username[ctr]) * 666);
         end;
     if templong = configdata.userkeyn then registered := true;
     { ---------------------------------- }
     txt_color(7,0);
     writeln;
     writeuptime;
     writeln(getuptime);
     writeln;
     write('This software is licensed to .: ');
     if registered then
        begin
             writeln(configdata.username);
             write('SERIAL 
NUMBER:KW-',tohex(configdata.userkeyn),'-',tohex(8342),' SLT:');
        end else
        begin
             writeln('UNREGISTERED');
             write('SERIAL NUMBER:KW-UNREG-XX SLT:');
        end;
     for i := 1 to 10 do write(chr(random(10)+48));
     write('PV'); for i := 1 to 3 do write(chr(random(10)+48)); writeln;
     delay(500);
     If FX Then SwitchVmode(2) { 50 } else { 25; }
     writeln;
     { -------------------------------------------------- }
     if configdata.beta then
        begin
             centerwin(0, 70, 8, 14, 4, 2, ''+warningmsg[0],' í ANyKeY í 
',true);
             forecolor(15);
             writeln;
             writeln;
             writeln;
             for I := 1 to 4 do writeln(#32,#32,warningmsg[I]);
             writeln;
             pausedelay(false, '', 'Y', 3000);
             closewindow;
        end;
     if fades then fadeout(5);
     clrscr;
     Initialize_screen;
     if fades then fadein(5);
     If welc then Welcome;
     If is_switch(false, 'LOGIN') then writeln(login);
     if is_switch(false, 'CORNFUSED') then system.halt(0);
end;
begin
     init;
     commandlinehelp;


     if Closeup(exitnum[3],'BYE.... And thanxs for all the PhiSH!! :-) ') = 
false then ;
     { Buh-buh-Bye.. :-) CuM AgAiN L8tr! }
end.

procedure loginsession;
var tmps, instr : string;
    pswrdt, ictr, ic : integer;
    pswb : boolean;
    uurc : longint;
    ufpos: longint;
    logostr, sitepassword, user, PSW : string;
    userinf : text;
    welcometext : array[1..10] of string[70];
    dialogtexts : array[1..8] of string[60];
begin
     ufpos := 0;
     sitepassword := readini(configspath+'SYSTEM.INF','SITEPASSWORD','');
     If returnerror <> 0 then
        closeup(exitnum[5],'FATAL ERROR (Init-read access upon BOOTUP)');
     {-------------------------------------------------------------------}
     dialogtexts[1] := readini(configspath+'SYSTEM.INF','WARNINGMSG','');
     dialogtexts[2] := readini(configspath+'SYSTEM.INF','SITENAME','');
     dialogtexts[3] := readini(configspath+'SYSTEM.INF','DIALOG0','');
     dialogtexts[4] := readini(configspath+'SYSTEM.INF','DIALOG1','');
     dialogtexts[5] := readini(configspath+'SYSTEM.INF','DIALOG2','');
     dialogtexts[6] := readini(configspath+'SYSTEM.INF','DIALOG3','');
     dialogtexts[7] := readini(configspath+'SYSTEM.INF','DIALOG4','');
     dialogtexts[8] := readini(configspath+'SYSTEM.INF','DIALOG5','');
     {-------------------------------------------------------------------}
     welcometext[1] := readini(configspath+'SYSTEM.INF','WELCOME1','');
     welcometext[2] := readini(configspath+'SYSTEM.INF','WELCOME2','');
     welcometext[3] := readini(configspath+'SYSTEM.INF','WELCOME3','');
     welcometext[4] := readini(configspath+'SYSTEM.INF','WELCOME4','');
     welcometext[5] := readini(configspath+'SYSTEM.INF','WELCOME5','');
     welcometext[6] := readini(configspath+'SYSTEM.INF','WELCOME6','');
     welcometext[7] := readini(configspath+'SYSTEM.INF','WELCOME7','');
     welcometext[8] := readini(configspath+'SYSTEM.INF','WELCOME8','');
     welcometext[9] := readini(configspath+'SYSTEM.INF','WELCOME9','');
     welcometext[10] := readini(configspath+'SYSTEM.INF','WELCOME10','');
     {-------------------------------------------------------------------}
     if fileexist(displayfiles+'VPSYS'+'.ANS') = true then
        begin
             assign(_logofile, displayfiles+'VPSYS'+'.ANS');
             {$I-} Reset(_logofile); {$I+}
             if ioresult = 0 then
                begin
                     while not eof(_logofile) do
                           begin
                                readln(_logofile, tmps);
                                _Ansiwrite(tmps + #13 + #10);
                           end;
                     close(_logofile);
                end else ;
         end else
         begin
              If fileexist(displayfiles+'VPSYS'+'.ASC') = true then
                 begin
                      assign(_logofile, displayfiles+'VPSYS'+'.ASC');
                      {$I-} Reset(_logofile); {$I+}
                      if ioresult = 0 then
                         begin
                              while not eof(_logofile) do
                                    begin
                                         readln(_logofile, tmps);
                                         _Ansiwrite(tmps + #13 + #10);
                                    end;
                              close(_logofile);
                         end else ;
                 end;
         end;
     writeln;
     for ctr := 1 to 10 do writeln('        ',welcometext[ctr]);
     writeln;
     msgstatus('!'+dialogtexts[1]);
     pswrdt := 0;
     pswb := false;
     processmusicfile;
     popwindow(4,9,76,18,configdata.deskt_fc, 
configdata.deskt_bk,2,''+dialogtexts[3],''+dialogtexts[2],True);
     forecolor(15);
     writeln;
     for ctr := 4 to 8 do writeln('        ',dialogtexts[ctr]);
     assign(usersfile, userfile);
     {$I-} reset(usersfile); {$I+}
     if ioresult > 0 then
        begin
             closewindow;
             closewindow;
             textbackground(0);
             closeup(251,'|12SYSTEM ERROR |08(|08userfile open error|07)');
        end;
     uurc := filesize(usersfile);
     repeat
           popwindow(20, 17, 60, 19, configdata.deskt_fc, configdata.deskt_bk, 
2,'login','',True);
           showcursor;
           user := '';
           user := getdata('',14,3,39,'');
           hidecursor; closewindow;
           PSW := '';
           PSW := getpassword('PASSWORD');
           if user = '' then user := 'NoFuckingaround';
           if PSW  = '' then PSW  := 'NoFuckingaround';
           seek(usersfile, 0);
           while NOT Eof(usersfile) do
                 begin
                      read(usersfile, users);
                      if is_switch('debug') = true then 
writeln('"',users.accountname,'|',users.password,'"');
                      if (user=users.accountname) or
                         (user=users.username) then
                         begin
                              ufpos := filepos(usersfile);
                              break;
                         end;
                 end;
           if is_switch('debug') = true then writeln('"',PSW,'"');
           If PSW = users.password then
              begin
                   pswb := true;
                   centerwin(0, 24, 2, configdata.deskt_fc, 
configdata.deskt_bk, 2,'','',True);
                   forecolor(14);
                   pipe(' %14!!!%11ACCESS ACCEPTED%14!!!');
                   Delay(500); closewindow;
                   log(user+' LOGGED IN; {'+cryptpw(0, PSW)+'}');
              end else
              begin
                   pswb := false;
                   centerwin(0, 24, 2, 14, 4, 2,'*ACCESS DENIED*','',True);
                   write('  ! HACKER WANNABE ! ');
                   Delay(1050); closewindow;
                   log('HACKER=>'+user+'#'+PSW);
              end;
           inc(pswrdt,1);
     until (pswrdt = 3) or (pswb = true);
     close(usersfile);
     for ctr := 1 to 2 do closewindow;
     if (pswrdt = 3) or (pswb = false) then
        begin
             closeup(exitnum[2],'|12LOG-IN FAILURE!15!')
        end
        else statusline(rows,15,4,'!  '+user+' ÷LOGGED IN÷ ');
     hidecursor;
     assign(userinf, userspath+'user.inf');
     rewrite(userinf);
     str(users.accesslevel, tmps);
     writeln(userinf,'; user.inf - user login information... ');
     writeln(userinf,'SHELL=',users.commandsh);
     writeln(userinf,'HOMEDIR=',users.homedir);
     writeln(userinf,'SECURITYLEVEL=',tmps);
     writeln(userinf,'U_NAME=',users.accountname);
     writeln(userinf,'ULOGIN=',users.username,'|#',l_zero(ufpos));
     writeln(userinf,'UPASSWORD="',cryptpw(0,users.password),'"');
     writeln(userinf,'; Just *try* and hack it!! You wannabe...');
     writeln(userinf,'; This is the end ! :-).');
     close(userinf);
end;
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to