home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 270.img / FORUM25C.ZIP / MAIN.PAS < prev    next >
Pascal/Delphi Source File  |  1989-02-11  |  3KB  |  167 lines

  1. {$R-,S-,I-,V-,B-}
  2. {$O-}
  3.  
  4. unit main;
  5.  
  6.  
  7. {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
  8.  
  9. interface
  10.  
  11. uses crt,
  12.      gentypes,
  13.      modem,
  14.      gensubs,
  15.      subs1,
  16.      subs2,
  17.      userret,
  18.      overret1,
  19.      mainr2,
  20.      about,
  21.      bulletin,
  22.      EchoNet,
  23.      configur,
  24.      database,
  25.      doors,
  26.      email,
  27.      filexfer,
  28.      mycomman,
  29.      voting,
  30.      mainmenu;
  31.  
  32. {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
  33.  
  34.  
  35. Procedure mainsysopcommands;
  36. Procedure mainmenuproc;
  37. Procedure breakout;
  38.  
  39.  
  40. {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
  41.  
  42. implementation
  43.  
  44. {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
  45.  
  46.  
  47. Procedure mainsysopcommands;
  48. VAR q:integer;
  49. begin
  50.   repeat
  51.     q:=menu ('Sysop','SYSOP','QTEANDUCIJSKVMFRZP&');
  52.     case q of
  53.       2:editoldspecs;
  54.       3:readerrlog;
  55.       4:addnews;
  56.       5:editnews;
  57.       6:delerrlog;
  58.       7:editusers;
  59.       8:settime;
  60.       9:infoformhunt;
  61.       10:showallforms;
  62.       11:viewsyslog;
  63.       12:delsyslog;
  64.       13:showallsysops;
  65.       14:makeuser;
  66.       15:readfeedback;
  67.       16:removeallforms;
  68.       17:zapspecifiedusers;
  69.       18 : PriorityPage;
  70.       19 : Convert_mail;
  71.     end
  72.   until (q=1) or hungupon
  73. end;
  74.  
  75. Procedure mainmenuproc;
  76. VAR q:integer;
  77.     Com_str : LStr;
  78. begin
  79.   Com_str := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ+-!&$%@';
  80.   repeat
  81.     if fromdoor and (returnto='P') then
  82.       Begin
  83.        doorsmenu;
  84.        ReturnTo := 'M';
  85.       End;
  86.     cursection:=mainsysop;
  87.     If (ReturnTo = ' ') OR (ReturnTo = 'M') THEN
  88.        q := menu ('Main','MAIN',Com_str)
  89.     ELSE
  90.       Begin
  91.        q := Pos(Returnto,Com_str);
  92.        If q = 0 THEN q := 17;
  93.        ReturnTo := 'M';
  94.       End;
  95.     Writeln;
  96.     case q of
  97.       1:aboutthisbbs;
  98.       2:bulletinmenu;
  99.       3:summonsysop;
  100.       4:datamenu;
  101.       5:emailmenu;
  102.       6:feedback;
  103.       7,15:offtheforum;
  104.       8:mainhelp;
  105.       9:infoform;
  106.       10:mycommand;
  107.       11:configure;
  108.       12:listusers;
  109.       13:otherbbs;
  110.       14:printnews;
  111.       16:doorsmenu;
  112.       17:;
  113.       18:;
  114.       19:showsystemstatus;
  115.       20:udsection;
  116.       21:Echo_net_mail;
  117.       22:votingbooth (false);
  118.       23:showlastcallers;
  119.       24:transfername;
  120.       25:yourstatus;
  121.       26:setlastcall;
  122.       27:changepwd;
  123.       28:;
  124.       29:requestraise;
  125.       30:showad;
  126.       31:donations;
  127.       32:mainsysopcommands;
  128.     end
  129.   until hungupon
  130. end;
  131.  
  132. VAR Exit_Save : POINTER;
  133.  
  134. {$F+}
  135.  
  136. Procedure breakout;
  137. begin
  138.   ExitProc := Exit_save;
  139.   if (erroraddr=nil) and (exitcode=e_controlbreak) then begin
  140.     textcolor (7);
  141.     textbackground (0);
  142.     updateuserstats (false);
  143.     writeln (direct,' [ Break ]');
  144.     writereturnbat;
  145.     ensureclosed;
  146.     window (1,1,80,25);
  147.     gotoxy (1,25);
  148.     clreol;
  149.     if not carrier then dontanswer
  150.   End;
  151.  
  152. End;
  153.  
  154.  
  155. {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
  156.  
  157. {initialization}
  158.  
  159. {/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\}
  160.  
  161.  
  162. Begin
  163.   Exit_Save := ExitProc;
  164.   ExitProc := @breakout;
  165. End.
  166.  
  167.