Cum Dai Ban Din Database

    Distribuiţi
    avatar
    ReLaX
    Administrator
    Administrator

    masculin Balanta Capra
    Mesaje : 247
    Puncte : 1136
    Reputatie : 0
    Data de inscriere : 11/04/2010
    Varsta : 26
    Localizare : Lupeni
    Joburi/Distractii : Cluburi,Scoala vb vine fac la grup,Sex
    Stare de spirit : Fresh...Duc Life

    Cum Dai Ban Din Database

    Mesaj  ReLaX la data de Sam Mar 26, 2011 10:19 pm

    Prima oara ruleaza asta ..
    Cod:
    USE [GunzDB]
    GO
    /****** Object: StoredProcedure [dbo].[spGetLoginInfo] Script Date: 08/09/2009 07:13:25 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO


    /* LoginInfo 얻어옴 */
    ALTER PROC [dbo].[spGetLoginInfo]
    @UserID varchar(20)
    AS
    SET NOCOUNT ON
    DECLARE @IP VARCHAR(40)
    SELECT @IP=LastIP FROM LOGIN(NOLOCK) WHERE UserID=@UserID
    DECLARE @IP2 VARCHAR(40)
    SELECT @IP2=IP FROM ipbans(NOLOCK) WHERE IP=@IP
    IF @IP = @IP2
    BEGIN
    RETURN 1 -- Wrong Password
    END
    SELECT AID, UserID, Password FROM Login(nolock) WHERE UserID = @UserID

    Apoi ruleaza asta
    Cod:
        USE [GunzDB]
        GO

        /****** Object: Table [dbo].[ipbans] Script Date: 08/09/2009 07:22:30 ******/
        SET ANSI_NULLS ON
        GO

        SET QUOTED_IDENTIFIER ON
        GO

        SET ANSI_PADDING ON
        GO

        CREATE TABLE [dbo].[ipbans](
        [UserID] [varchar](20) NULL,
        [IP] [varchar](20) NULL
        ) ON [PRIMARY]

        GO

        SET ANSI_PADDING OFF
        GO
    Apoi te duci frumusel la tabela IpBans , pui acolo ip'u la care vrei sa-i dai ban .. si gata Very Happy
    Succes !

      Acum este: Joi Sept 20, 2018 3:04 pm