كود PHP:
USE SRO_FEIER_ACCCOUNTDB
GO
/****** Object: StoredProcedure [dbo].[_CertifyTB_User] Script Date: 03/02/2015 17:39:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[_CertifyTB_User]
@szUserID varchar(25),
@szPassword varchar(50)
AS
declare @nUserJID int
declare @sec_primary tinyint
declare @sec_content tinyint
declare @AccPlayTime int
declare @LatestUpdateTime_ToPlayTime int
declare @IsAdult tinyint -- int형 필요 없음
-- ifdef SYSTEM_EMAIL_CERTIFICATION_NOTUSE_CGI_LOGIN
declare @Email varchar(50)
declare @EmailValidate tinyint
-- endif SYSTEM_EMAIL_CERTIFICATION_NOTUSE_CGI_LOGIN
set @nUserJID = 0
set @sec_primary = 0
set @sec_content = 0
set @AccPlayTime = 0
set @LatestUpdateTime_ToPlayTime = 0
set @IsAdult = 0
-- ifdef SYSTEM_EMAIL_CERTIFICATION_NOTUSE_CGI_LOGIN
set @Email = null
set @EmailValidate = 0
-- endif SYSTEM_EMAIL_CERTIFICATION_NOTUSE_CGI_LOGIN
select @nUserJID = JID,
@sec_primary = sec_primary,
@sec_content = sec_content,
@AccPlayTime = AccPlayTime,
@LatestUpdateTime_ToPlayTime = LatestUpdateTime_ToPlayTime,
-- ifdef SYSTEM_EMAIL_CERTIFICATION_NOTUSE_CGI_LOGIN
@Email = Email,
@EmailValidate = EmailValidate
-- endif SYSTEM_EMAIL_CERTIFICATION_NOTUSE_CGI_LOGIN
from TB_User
where StrUserID = @szUserID and password = @szPassword
--set @EmailValidate=0
if( @nUserJID = 0 or @nUserJID is null or @@error <> 0 or @@rowcount = 0)
begin
--select convert( tinyint, 1), convert( int, 0), convert( tinyint, 0), convert( tinyint, 0), convert( tinyint, 0), convert(datetime, 0), convert(bigint, 0)
select convert( tinyint, 1), convert( int, 0), convert( tinyint, 0), convert( tinyint, 0), convert( tinyint, 0), convert(datetime, 0), convert(bigint, 0), convert(tinyint, 0)
return
end
if( exists( select Type from _BlockedUser where UserJID = @nUserJID and Type = 1 and getdate() between timeBegin and timeEnd))
begin
--select convert( tinyint, 3), @nUserJID, convert( tinyint, 0), convert( tinyint, 0), convert( tinyint, 0), convert(datetime, 0), convert(bigint, 0)
select convert( tinyint, 3), @nUserJID, convert( tinyint, 0), convert( tinyint, 0), convert( tinyint, 0), convert(datetime, 0), convert(bigint, 0), convert(tinyint, 0)
return
end
------------
declare @ssn bigint
declare @max_playtime int
declare @max_latestUpdateTime int
declare @max_totalLoggedOutTime int
declare @max_lastLoggedOutTime datetime
declare @certf varchar(60)
select @max_playtime = max(AccPlayTime),
@max_latestUpdateTime = max(LatestUpdateTime_ToPlayTime),
@max_totalLoggedOutTime = max(TotalLoggedOutTime),
@max_lastLoggedOutTime = max(LastLoggedOutTime)
from TB_User
--select convert(tinyint, 0), @nUserJID, @sec_primary, @sec_content, @AccPlayTime, @max_LatestUpdateTime, @max_totalLoggedOutTime, @max_lastLoggedOutTime, @ssn
--select convert(tinyint, 0), @nUserJID, @sec_primary, @sec_content, @AccPlayTime, @max_LatestUpdateTime, @max_totalLoggedOutTime, @max_lastLoggedOutTime, @ssn, @IsAdult
-- ifdef SYSTEM_EMAIL_CERTIFICATION_NOTUSE_CGI_LOGIN
select convert(tinyint, 0), @nUserJID, @sec_primary, @sec_content, @AccPlayTime, @max_LatestUpdateTime, @max_totalLoggedOutTime, @max_lastLoggedOutTime, @ssn, @IsAdult, @Email, @EmailValidate
-- endif SYSTEM_EMAIL_CERTIFICATION_NOTUSE_CGI_LOGIN
-- print @EmailValidate
return