Develop and Download Open Source Software

Browse Subversion Repository

Diff of /WebModuleUnit1.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by yamat0jp, Thu Sep 29 14:15:09 2016 UTC revision 21 by yamat0jp, Fri Sep 30 13:16:28 2016 UTC
# Line 271  function TWebModule1.search: string; Line 271  function TWebModule1.search: string;
271  var  var
272    s: TSearchRec;    s: TSearchRec;
273    t: TStringList;    t: TStringList;
274    i: integer;    i, j: integer;
275  begin  begin
276    t := TStringList.Create;    t := TStringList.Create;
277    try    try
# Line 280  begin Line 280  begin
280        repeat        repeat
281          t.Add(s.Name);          t.Add(s.Name);
282        until FindNext(s) <> 0;        until FindNext(s) <> 0;
283        for i := 0 to t.count - 1 do        i := 0;
284          while i < t.count do
285          begin
286          case i mod 5 of          case i mod 5 of
287            0:            0:
288              t[i] := String.Format              t[i] := String.Format
# Line 294  begin Line 296  begin
296            t[i] := String.Format('<td><a href=%s/archives?name=%s>%s</a></td>',            t[i] := String.Format('<td><a href=%s/archives?name=%s>%s</a></td>',
297              [FDTable2.FieldByName('home').AsString, t[i], t[i]]);              [FDTable2.FieldByName('home').AsString, t[i], t[i]]);
298          end;          end;
299            inc(i);
300          end;
301          if i mod 5 = 0 then
302            result := '<table border=1>' + t.Text + '</table>'
303          else
304          begin
305            if i > 5 then
306              for j := i mod 5 to 4 do
307                t.Add('<td><br></td>');
308            result := '<table border=1>' + t.Text + '</tr></table>';
309          end;
310      end;      end;
     result := '<table border=1>' + t.Text + '</table>';  
311    finally    finally
312      FindClose(s);      FindClose(s);
313      t.Free;      t.Free;
# Line 422  begin Line 434  begin
434        Name := 'db';        Name := 'db';
435        path := '/';        path := '/';
436        Expires := Now + 1;        Expires := Now + 1;
437        Value := s;        Value := AnsiString(s);
438      end;      end;
439      FDConnection1.Open('Database=' + s + ';LockingMode=Normal;DriverID=SQLite');      FDConnection1.Open('Database=' + s + ';LockingMode=Normal;DriverID=SQLite');
440      FDTable1.Open;      FDTable1.Open;

Legend:
Removed from v.20  
changed lines
  Added in v.21

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26