⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.~pas

📁 vp聊天系统文件修改器,vp聊天系统的配置文件修改器
💻 ~PAS
字号:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    Edit1: TEdit;
    Label1: TLabel;
    Edit2: TEdit;
    Label2: TLabel;
    Edit3: TEdit;
    Label3: TLabel;
    Edit4: TEdit;
    Label4: TLabel;
    ComboBox1: TComboBox;
    Label5: TLabel;
    Edit5: TEdit;
    Edit6: TEdit;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Memo2: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  i:integer;
  tstr:string;
begin
  memo1.Lines.LoadFromFile(ExtractFilePath(application.ExeName)+'\config\nickasp.ini');
  for i:=0 to memo1.Lines.Count-1 do
  begin
     tstr:=memo1.Lines.Strings[i];
     if copy(tstr,0,9)='sqlhost =' then
     begin
       memo1.Lines.Strings[i]:='sqlhost = '+edit1.text;
     end;

     if copy(tstr,0,9)='sqluser =' then
     begin
       memo1.Lines.Strings[i]:='sqluser = '+edit2.text;
     end;

     if copy(tstr,0,9)='sqlpass =' then
     begin
       memo1.Lines.Strings[i]:='sqlpass = '+edit3.text;
     end;

     if copy(tstr,0,7)='sqldb =' then
     begin
       memo1.Lines.Strings[i]:='sqldb = '+edit4.text;
     end;
  end;
  memo1.Lines.SaveToFile(ExtractFilePath(application.ExeName)+'\config\nickasp.ini');

  memo1.Lines.LoadFromFile(ExtractFilePath(application.ExeName)+'\server\default\config.ini');
  for i:=0 to memo1.Lines.Count-1 do
  begin
     tstr:=memo1.Lines.Strings[i];
     if copy(tstr,0,7)='wwwdir=' then
     begin
       memo1.Lines.Strings[i]:='wwwdir='+ComboBox1.Text;
     end;
  end;
  memo1.Lines.SaveToFile(ExtractFilePath(application.ExeName)+'server\default\config.ini');

  memo1.Lines.LoadFromFile(ExtractFilePath(application.ExeName)+'www\Room\config\roomasp.asp');
  for i:=0 to memo1.Lines.Count-1 do
  begin
     tstr:=memo1.Lines.Strings[i];
     if copy(tstr,0,12)='<%dasdfsadff' then
     begin
       memo1.Lines.Strings[i]:='<%dasdfsadff #注意此行代码是必需的,不要删@'+edit6.Text;
     end;

     if copy(tstr,0,8)='sqluser=' then
     begin
       memo1.Lines.Strings[i]:='sqluser='+edit2.Text;
     end;

     if copy(tstr,0,8)='sqlpass=' then
     begin
       memo1.Lines.Strings[i]:='sqlpass='+edit5.Text;
     end;
  end;
  memo1.Lines.SaveToFile(ExtractFilePath(application.ExeName)+'www\Room\config\roomasp.asp');

  showmessage('修改成功');

end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -