荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: Fishingsnow.bbs@ytht.net (對鏡持柳葉自剖業與孽), 信区: InstallBBS
标  题: Re: 数据转换问题
发信站: YTHT (Sun Jun 27 18:10:27 2004)
转信站: SZU!news.szu.edu.cn!netnews.sdu.edu.cn!news.happynet.org!YTHT

还需要重新make .dir

发信人: Eternity (Eternity), 信区: NetGroup
标  题: 转换dvbbs的程序
发信站: 数学科学学院公共论坛 (Sat Jun 19 02:50:02 2004), 本站
(bbs.math.pku.edu.cn)

const
  BoardID: Integer = 87;
  BoardName: String = '研究生课程讨论区';


procedure TForm1.Button1Click(Sender: TObject);
var
  str, fn: String;
  id: Integer;
  f: TextFile;
  dt: TDateTime;
  dts: String;
begin
  TableTopic.First;
  TableBBS1.First;
  while (not TableTopic.Eof) do
  begin
    // M.1087481645.A
    if (TableTopic.Fields[2].AsInteger = BoardID) then
    begin
      dt := TableTopic.Fields[8].AsDateTime;
      dts := IntToStr(DateTimeToUnix(dt));
      fn := Format('M.%s.A', [dts]);
      Memo1.Lines.Add(fn);
      AssignFile(f, fn);
      Rewrite(f);
      str := Format('发信人: %s., 信区: %s', [TableTopic.Fields[6].AsString,
BoardName]);
      WriteLn(f, str);
      str := Format('标  题: %s', [TableTopic.Fields[1].AsString]);
      WriteLn(f, str);
      str := Format('发信站: Math BBS (%s), 本站(DvBBS 数据转换)',
[TableTopic.Fields[8].AsString]);
      WriteLn(f, str);
      WriteLn(f);
      {str := TableTopic.Fields[12].AsString;
      str := Copy(str, Pos('$', str) + 1, Length(str) - Pos('$', str));
      str := Copy(str, 1, Pos('$', str) - 1);}
      id := TableTopic.Fields[0].AsInteger;
      TableBBS1.First;
      while (not TableBBS1.Eof) do
      begin
        // root id
        if (TableBBS1.Fields[9].AsInteger = id) then
        begin
          str := #27'[1;36m──────────────────────────
─────────────'#27'[0m';
          WriteLn(f, str);
          str := Format(#27'[1;33m▌ 作者 %S    时间 %s    IP %s'#27'[0m',
                        [TableBBS1.Fields[3].AsString, TableBBS1.Fields[7]
.AsString, TableBBS1.Fields[13].AsString]);
          WriteLn(f, str);
          str := #27'[1;36m──────────────────────────
─────────────'#27'[0m';
          WriteLn(f, str);
          str := TableBBS1.Fields[6].AsString;
          WriteLn(f, str);

        end;
        TableBBS1.Next;
      end;
      WriteLn(f);
      CloseFile(f);
    end;
    TableTopic.Next;
  end;
end;

--
                                  Windows

   A fatal exception 0E has occurred at 0028:C004D89F in VXD VFAT(01) +

   0000B897. The current application will be terminated.

   * Press any key to terminate the current application.

   * Press CTRL+ALT+DEL again to restart your computer.You will

     lose any unsaved information in all applications.


※ 来源:.数学科学学院公共论坛 bbs.math.pku.edu.cn.[FROM: 162.105.91.218]


【 在 wangzhuoer@smth.org-SPAM.no (沧海三声笑) 的大作中提到: 】
: 请问有没有WEB基于mysql系统论坛数据转换到smth_BBS,或者fb2000之类BBS的程序呢,万
分感谢

--
┌┐            ╭╮                          ┌┐╭╮┌╭─╮
││╭╮╭╮╭╮│╯┌┐                ┌─┐││╰│││││        ╭──╮
││╰┐│││││  ││  ┌┐  ┌╭─╮└─┘││  │└┘└┘╰──╯│╭╮│
│││││││││  ││┌╯╰┐││││      └┘  │        ╭──╮│╰─╯
└┘└┘└╰╯┘│╮││└╮╭┘││││          ╭│                ╰──╯
    n -> ∞     ╰╯└┘  └┘  └┘└┘          ╰╯

※ 来源:.一塌糊涂 BBS ytht.net.[FROM: 202.119.32.102]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店