BoardPath : String;
server : String;
islog : Boolean;
+ urlHead: String;
//protocol, host, path, document, port, bookmark : string;
//is2ch : Boolean;
{*
try
if FileExists(FileName) then begin
sl.LoadFromFile(FileName);
-
+ // \83X\83\8c\83b\83h\82Å\8b¤\92Ê\82ÌURL\95\94
+ if Board.is2ch then begin
+ urlHead := server + 'test/read.cgi/' + Board.BBSID + '/';
+ end else begin
+ urlHead := server + 'test/read.cgi?bbs=' + Board.BBSID + '&key=';
+ end;
//\82Q\8ds\96Ú\82©\82ç\81i\82P\8ds\96Ú\82Í\83o\81[\83W\83\87\83\93\81j
for i := sl.Count - 1 downto 1 do begin
Rec := ParseIndexLine(sl[i]);
ThreadItem := TThreadItem.Create(
nil,
Board,
- server + 'test/read.cgi/' + Board.BBSID + '/' + ChangeFileExt( Rec.FFileName, '' ) + '/l50',
+ urlHead + ChangeFileExt( Rec.FFileName, '' ) + '/l50',
islog,
Rec.FFileName
);
ThreadItem := TThreadItem.Create(
nil,
Board,
- server + 'test/read.cgi?bbs=' + Board.BBSID + '&key=' + ChangeFileExt( Rec.FFileName, '' ) + '&ls=50',
+ urlHead + ChangeFileExt( Rec.FFileName, '' ) + '&ls=50',
islog,
Rec.FFileName
);
rc: Integer;
SearchRec : TSearchRec;
s: string;
- maskExt: string;
begin
- //maskExt := Copy(Mask, 1, Length(Mask) - 1);
- maskExt := Mask;
Path := IncludeTrailingPathDelimiter(Path);
rc := FindFirst(Path + '*.*', faAnyfile, SearchRec);
try
while rc = 0 do begin
if (SearchRec.Name <> '..') and (SearchRec.Name <> '.') then begin
s := Path + SearchRec.Name;
- //if (SearchRec.Attr and faDirectory > 0) then
- // s := IncludeTrailingPathDelimiter(s)
if (SearchRec.Attr and faDirectory = 0) and (MatchesMask(s, Mask)) then
if IsPathAdd then
var
rc: Integer;
SearchRec : TSearchRec;
- s: string;
begin
Path := IncludeTrailingPathDelimiter(Path);
rc := FindFirst(Path + Mask, faAnyfile, SearchRec);
try
while rc = 0 do begin
if (SearchRec.Name <> '..') and (SearchRec.Name <> '.') then begin
- s := Path + SearchRec.Name;
-
- if (SearchRec.Attr and faDirectory = 0) then
- if IsPathAdd then
- List.Add(s)
- else
- List.Add(SearchRec.Name);
+ if (SearchRec.Attr and faDirectory = 0) then begin
+ if IsPathAdd then begin
+ List.Add(Path + SearchRec.Name)
+ end else begin
+ List.Add(SearchRec.Name);
+ end;
+ end;
end;
rc := FindNext(SearchRec);
end;
procedure TGikoSys.ListBoardFile;
var
boardFileList : TStringList;
- i, l, k : Integer;
+ i, l : Integer;
begin
// BBS \82Ì\8aJ\95ú
try
BoardFileList := TStringList.Create;
try
BoardFileList.BeginUpdate;
- GikoSys.GetFileList( GikoSys.Setting.GetBoardDir, '*', BoardFileList, True, True );
+ GikoSys.GetFileList( GikoSys.Setting.GetBoardDir, '*.txt', BoardFileList, True, True );
BoardFileList.EndUpdate;
- for k := BoardFileList.Count - 1 downto 0 do begin
- if AnsiCompareText(ExtractFileExt(BoardFileList[ k ]), '.bak') = 0 then
- BoardFileList.Delete(k);
- end;
- SetLength( BBSs, l + BoardFileList.Count );
+ SetLength( BBSs, l + BoardFileList.Count );
for i := BoardFileList.Count - 1 downto 0 do begin
BBSs[ l ] := TBBS.Create( BoardFileList[ i ] );
BBSs[ l ].Title := ChangeFileExt( ExtractFileName( BoardFileList[ i ] ), '' );