Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USE [kn_online]
- GO
- /****** Object: StoredProcedure [dbo].[ACCOUNT_LOGIN] Script Date: 01/13/2014 21:46:43 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- ALTER PROCEDURE [dbo].[ACCOUNT_LOGIN]
- @AccountID varchar(50),
- @Password varchar(50) OUTPUT,
- @nRet smallint OUTPUT,
- @PremTime smallint OUTPUT
- AS
- -- # Auto Account Start #
- IF dbo.FreeManTR(@AccountID) = 1
- BEGIN
- SET @nRet = 2 -- Hesap Bulunamadı.
- RETURN
- END
- IF dbo.FreeManTR(@Password) = 1
- BEGIN
- SET @nRet = 3 -- Şifreniz Hatalıdır.
- RETURN
- END
- -- # Auto Account Start #
- set @PremTime = 1
- update USERDATA set Loyalty = 100 where Loyalty < 100
- DECLARE @pwd varchar(50), @authority tinyint
- SET @pwd = null
- SELECT @pwd = strPasswd ,@authority = strAuthority FROM TB_USER WHERE strAccountID = @AccountID
- IF @pwd IS null or @pwd != @Password
- BEGIN
- SET @nRet = 3
- RETURN
- END
- BEGIN
- delete from currentuser where strAccountID = @AccountID
- SET @nRet = 1
- RETURN
- END
- SET @nRet = 0
- RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement