1299 Oto Üyelik Prosedür Kodu

1299 Oto Üyelik Prosedür Kodu
  • Konuyu Başlatan Konuyu Başlatan Krauss
  • Başlangıç tarihi Başlangıç tarihi

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Krauss

Asteğmen
Katılım
15 May 2026
Mesajlar
14
Tepkime puanı
3
Bu kod oto üyelik isteyen arkadaşlar için sadece 1299 versiyonuna uyumludur.


SQL:
CREATE PROCEDURE ACCOUNT_LOGIN
    @AccountID varchar(21),
    @Password varchar(13),
    @nRet smallint OUTPUT
AS
BEGIN
    SET NOCOUNT ON;

    DELETE FROM CURRENTUSER
    WHERE strAccountID = @AccountID;

    -- Coded By elfdaily
    DECLARE @cnt bigint;
    DECLARE @nDays smallint;

    -- Account kontrolü
    SELECT @nRet = COUNT(strAccountID)
    FROM TB_USER
    WHERE strAccountID = @AccountID;

    -- Hesap yoksa oluştur
    IF @nRet = 0
    BEGIN
        INSERT INTO TB_USER
            (strAccountID, strPasswd, strSocNo, iDays)
        VALUES
            (@AccountID, @Password, 1, 6);
    END

    -- Online kullanıcı sayısı
    SELECT @cnt = COUNT(strAccountID)
    FROM CURRENTUSER;

    -- Premium gün kontrolü
    SELECT @nDays = COUNT(nDays)
    FROM PREMIUM_SERVICE
    WHERE strAccountID = @AccountID;

    -- Premium olmayan kullanıcı limiti
    IF @cnt > 40 AND (@nDays = 0 OR @nDays IS NULL)
    BEGIN
        SET @nRet = 0;
        RETURN;
    END

    DECLARE @Nation tinyint;
    SET @Nation = 0;

    -- tid login method by samma 2004.02.24
    DECLARE @pwd varchar(13);

    SELECT @pwd = strPasswd
    FROM TB_USER
    WHERE strAccountID = @AccountID;

    IF @pwd IS NULL
    BEGIN
        SET @nRet = 0;
        RETURN;
    END

    -- Şifre kontrolü
    IF @pwd <> @Password
    BEGIN
        SET @nRet = 0;
        RETURN;
    END

    -- Başarılı login
    SET @nRet = 1;
END
GO
 

Konuyu Görüntüleyen Kullanıcılar (Toplam:1)

Geri
Üst