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

📄 servercontroller.pas

📁 资料室图书借阅管理系统
💻 PAS
字号:
unit ServerController;

interface

uses
  SysUtils, Classes, IWServerControllerBase, IWBaseForm, HTTPApp,
  // For OnNewSession Event
  IWApplication, IWAppForm;

type
  TIWServerController = class(TIWServerControllerBase)
    procedure IWServerControllerBaseNewSession(ASession: TIWApplication;
      var VMainForm: TIWBaseForm);
    procedure IWServerControllerBaseCreate(Sender: TObject);
  private
  public
  end;

  // This is a class which you can add variables to that are specific to the user. Add variables
  // to this class instead of creating global variables. This object can references by using:
  //   UserSession
  // So if a variable named UserName of type string is added, it can be referenced by using:
  //   UserSession.UserName
  // Such variables are similar to globals in a normal application, however these variables are
  // specific to each user.
  //
  // See the IntraWeb Manual for more details.
  TUserSession = class(TComponent)
  public
    
    constructor Create(AOwner: TComponent); override;
  end;

// Procs
  function UserSession: TUserSession;

var
  templogname,temppassword:string;
  style:integer;

  dqstr,logstr:integer;

  strglob:string;
  globfile:string;

   SFSerial: string; //主板序列号
    SoutFSerial:string;   //显示的主板序列号
    SFKey: string; //密码
    SFMaxTimes: Integer; //最大运行次数
    SFCompany: string; //公司名称
    SFEmail: string; //联系用的电子邮件
    fileexec:boolean;   //是否注册
    fexpire: boolean;//当前运行次数

implementation
{$R *.dfm}

uses
  IWInit, RegObj, Ustring;

function UserSession: TUserSession;
begin
  Result := TUserSession(WebApplication.Data);
end;

procedure TIWServerController.IWServerControllerBaseNewSession(
  ASession: TIWApplication; var VMainForm: TIWBaseForm);
begin
  ASession.Data := TUserSession.Create(nil);
end;

constructor TUserSession.Create(AOwner: TComponent);
begin
  inherited;
end;

procedure TIWServerController.IWServerControllerBaseCreate(
  Sender: TObject);
var
AObj: TRegObj;

begin
        try
        AObj := TRegObj.Create;
        //AObj.MaxTimes := 30;
        AObj.Company := '锐思软件研究室';
        AObj.Email := 'Support@runor.com';
        AObj.Execute;

        //-------------------------------
        SFSerial:=Aobj.FSerial;
        SoutFSerial:=Aobj.outFSerial;
       SFKey:=Aobj.FKey;
       //SFMaxTimes: =Aobj.FMaxTimes ;
       SFCompany:=Aobj.FCompany;
       SFEmail:=Aobj.FEmail;


       //----------------------------------------------
        if  AObj.nexec =true then
           fileexec:=false
        else   fileexec:=true;

        if  AObj.expire =true then
            fexpire:=true
        else    fexpire:=false;
        finally
           AObj.Free;
        end;
end;

initialization
  TIWServerController.SetServerControllerClass;

end.

 

⌨️ 快捷键说明

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