This commit is contained in:
mysticbbs 2012-08-12 05:26:29 -04:00
parent 3b276e968e
commit 3cf92c691a
9 changed files with 119 additions and 85 deletions

View File

@ -4551,3 +4551,16 @@
SyncTerm
SEXYZ
NetRunner
+ The file directory editor is now available in the standard file listing.
In the past it only worked in the lightbar file listing. Whoops. The
hotkey is E if you have SysOp access.
! File list downloader was not properly allowing a download after the list
was created.
+ File list compiler now only adds the filebase header/footer to the list
if the filebase has files listed.
+ File list compiler now uses megabytes instead of kilobytes in the file
base summary footer.

View File

@ -158,14 +158,14 @@ Begin
Form.AddDate ('A', ' Last Call' , 7, 7, 23, 7, 14, @LastCall, Topic + 'Date of last call (MM/DD/YY)');
Form.AddLong ('C', ' Calls' , 7, 8, 23, 8, 14, 7, 0, 9999999, @U.Calls, Topic + 'Total number of calls to the BBS');
Form.AddWord ('L', ' Calls Today' , 7, 9, 23, 9, 14, 5, 0, 65000, @U.CallsToday, Topic + 'Total number of calls today');
Form.AddLong ('D', ' Downloads' , 7, 10, 23, 10, 14, 7, 0, 9999999, @U.DLs, Topic + 'Total number of downloads');
Form.AddWord ('D', ' Downloads' , 7, 10, 23, 10, 14, 7, 0, 65000, @U.DLs, Topic + 'Total number of downloads');
Form.AddWord ('T', ' DLs Today' , 7, 11, 23, 11, 14, 5, 0, 65000, @U.DLsToday, Topic + 'Total downloads today');
Form.AddLong ('W', ' DL KB' , 7, 12, 23, 12, 14, 10, 0, 2000000000, @U.DLk, Topic + 'Total downloads in kilobytes');
Form.AddLong ('K', ' DL KB Today' , 7, 13, 23, 13, 14, 10, 0, 2000000000, @U.DLkToday, Topic + 'Downloads in kilobytes today');
Form.AddLong ('U', ' Uploads' , 7, 14, 23, 14, 14, 10, 0, 2000000000, @U.ULs, Topic + 'Total number of uploads');
Form.AddLong ('B', ' Upload KB' , 7, 15, 23, 15, 14, 10, 0, 2000000000, @U.ULk, Topic + 'Total uploads in kilobytes');
Form.AddLong ('M', ' Msg Posts' , 7, 16, 23, 16, 14, 10, 0, 2000000000, @U.Posts, Topic + 'Total number of message posts');
Form.AddWord ('E', ' E-Mails' , 7, 17, 23, 17, 14, 5, 0, 65000, @U.Emails, Topic + 'Number of e-mails sent');
Form.AddLong ('E', ' E-Mails' , 7, 17, 23, 17, 14, 5, 0, 65000, @U.Emails, Topic + 'Number of e-mails sent');
Form.AddLong ('I', ' File Ratings' , 7, 18, 23, 18, 14, 10, 0, 2000000000, @U.FileRatings, Topic + 'Total file ratings');
Form.AddLong ('N', ' File Comments' , 7, 19, 23, 19, 14, 10, 0, 2000000000, @U.FileComment, Topic + 'Total file comments');
Form.AddDate ('P', ' Last PW Date' , 7, 20, 23, 20, 14, @U.LastPWChange, Topic + 'Date of last password change');

View File

@ -2,8 +2,6 @@ Unit bbs_FileBase;
{$I M_OPS.PAS}
{$MODESWITCH NESTEDPROCVARS-}
Interface
Uses
@ -619,18 +617,20 @@ Function TFileBase.ExportFileList (NewFiles : Boolean; Qwk: Boolean) : Boolean;
Var
TF : Text;
DF : File;
A : Byte;
Count : Byte;
Temp : String[mysMaxFileDescLen];
Str : String;
AreaFiles : Integer;
AreaSize : LongInt;
AreaFiles : LongInt;
AreaSize : Cardinal;
TotalFiles : LongInt;
Begin
If NewFiles Then Begin
If Qwk Then Temp := 'newfiles.dat' Else Temp := 'newfiles.txt';
Session.io.OutFullLn (Session.GetPrompt(219));
End Else Begin
Temp := 'allfiles.txt';
Session.io.OutFullLn (Session.GetPrompt(220));
End;
@ -645,7 +645,9 @@ Begin
While Not Eof(FBaseFile) Do Begin
Read (FBaseFile, FBase);
If Session.User.Access(FBase.ListACS) Then Begin
If Not Session.User.Access(FBase.ListACS) Then Continue;
Session.io.OutFull (Session.GetPrompt(222));
GetFileScan;
@ -653,14 +655,6 @@ Begin
AreaFiles := 0;
AreaSize := 0;
WriteLn (TF, '');
WriteLn (TF, '.-' + strRep('-', Length(strStripPipe(FBase.Name))) + '-.');
WriteLn (TF, '| ' + strStripPipe(FBase.Name) + ' |');
WriteLn (TF, '`-' + strRep('-', Length(strStripPipe(FBase.Name))) + '-''');
WriteLn (TF, '.' + strRep('-', 77) + '.');
WriteLn (TF, '| File Size Date Description |');
WriteLn (TF, '`' + strRep('-', 77) + '''');
Assign (FDirFile, Config.DataPath + FBase.FileName + '.dir');
{$I-} Reset (FDirFile); {$I+}
If IoResult = 0 Then Begin
@ -676,16 +670,28 @@ Begin
If FDir.Flags And FDirDeleted = 0 Then Begin
Inc (TotalFiles);
Inc (AreaFiles);
Inc (AreaSize, FDir.Size DIV 1024);
Inc (AreaSize, (FDir.Size DIV 1024) DIV 1024);
If AreaFiles = 1 Then Begin
WriteLn (TF, '');
WriteLn (TF, '.-' + strRep('-', Length(strStripPipe(FBase.Name))) + '-.');
WriteLn (TF, '| ' + strStripPipe(FBase.Name) + ' |');
WriteLn (TF, '`-' + strRep('-', Length(strStripPipe(FBase.Name))) + '-''');
WriteLn (TF, '.' + strRep('-', 77) + '.');
WriteLn (TF, '| File Size Date Description |');
WriteLn (TF, '`' + strRep('-', 77) + '''');
End;
WriteLn (TF, FDir.FileName);
Write (TF, ' `- ' + strPadL(strComma(FDir.Size), 11, ' ') + ' ' + DateDos2Str(FDir.DateTime, Session.User.ThisUser.DateType) + ' ');
Seek (DF, FDir.DescPtr);
For A := 1 to FDir.DescLines Do Begin
For Count := 1 to FDir.DescLines Do Begin
BlockRead (DF, Temp[0], 1);
BlockRead (DF, Temp[1], Ord(Temp[0]));
If A = 1 Then WriteLn (TF, Temp) Else WriteLn (TF, strRep(' ', 27) + Temp);
If Count = 1 Then WriteLn (TF, Temp) Else WriteLn (TF, strRep(' ', 27) + Temp);
End;
End;
End;
@ -697,11 +703,13 @@ Begin
SetFileScan;
Str := 'Total files: ' + strI2S(AreaFiles) + ' (' + strI2S(AreaSize) + 'k)';
If AreaFiles > 0 Then Begin
Str := 'Total files: ' + strI2S(AreaFiles) + ' (' + strI2S(AreaSize) + 'mb)';
WriteLn (TF, '.' + strRep('-', 77) + '.');
WriteLn (TF, '| ' + strPadR(Str, 76, ' ') + '|');
WriteLn (TF, '`' + strRep('-', 77) + '''');
End;
End Else
Session.io.PromptInfo[2] := '0';
@ -711,7 +719,6 @@ Begin
Session.io.OutBS (Screen.CursorX, False);
Session.io.OutFullLn (Session.GetPrompt(223));
End;
End;
Close (FBaseFile);
Close (TF);
@ -1136,7 +1143,7 @@ Begin
While Not Eof(ProtocolFile) Do Begin
Read (ProtocolFile, Protocol);
If Protocol.Active And (Protocol.Batch = Batch) And (Protocol.OSType = OSTYpe) Then Begin
If Protocol.Active And (Protocol.Batch = Batch) And ((Protocol.OSType = OSTYpe) or (Protocol.OSType = 3)) Then Begin
Keys := Keys + Protocol.Key;
Session.io.PromptInfo[1] := Protocol.Key;
@ -2015,6 +2022,31 @@ Var
End;
End;
Procedure DoEditor;
Var
SavedPos : LongInt;
Begin
{$I-} SavedPos := FilePos(FBaseFile); {$I+}
If IoResult = 0 Then
Close (FBaseFile)
Else
SavedPos := -1;
Close (FDirFile);
Close (DataFile);
DirectoryEditor(True, List[CurPos].FileName);
If SavedPos <> -1 Then Begin
Reset (FBaseFile);
Seek (FBaseFile, SavedPos);
End;
Reset (FDirFile);
Reset (DataFile, 1);
End;
Procedure DrawPage;
Var
OK : Boolean;
@ -2313,25 +2345,7 @@ Var
End;
End;
'E' : If Session.User.Access(FBase.SysopACS) Then Begin
{ Save file POS if FBaseFile is open }
{$I-} B := FilePos(FBaseFile); {$I+}
If IoResult = 0 Then
Close (FBaseFile)
Else
B := -1;
Close (FDirFile);
Close (DataFile);
DirectoryEditor(True, List[CurPos].FileName);
If B <> -1 Then Begin
Reset (FBaseFile);
Seek (FBaseFile, B);
End;
Reset (FDirFile);
Reset (DataFile, 1);
DoEditor;
FullReDraw;
DrawPage;
@ -2369,6 +2383,7 @@ Var
A : LongInt;
B : LongInt;
okSave : Byte;
Keys : String[20];
Begin
ListType := 0;
@ -2384,10 +2399,21 @@ Var
Result := 2;
Keys := #13 + 'FNPQV';
If Session.User.Access(FBase.SysopACS) Then Keys := Keys + 'E';
Repeat
Session.io.OutFull (Session.GetPrompt(44));
Case Session.io.OneKey(#13'FNPQV', True) of
Case Session.io.OneKey(Keys, True) of
'E' : Begin
DoEditor;
DrawPage;
If CurPos > ListSize Then CurPos := ListSize;
End;
#13,
'N' : If LastPage Then
Break

View File

@ -23,7 +23,7 @@ Const
MaxPromptInfo = 15;
Type
TGetKeyCallBack = Function (Forced: Boolean) : Boolean Is Nested;
TGetKeyCallBack = Function (Forced: Boolean) : Boolean;// Is Nested;
TBBSIO = Class
Core : Pointer;

View File

@ -22,7 +22,6 @@
Program Install;
{$I M_OPS.PAS}
{$MODESWITCH NESTEDPROCVARS-}
Uses
m_FileIO,

View File

@ -20,7 +20,6 @@
// ====================================================================
{$I M_OPS.PAS}
{$MODESWITCH NESTEDPROCVARS-}
Program MIDE;

View File

@ -2,8 +2,6 @@ Unit MPL_Compile;
{$I M_OPS.PAS}
{$MODESWITCH NESTEDPROCVARS-}
Interface
Uses

View File

@ -22,7 +22,6 @@
Program MPLC;
{$I M_OPS.PAS}
{$MODESWITCH NESTEDPROCVARS-}
Uses
DOS,

View File

@ -307,9 +307,9 @@ Type
FirstOn : LongInt; { Date/Time of First Call }
LastOn : LongInt; { Date/Time of Last Call }
Calls : LongInt; { Number of calls to BBS }
CallsToday : SmallInt; { Number of calls today }
DLs : SmallInt; { # of downloads }
DLsToday : SmallInt; { # of downloads today }
CallsToday : SmallWord; { Number of calls today }
DLs : SmallWord; { # of downloads }
DLsToday : SmallWord; { # of downloads today }
DLk : LongInt; { # of downloads in K }
DLkToday : LongInt; { # of downloaded K today }
ULs : LongInt; { total number of uploads }