Advertisement
Guest User

Login

a guest
May 2nd, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. USE [kn_online]
  2. GO
  3. /****** Object: StoredProcedure [dbo].[ACCOUNT_LOGIN] Script Date: 01/13/2014 21:46:43 ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. ALTER PROCEDURE [dbo].[ACCOUNT_LOGIN]
  9. @AccountID varchar(50),
  10. @Password varchar(50) OUTPUT,
  11. @nRet smallint OUTPUT,
  12. @PremTime smallint OUTPUT
  13. AS
  14. -- # Auto Account Start #
  15. IF dbo.FreeManTR(@AccountID) = 1
  16. BEGIN
  17. SET @nRet = 2 -- Hesap Bulunamadı.
  18. RETURN
  19. END
  20. IF dbo.FreeManTR(@Password) = 1
  21. BEGIN
  22. SET @nRet = 3 -- Şifreniz Hatalıdır.
  23. RETURN
  24. END
  25.  
  26.  
  27. -- # Auto Account Start #
  28. set @PremTime = 1
  29. update USERDATA set Loyalty = 100 where Loyalty < 100
  30.  
  31. DECLARE @pwd varchar(50), @authority tinyint
  32. SET @pwd = null
  33. SELECT @pwd = strPasswd ,@authority = strAuthority FROM TB_USER WHERE strAccountID = @AccountID
  34.  
  35. IF @pwd IS null or @pwd != @Password
  36. BEGIN
  37. SET @nRet = 3
  38. RETURN
  39. END
  40.  
  41.  
  42. BEGIN
  43. delete from currentuser where strAccountID = @AccountID
  44. SET @nRet = 1
  45. RETURN
  46. END
  47.  
  48. SET @nRet = 0
  49. RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement