USE [ACCOUNT_DBF]
GO
/****** Object: StoredProcedure [dbo].[LOGIN_STR] Script Date: 09/22/2015 02:37:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROC [dbo].[LOGIN_STR]
@iaccount VARCHAR(32),
@ipassword char(32)
-- Ver. 14 PCZoneIP
,@i_IPAddress varchar(15) = '0.0.0.0'
/************************************************** *********************************
************************************************** *********************************
************************************************** *********************************
************************************************** *********************************
ACCOUNT_STR ????
??? : ???
??? : 2004.01.18
ex) ACCOUNT_STR 'beat','1234'
SELECT * FROM ACCOUNT_TBL_DETAIL WHERE account='aeonsoft'
************************************************** *********************************
************************************************** *********************************
************************************************** *********************************
************************************************** *********************************/
AS
set nocount on
-- Ver 14. PCZoneIP_Check
declare @o_Grade tinyint
exec dbo.USP_PCZoneIP_Check @i_IPAddress, @o_Grade output
IF EXISTS(SELECT a.account FROM ACCOUNT_TBL a,ACCOUNT_TBL_DETAIL b
WHERE a.account = b.account AND a.account = @iaccount ) -- AND gamecode = 'A000')
BEGIN
DECLARE @curDate char(8)
IF EXISTS(SELECT account FROM ACCOUNT_TBL
WHERE account = @iaccount AND password = @ipassword) BEGIN
SELECT @curDate=CONVERT(CHAR(8), getdate(), 112)
SELECT fError=CASE
-- WHEN session<>@isession OR sessionExpireDt<getdate() THEN '91'
WHEN BlockTime>
[email protected] THEN '9'
ELSE '0' END,
fText= CASE
-- WHEN session<>@isession OR sessionExpireDt<getdate() THEN 'Session Expired'
WHEN BlockTime>
[email protected] THEN 'Block' ELSE 'OK' END,
fCheck=tester,
f18='1'
-- Ver14. PCZoneIP
,fPCZone = @o_Grade
FROM ACCOUNT_TBL a INNER JOIN ACCOUNT_TBL_DETAIL b ON (a.account=b.account)
WHERE
[email protected]
END
ELSE BEGIN
SELECT fError = '1', fText = 'Wrong Password !!',fCheck ='',f18='1', fPCZone = '0' -- PCZoneIP (, fPCZone = '0' ??)
END
END
ELSE BEGIN
SELECT fError = '2', fText = 'Account Not Exists !!',fCheck ='',f18='1', fPCZone = '0' -- PCZoneIP (, fPCZone = '0' ??)
END
RETURN
-- ?? ?? Rule
-- 1. (fError=2 ??) ????? ??. ????? "gamecode = A000" ? ??? ??.
-- 2. (fError=1 ??) ????.
-- 3. (fError=0 ??) ?? ? ?? ??( id_no1? a0000 )?? ??.??.??? ??
-- 4. (fError=3 ??) ?????, ???? ??.
-- 5. (fError=4 ??) ????.
-- 6. (fError=5 ??) 12? ???? ??. ???? "???? 12? ?? ??? ??? ]
-- ????? ?? ????." ?? ??.
-- 7. (fError=6 ??) ?????? ?? ?? ?? tester = 0 ?? "14? ?? ??? ???
-- ?????? ????? ?? ??? ?????"?? ??.
-- 8. (fError=0 ??) ?? ???? ?? ???? ??.
set nocount off