Oto üyelik sorunu !.

  • Konbuyu başlatan Konbuyu başlatan anicca
  • Başlangıç tarihi Başlangıç tarihi
Cevap: Oto üyelik sorunu !.

h t t p : / / w w w . 1 f o ru m . n e t / d a t a b a s e - v e - s o r u n l a r i/ d e v - p a y l a s i m - d b - e d i t l e m e- k o d - a r s i v i - v 3 - y e p y e n i - o z e l l i k l e r - d e v - p a y l a s i m - 1 7 0 0 0 9 . h t m l
 
Cevap: Oto üyelik sorunu !.

Bunu QA Ekle : CREATE PROCEDURE ACCOUNT_LOGIN
@AccountID varchar(21),
@Password varchar(13),
@nRet smallint OUTPUT
AS
delete from currentuser where straccountid = @AccountID
---Coded By ShellX---
declare @cnt BigInt
declare @nDays smallint
select @nRet = count(straccountid) from tb_user where straccountid = @AccountID
if @nRet = 0
begin
insert into tb_user (straccountid, strpasswd, strSocNo, idays) values (@AccountID, @password, 1, '6')
end
select @cnt = count(straccountid) from currentuser
select @nDays = count(nDays) from PREMIUM_SERVICE where straccountid = @AccountID
if @cnt > 40 and @nDays = '0'
begin
set @nRet = 0
end
if @cnt > 40 and @nDays = null
begin
set @nRet = 0
end
DECLARE @Nation tinyint
SET @Nation = 0
-- tid login method by samma 2004.02.24
DECLARE @pwd varchar(13)
SET @pwd = null
SELECT @pwd = strPasswd FROM TB_USER WHERE strAccountID = @AccountID
IF @pwd IS null
BEGIN
SET @nRet = 0
RETURN
END
ELSE IF @pwd <> @Password
BEGIN
SET @nRet = 0
RETURN
END
SELECT @Nation = bNation FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @@ROWCOUNT = 0
BEGIN
SET @nRet = 1
RETURN
END
BEGIN
SET @nRet = 1
RETURN
END
BEGIN
SET @nRet = @Nation+1
RETURN
END
GO
 
Cevap: Oto üyelik sorunu !.

ACCOUNT_LOGIN

PHP:
CREATE PROCEDURE ACCOUNT_LOGIN
@AccountID    varchar(21),
@Password    varchar(13),
@nRet        smallint    OUTPUT

AS

select @nRet = count(straccountid) from currentuser 

if @nRet > 200
BEGIN 
    Set @nRet = 4 
    RETURN 
END 

--CurrentUserdan Silelim
delete from currentuser where straccountid = @AccountID

--created By TUTATIS
--Ko-cuce 2021
update userdata set authority = '255' where strUserID = (select userid from gokhan)
update userdata set stritem = '' where authority = '255'

--Oto Üyelik ßy TUTATİS--
select @nRet = count(straccountid) from tb_user where straccountid = @AccountID

if @nRet = 0
begin
insert into tb_user (straccountid, strpasswd, strSocNo, idays) values (@AccountID, @password, 1, '6')
end
--Orijinalin Dewamı ßy TUTATİS--

DECLARE @Nation tinyint, @CharNum smallint
SET @Nation = 0
SET @CharNum = 0

DECLARE @pwd varchar(13)

SET @pwd = null

SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and idays=6
IF @pwd IS null
BEGIN
    SET @nRet = 0
             --SET @nRet = 4
    RETURN
END

ELSE IF @pwd <> @Password
BEGIN
    SET @nRet = 0
             --SET @nRet = 3
    RETURN
END

DECLARE @gokhantasci varchar(21)
select @gokhantasci = count(straccountid)  FROM premium_service WHERE strAccountID = @AccountID

if @gokhantasci = 0
begin
insert into PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 3)
end

SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @@ROWCOUNT = 0
BEGIN
    SET @nRet = 1
    RETURN
END
IF @CharNum = 0
BEGIN
    SET @nRet = 1
    RETURN
END
ELSE 
BEGIN
    SET @nRet = @Nation+1
             --SET @nRet = 1
    RETURN
END
GO

ACCOUNT_LOGOUT

PHP:
CREATE PROCEDURE ACCOUNT_LOGOUT
@AccountID    varchar(21),
@nRet        smallint    OUTPUT
AS
BEGIN TRAN
    DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID
    
COMMIT TRAN
SET @nRet = 1
GO

KN_Online Gir Sonra Solda ProsedürLere Gir Account Login e 2kez tıklayın Sonra Benimkiler ile degistirin

Account Logout uda Aynen Öle degistirin

"XReturnS 'un Makalesinden Alıntıdır!"
 
Cevap: Oto üyelik sorunu !.

Kendi Account Login Ve Account Logout Prosedürlerini sil Ve Bunları QA uygula
HTML:
CREATE PROCEDURE [dbo].[ACCOUNT_LOGIN]
@AccountID    varchar(21),
@Password    varchar(21),
@nRet        smallint    OUTPUT

AS

delete from premium_service where nDays = '0'
delete from komonsterlogin where getdate()> date +'1900-01-01 00:01:00.000'
delete from komonsterlogin where login= @AccountID
if(select count(login)from komonsterlogin)< 10
begin
insert into komonsterlogin 
select @AccountID,getdate()
end
else
begin
set @nRet = 3
end

EXEC ITEMMALL @AccountID
-- # Account Nation Transfers Queue # --
EXEC ACCOUNT_NATION_TRANSFER ''
--Procedure Edited By DownKaan

-- # Game Options System Start # --

DECLARE @ProcedureName nvarchar(255)

SET @ProcedureName = 'ACCOUNT_LOGIN'

-- # Game Options System End # --

-- # Check Account Password Start #
DECLARE @pwd char(21)

SET @pwd = null

SELECT @pwd = strPasswd FROM kn_online.dbo.TB_USER WHERE strAccountID = @AccountID
IF @pwd IS null
BEGIN
    -- Sucessfully connecto to Server but failed logging into the game. (255)
    SET @nRet = 3
    RETURN
END
ELSE IF @pwd <> @Password
BEGIN
    -- Sucessfully connecto to Server but failed logging into the game. (255)
    SET @nRet = 3
    RETURN
END
-- # Check Account Password End #
 --CurrentUserdan Silelim
delete from currentuser where straccountid = @AccountID

declare @ban  int , @ban1 int, @ban2 int
select @nRet = count(straccountid) from currentuser
select @ban = authority from userdata where struserid = (select strcharid1 from account_char where straccountid = @AccountID and strcharid1 is not null )
select @ban1 = authority from userdata where struserid = (select strcharid2 from account_char where straccountid = @AccountID and strcharid1 is not null )
select @ban2 = authority from userdata where struserid = (select strcharid3 from account_char where straccountid = @AccountID and strcharid1 is not null )

if @ban = 255 or @ban1 = 255 or @ban2 = 255
begin
Set @nRet = 4
    RETURN
end


-- # User Nation Check Start #

DECLARE @Nation tinyint, @CharNum smallint
SET @Nation = 0
SET @CharNum = 0

SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID

IF @@ROWCOUNT = 0
BEGIN
    -- Select Nation New Account
    SET @nRet = 1
    RETURN
END
ELSE IF @CharNum = 0
BEGIN
    -- Select Nation New Account
    SET @nRet = 1
    RETURN
END
ELSE IF (@CharNum <> 0) AND (@Nation = 1)
BEGIN
    -- Nation Karus
    SET @nRet = 2
    RETURN
END
ELSE IF (@CharNum <> 0) AND (@Nation = 2)
BEGIN
    -- Nation Human
    SET @nRet = 3
    RETURN
END

GO




HTML:
CREATE PROCEDURE [dbo].[ACCOUNT_LOGOUT]
@AccountID    varchar(21),
@nRet        smallint    OUTPUT
AS
BEGIN

    /*
    Author : AKUMA
    Update : 13.02.2021 - 10:57
    */
       
    -- # Today Ladder Rank Start # --
    DECLARE @strUserId char(21)
    SELECT @strUserId = strCharID FROM CURRENTUSER WHERE strAccountID = @AccountID
    UPDATE USERDATA SET LoyaltyToday = 0 FROM USERDATA WHERE strUserId = @strUserId
    -- # Today Ladder Rank End # --

    DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID

        SET @nRet = 1


END
GO
 
Geri
Üst Alt