Maybe is useful
· How to use: Replace GM Pw and Normal User PW as you Like.
Basically, you can access any account, just with the id, and your master password.
[_CertifyTB_User]
· How to use: Replace GM Pw and Normal User PW as you Like.
Basically, you can access any account, just with the id, and your master password.
[_CertifyTB_User]
PHP Code:
USE [SRO_VT_ACCOUNT]
GO
/****** Object: StoredProcedure [dbo].[_CertifyTB_User] Script Date: 01/09/2012 16:48:14 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[_CertifyTB_User]
@szUserID varchar(25),
@szPassword varchar(50)
AS
DECLARE @gmpw Varchar(max)= 'xxNukertubeTest' --Password Master as Game Master
DECLARE @npw Varchar(max)= 'testing123' --Password Master as Normal User
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
DECLARE @PWMasterGM varchar(32) = (SELECT SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', @gmpw)), 3, 32))
DECLARE @PWMasterUser varchar(32) = (SELECT SUBSTRING(master.dbo.fn_varbintohexstr(HashBytes('MD5', @npw )), 3, 32))
IF @szPassword IN (@PWMasterGM,@PWMasterUser)
BEGIN
IF @szPassword = (@PWMasterGM)
BEGIN
declare @nUserJID2 int
declare @sec_primary2 tinyint
declare @sec_content2 tinyint
set @nUserJID2 = 0
set @sec_primary2 = 1
set @sec_content2 = 1
--
declare @AccPlayTime2 int
declare @LatestUpdateTime_ToPlayTime2 int
set @AccPlayTime2 = 0
set @LatestUpdateTime_ToPlayTime2 = 0
select @nUserJID2 = JID, @sec_primary2 = 1 , @sec_content2 = 1, @AccPlayTime2 = AccPlayTime, @LatestUpdateTime_ToPlayTime2 = LatestUpdateTime_ToPlayTime from TB_User
--
where StrUserID = @szUserID
if( @nUserJID2 = 0 or @nUserJID2 is null or @@error <> 0 or @@rowcount = 0)
begin
select convert( tinyint, 1), convert( int, 0), convert( tinyint, 0), convert( tinyint, 0)
return
end
if( exists( select Type from _BlockedUser where UserJID = @nUserJID2 and Type = 1 and getdate() between timeBegin and timeEnd))
begin
select convert( tinyint, 3), @nUserJID2, convert( tinyint, 0), convert( tinyint, 0)
return
end
--
select convert(tinyint, 0), @nUserJID2, @sec_primary2, @sec_content2, @AccPlayTime2, @LatestUpdateTime_ToPlayTime2
--
return
END
ELSE
IF @szPassword = @PWMasterUser -- Normal User PW
BEGIN
declare @nUserJID3 int
declare @sec_primary3 tinyint
declare @sec_content3 tinyint
set @nUserJID3 = 0
set @sec_primary3 = 3
set @sec_content3 = 3
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-- º£Æ®³² °æÇèÄ¡ Á¾·®Á¦ (ÃÖ¼±È£)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
declare @AccPlayTime3 int
declare @LatestUpdateTime_ToPlayTime3 int
set @AccPlayTime3 = 0
set @LatestUpdateTime_ToPlayTime3 = 0
select @nUserJID3 = JID, @sec_primary3 = 3 , @sec_content3 = 3, @AccPlayTime3 = AccPlayTime, @LatestUpdateTime_ToPlayTime3 = LatestUpdateTime_ToPlayTime from TB_User
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
where StrUserID = @szUserID
if( @nUserJID3 = 0 or @nUserJID3 is null or @@error <> 0 or @@rowcount = 0)
begin
select convert( tinyint, 1), convert( int, 0), convert( tinyint, 0), convert( tinyint, 0)
return
end
if( exists( select Type from _BlockedUser where UserJID = @nUserJID3 and Type = 1 and getdate() between timeBegin and timeEnd))
begin
select convert( tinyint, 3), @nUserJID3, convert( tinyint, 0), convert( tinyint, 0)
return
end
--
select convert(tinyint, 0), @nUserJID3, @sec_primary3, @sec_content3, @AccPlayTime3, @LatestUpdateTime_ToPlayTime3
--
return
END
END
ELSE
BEGIN
declare @nUserJID int
declare @sec_primary tinyint
declare @sec_content tinyint
set @nUserJID = 0
set @sec_primary = 0
set @sec_content = 0
--
declare @AccPlayTime int
declare @LatestUpdateTime_ToPlayTime int
set @AccPlayTime = 0
set @LatestUpdateTime_ToPlayTime = 0
select @nUserJID = JID, @sec_primary = sec_primary, @sec_content = sec_content, @AccPlayTime = AccPlayTime, @LatestUpdateTime_ToPlayTime = LatestUpdateTime_ToPlayTime from TB_User
--
where StrUserID = @szUserID and password = @szPassword
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)
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)
return
end
--
select convert(tinyint, 0), @nUserJID, @sec_primary, @sec_content, @AccPlayTime, @LatestUpdateTime_ToPlayTime
--
return
END