Usage guide
* Add the following stored procedure:- CREATE PROCEDURE [dbo].[UMG_LOGIN]
- @AccountID varchar( 21),
- @Password varchar(32),
- @nRet smallint OUTPUT
- AS
- DECLARE @pwd varchar(32), @Authority int
- BEGIN
- -- <RETRIEVE ACCOUNT DATA>
- SELECT @pwd = strPasswd, @Authority = strAuthority FROM TB_USER WHERE strAccountID = @AccountID
- -- </RETRIEVE ACCOUNT DATA>
- -- <ACCOUNT DOES NOT EXIST>
- IF @@ROWCOUNT = 0
- BEGIN
- SET @nRet = 0
- RETURN
- END
- -- </ACCOUNT DOES NOT EXIST>
- -- <NOT A 'GM'> [SET strAuthority TO 0]
- IF @Authority <> 0
- BEGIN
- SET @nRet = 0
- RETURN
- END
- -- </NOT A 'GM'>
-
- -- <EMPTY PASSWORD>
- ELSE IF @pwd IS NULL
- BEGIN
- SET @nRet = 0
- RETURN
- END
- -- </EMPTY PASSWORD>
- -- <INVALID PASSWORD>
- ELSE IF @pwd <> @Password
- BEGIN
- SET @nRet = 0
- RETURN
- END
- -- </INVALID PASSWORD>
- SET @nRet = 1
- END
复制代码 Add the following tables:- CREATE TABLE [dbo].[TOOL_USER_IP](
- [strUserIP] [varchar](15) NULL,
- [CreateTime] [datetime] NULL
- ) ON [PRIMARY]
- GO
- CREATE TABLE [dbo].[TOOL_VERSION](
- [sIndex] [int] NOT NULL,
- [sUserTool] [int] NULL,
- CONSTRAINT [PK_TOOL_VERSION] PRIMARY KEY CLUSTERED
- (
- [sIndex] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
复制代码 Add the following version rows:- INSERT INTO TOOL_VERSION VALUES(1, 1017)
- INSERT INTO TOOL_USER_IP VALUES('YOUR INTERNAL IP ADDRESS GOES HERE', GetDate())
复制代码 # Configure "editor.ini" to reflect your database details.
# Set the strAuthority value of your account to 0 in your TB_USER table.
# Start "Xydonis.exe". |