Lập trình website MU - Trang 2
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Trang 2 của 5 Đầu tiênĐầu tiên 1 2 3 4 ... CuốiCuối
Kết quả 11 đến 20 của 42
  1. #11
    Vi phạm quy định bizwebmu's Avatar
    Ngày tham gia
    Feb 2010
    Bài viết
    33
    Thanks
    0
    Thanked 3 Times in 1 Post

    Ðề: Lập trình website MU

    Không phải là hiếm khi 2 máy cùng đăng nhập vào 1 tài khoản, mà user cố tình làm như thế, để cùng thực hiện một thao tác chuyển khoản hoặc reset.

    Nêu máy chủ Lag thì khả năng bị Dupe dữ liệu là rất cao. Nhẹ thì bị dupe zen, nặng hơn nữa thì bị Dupe tiền thật. Nguy hiểm hơn nữa là Reset 2 lần cùng 1 lúc.
    Khách viếng thăm hãy cùng bizwebmu xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. #12
    Thành Viên
    Ngày tham gia
    May 2008
    Bài viết
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ðề: Lập trình website MU

    Trích dẫn Gửi bởi bizwebmu [Only registered and activated users can see links. ]
    Nếu không cho phép đăng nhập 1 tài khoản trên 2 máy (chúng nó nhằm vào lúc máy chủ bị lag để dupe point, Zen, tiền và Reset)

    Trong table MEMB_INFO, bạn tạo thêm một trường nữa, gọi là MemberCode đi,

    Lúc đăng nhập, bạn viết thêm 2 Function nữa, 1 là UserCode, rồi lấy UserCode(account) và 1 Function, lấy Ramdom, gọi là Randomtext(10) chẳng hạn.

    Cái RandomText(10) là mình tạo ra 10 ký tự ngẫu nhiên, còn UserCode là tạo ra một string (dạng mã hóa) của tài khoản.

    Sau đó, ghép 2 string này lại = UserCode(Account)&Randomtext(10)

    Như vậy là ta có 1 string không của tài khoản nào giống tài khoản nào, và gần như là không lúc nào giống lúc nào. Đảm bảo mỗi người, tại mỗi thời điểm đăng nhập có 1 string duy nhất.

    Sau khi đăng nhập thành công, bạn làm 2 thao tác.

    1. Ghi string kia vào Session hoặc Cookies. (Cái nào cũng được, cái nào cũng an toàn tuyệt đối, nếu ghi cookies thì nhớ đừng ghi Expired Date là được, để End Sesssion, nó del luôn)

    2. Ghi string đó vào trong Memb_info, vào cái MemberCode tạo ra lúc đầu ấy.


    OK, giờ muốn check đăng nhập, không check Session hay Cookies gì cả, mà đọc chúng lên, rồi mở CSDL ra so sánh, nếu OK thì True, còn không thì False.

    Như vậy, nếu User đăng nhập tiếp ở máy khác, thì chuỗi string sẽ bị thay đổi, thằng đăng nhập lúc đầu sẽ bị đẩy ra


    Have a good time
    thank bro đã chỉ giáo nhưng còn quá trù tượng đối với một gà con như mình
    dù sao cũng thank mình sẽ cố gắng đọc thêm tài liệu về asp để làm được như trên ^_^
    có 1 ví dụ thì hay wa
    thank bro
    Khách viếng thăm hãy cùng truyentranh xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  3. #13
    Vi phạm quy định bizwebmu's Avatar
    Ngày tham gia
    Feb 2010
    Bài viết
    33
    Thanks
    0
    Thanked 3 Times in 1 Post

    Ðề: Lập trình website MU

    Đơn giản như đan rổ.

    Đầu tiên là Hex Function

    PHP Code:
    '******************************************
    '
    ***         Random Hex Generator        ****
    '******************************************

    Private Function hexValue(ByVal intHexLength)

        Dim intLoopCounter
        Dim strHexValue

        '
    Randomise the system timer
        Randomize Timer
    ()

        
    'Generate a hex value
        For intLoopCounter = 1 to intHexLength

            '
    Genreate a radom decimal value form 0 to 15
            intHexLength 
    CInt(Rnd 1000Mod 16

            
    'Turn the number into a hex value
            Select Case intHexLength
                Case 1
                    strHexValue = "1"
                Case 2
                    strHexValue = "2"
                Case 3
                    strHexValue = "3"
                Case 4
                    strHexValue = "4"
                Case 5
                    strHexValue = "5"
                Case 6
                    strHexValue = "6"
                Case 7
                    strHexValue = "7"
                Case 8
                    strHexValue = "8"
                Case 9
                    strHexValue = "9"
                Case 10
                    strHexValue = "A"
                Case 11
                    strHexValue = "B"
                Case 12
                    strHexValue = "C"
                Case 13
                    strHexValue = "D"
                Case 14
                    strHexValue = "E"
                Case 15
                    strHexValue = "F"
                Case Else
                    strHexValue = "Z"
            End Select

            '
    Place the hex value into the return string
            hexValue 
    hexValue strHexValue
        Next
    End 
    Function 
    Lúc Login

    PHP Code:
    strActiveCode strUsername hexValue(35
    PHP Code:

    adoRec
    ("ActiveCode") = strActiveCode
    adoRec
    .Update
    adoRec
    .Requery 
    Ghi Cookies

    PHP Code:
    Response.Cookies("ActiveCode") = strActiveCode 
    Đọc Cookies

    strLoggedInUserCode = Trim(Mid(Request.Cookies("ActiveCode"), 1, 45))
    Kiểm tra đăng nhập

    PHP Code:
    If strLoggedInUserCode <> "" Then
            strLoggedInUserCode 
    formatSQLInput(strLoggedInUserCode)    
            
    strSQL "SELECT * FROM MEMB_INFO Where ActiveCode = '" strLoggedInUserCode "';"
            
    Set adoRec Server.CreateObject("ADODB.Recordset")
            
    adoRec.CursorType 1
            adoRec
    .Open strSQLconn
        
    If NOT adoRec.EOF Then

            strLoggedInName 
    adoRec("memb___id")


        
    End IF
        
    adoRec.Close
        Set adoRec 
    Nothing
    End 
    If

    IF 
    strLoggedInName "" Then Response.write "<script language=javascript>alert('Vui lòng đăng nhập để quản lý tài khoản.');location.href='/';</script>" 
    Như thế mà không hiểu nữa thì thôi.
    Khách viếng thăm hãy cùng bizwebmu xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  4. #14
    Vi phạm quy định bizwebmu's Avatar
    Ngày tham gia
    Feb 2010
    Bài viết
    33
    Thanks
    0
    Thanked 3 Times in 1 Post

    Ðề: Lập trình website MU

    Bonus thêm cho cái Function formatSQLInput

    PHP Code:
    '********************************************
    '
    ***          Format SQL input    *****
    '********************************************

    Private Function formatSQLInput(ByVal strInputEntry)
        '
    Remove malisous charcters from linksimages and Input strings
        strInputEntry 
    Replace(strInputEntry"<""&lt;")
        
    strInputEntry Replace(strInputEntry">""&gt;")
        
    strInputEntry Replace(strInputEntry"[""[")
        
    strInputEntry Replace(strInputEntry"]""]")
        
    strInputEntry Replace(strInputEntry""""""1, -11)
        
    strInputEntry Replace(strInputEntry"=""="1, -11)
        
    strInputEntry Replace(strInputEntry"'""''"1, -11)
        
    strInputEntry Replace(strInputEntry"select""select"1, -11)
        
    strInputEntry Replace(strInputEntry"join""join"1, -11)
        
    strInputEntry Replace(strInputEntry"union""union"1, -11)
        
    strInputEntry Replace(strInputEntry"where""where"1, -11)
        
    strInputEntry Replace(strInputEntry"insert""insert"1, -11)
        
    strInputEntry Replace(strInputEntry"delete""delete"1, -11)
        
    strInputEntry Replace(strInputEntry"update""update"1, -11)
        
    strInputEntry Replace(strInputEntry"like""like"1, -11)
        
    strInputEntry Replace(strInputEntry"drop""drop"1, -11)
        
    strInputEntry Replace(strInputEntry"create""create"1, -11)
        
    strInputEntry Replace(strInputEntry"modify""modify"1, -11)
        
    strInputEntry Replace(strInputEntry"rename""rename"1, -11)
        
    strInputEntry Replace(strInputEntry"alter""alter"1, -11)
        
    strInputEntry Replace(strInputEntry"cast""cast"1, -11)
        
    formatSQLInput strInputEntry
    End 
    Function 
    Khách viếng thăm hãy cùng bizwebmu xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  5. #15
    Thành Viên
    Ngày tham gia
    May 2008
    Bài viết
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ðề: Lập trình website MU

    đây là file system.asp của mình:

    Code:
    <%
    
    
    Public Function IsLegalSQL(ByVal strkytu)
        IsLegalSQL = True
            If InStr(strkytu, " ") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "`") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "~") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "!") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "@") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "#") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "$") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "%") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "^") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "&") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "*") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "(") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, ")") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "+") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "-") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "=") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "|") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "\") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "{") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "}") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "[") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "]") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "?") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, ">") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "<") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, ",") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, """") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "'") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, ".") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "/") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, ":") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, ";") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "insert") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "delete") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "update") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "drop") <> 0 Then IsLegalSQL = False
            If InStr(strkytu, "create") <> 0 Then IsLegalSQL = False
        End Function
    
    Public Function CharOnly(ByVal strchar) 'Hàm Chỉ cho dùng các ký tự A->Z, 0->9, @,^ và _
    dim Only
    Only=Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","_","^","@","0","1","2","3","4","5","6","7","8","9")
    inttongso=64
    intvt=0
    for i = 1 to len(strchar)
        for j=0 to inttongso
            if (mid(strchar,i,1)) <> Only(j) then
                intvt=intvt+1
            end if
        next
    if intvt=(inttongso+1) then
        CharOnly=false
        
        exit function
    else
        intvt=0
    end if
    next
    CharOnly=true
    end function
    
        Public Function AutoMoney(ByVal number) 'Xếp tiền theo dạng xxx.yyy.zzz
            Dim a
            a = Len(number)
            Dim i
            i = 0
            Dim lag
            lag = "."
            Dim tam
            tam = ""
            If (a Mod 3) = 0 Then
                For i = 1 To a
                    tam = tam & Mid(number, i, 1)
                    If (i Mod 3) = 0 Then
                        tam = tam & lag
                    End If
    
    
                Next
            ElseIf (a Mod 3) = 1 Then
                tam = Left(number, 1) & lag
                For i = 2 To a
                    tam = tam & Mid(number, i, 1)
                    If ((i - 1) Mod 3) = 0 Then
                        tam = tam & lag
                    End If
    
    
                Next
            ElseIf (a Mod 3) = 2 Then
                tam = Left(number, 2) & lag
                For i = 3 To a
                    tam = tam & Mid(number, i, 1)
                    If ((i - 2) Mod 3) = 0 Then
                        tam = tam & lag
                    End If
    
    
                Next
            End If
            tam = Left(tam, (Len(tam) - 1))
            AutoMoney = tam
        End Function
    Randomize()
        Public Function SoNgauNhien(ByVal dodai) 'tạo số ngẫu nhiên
            
            SoNgauNhien = Int(Rnd() * dodai) + 1
            'SoNgauNhien = Rnd()
        End Function
        
        Public Function WriteAvatarClass(ByVal id) 'Viết hình của nhân vật
            if id = 0 or id = 1 or id = 3 then
                WriteAvatarClass = "<img src=Images/Class/DW.jpg>"
            elseif id = 16 or id = 17 or id = 19 then
                WriteAvatarClass = "<img src=Images/Class/DK.jpg>"
            elseif id = 32 or id = 33 or id = 35 then
                WriteAvatarClass = "<img src=Images/Class/elf.gif>"    
            elseif id = 48 or id = 49 or id = 50 then
                WriteAvatarClass = "<img src=Images/Class/MG.jpg>"
            elseif id = 64 or id = 65 or id = 67 then
                WriteAvatarClass = "<img src=Images/Class/DL.jpg>"
            elseif id = 80 or id = 81 or id = 83 then
                WriteAvatarClass = "<img src=Images/Class/SM.gif>"
            else
                WriteAvatarClass = "UnKnow"
            end if
        End Function
        Public Function CharName(ByVal id) 'Viết tên của nhân vật
        Select case id
            case 0
                CharName = "Phù Thuỷ"
            case 1
                CharName = "Pháp Sư"
            case 2
                CharName = "Đại Pháp Sư"
            case 3
                CharName = "Đại Pháp Sư"
            case 16
                CharName = "Chiến Binh"
            case 17
                CharName = "Hiệp Sĩ"
            case 18
                CharName = "Đại Hiệp Sĩ"
            case 19
                CharName = "Đại Hiệp Sĩ"
            case 32
                CharName = "Tiên Nữ"
            case 33
                CharName = "Thánh Nữ"
            case 34
                CharName = "Đại Thánh Nữ"
            case 35
                CharName = "Đại Thánh Nữ"
            case 48
                CharName = "Đấu Sĩ"
            case 49
                CharName = "Đại Đấu Sĩ"
            case 50
                CharName = "Đại Đấu Sĩ."
            case 64
                CharName = "Chúa Tể"
            case 65
                CharName = "Thượng Hoàng"
            case 66
                CharName = "Thượng Hoàng."
            case 80
                CharName = "Triệu Hồi Sư"
            case 81
                CharName = "Huyết Hồi Sư"
            case 82
                CharName = "Triệu Hồi Vương"
            case 83
                CharName = "Triệu Hồi Vương"
            case else
                CharName ="Unknow"
        end select
        End Function
    
    Public Function IsOnline(Byval name) 'Kiểm tra xem nhân vật có Online hay không
    set data3 = server.createobject("adodb.recordset")
    data3.open "Select * from MEMB_STAT where memb___id='"& name &"'", conn
    if data3.eof or data3.bof then
        IsOnline = False
    elseif data3("ConnectStat") = 1 then
        IsOnline = True
    else
        IsOnline = False
    end if
    data3.close
    set data3 = nothing
    end function
    
    Public Function Ngay() 'Định dạng ngày tháng năm
        Ngay= day(now) & "/" & month(now) &"/" & year(now)
    end function
    
    
    Public Function WriteReset(Byval num)
        if len(num) = 2 then
            WriteReset = left(num,1) & "x"
        elseif len(num) = 3 then
            WriteReset = left(num,2) & "x"
        elseif len(num) = 4 then
            WriteReset = left(num,3) & "x"
        elseif len(num) = 5 then
            WriteReset = left(num,4) & "x"
        else
            WriteReset = num
        end if
    
    End Function
    
    
    
        Public Function LogoGuild(Byval strhex, na) 'Viết biểu tượng cho guild
    
            ketqua = ketqua & "<a href=""#"" onclick=""ShowLogo('mLogoGuild',500,300,'<table border=0 width=40% id=table cellspacing=0 cellpadding=0 style=border-style: solid; border-width: 1px; padding: 0>"
            For r = 1 To 64
                ketqua = ketqua & "<td background=http://mu3k.clubsite.jp/muweb/Images/Colour/" & Mid(strhex, r, 1) & ".gif id=toadoz"& r &" >&nbsp;</td>"
                If ((r Mod 8) = 0) And (r < 64) Then
                    ketqua = ketqua & "</tr><tr>"
                ElseIf (r = 64) Then
                    ketqua = ketqua & "</tr></table>"
                End If
            Next
            ketqua = ketqua & "');return false"" onmouseout=""hidemenu();"" title=""Click vào để xem (Click rồi giữ yên)"">Logo</a>"
    
            LogoGuild = ketqua
        End Function
    
    Public Function Hex2Color(Byval strhex)
    
        if (strhex = "0") then Hex2Color = "#660066"
        if (strhex = "1") then Hex2Color = "#000000"
        if (strhex = "2") then Hex2Color = "#8c8a8d"
        if (strhex = "3") then Hex2Color = "#FFFFFF"
        if (strhex = "4") then Hex2Color = "#fe0000"
        if (strhex = "5") then Hex2Color = "#ff8a00"
        if (strhex = "6") then Hex2Color = "#ffff00"
        if (strhex = "7") then Hex2Color = "#8cff01"
        if (strhex = "8") then Hex2Color = "#00ff00"
        if (strhex = "9") then Hex2Color = "#01ff8d"
        if (strhex = "a" or strhex = "A") then Hex2Color = "#00ffff"
        if (strhex = "b" or strhex = "B") then Hex2Color = "#008aff"
        if (strhex = "c" or strhex = "C") then Hex2Color = "#0000fe"
        if (strhex = "d" or strhex = "D") then Hex2Color = "#8c00ff"
        if (strhex = "e" or strhex = "E") then Hex2Color = "#ff00fe"
        if (strhex = "f" or strhex = "F") then Hex2Color = "#ff008c"
    End Function
    Public Function Color2Hex(Byval strcolor)
        if (strcolor = "#660066") then
         Color2Hex = "0"
        elseif (strcolor = "#000000") then
         Color2Hex = "1"
        elseif (strcolor = "#8c8a8d") then
         Color2Hex = "2"
        elseif (strcolor = "#ffffff") then
         Color2Hex = "3"
        elseif (strcolor = "#fe0000") then
         Color2Hex = "4"
        elseif (strcolor = "#ff8a00") then
         Color2Hex = "5"
        elseif (strcolor = "#ffff00") then
         Color2Hex = "6"
        elseif (strcolor = "#8cff01") then
         Color2Hex = "7"
        elseif (strcolor = "#00ff00") then
         Color2Hex = "8"
        elseif (strcolor = "#01ff8d") then
         Color2Hex = "9"
        elseif (strcolor = "#00ffff") then
         Color2Hex = "A"
        elseif (strcolor = "#008aff") then
         Color2Hex = "B"
        elseif (strcolor = "#0000fe") then
         Color2Hex = "C"
        elseif (strcolor = "#8c00ff") then
         Color2Hex = "D"
        elseif (strcolor = "#ff00fe") then
         Color2Hex = "E"
        elseif (strcolor = "#ff008c") then
         Color2Hex = "F"
        else
         Color2Hex = "False"
        end if
    End Function
    
    
    Public Function MapName(ByVal id)
        Select Case id
        case 0
            MapName = "Lorencia"
        case 1
            MapName = "Dungeon"
        case 2
            MapName = "Devias"
        case 3
            MapName = "Noria"
        case 4
            MapName = "Lost Tower"
        case 6
            MapName = "Arena"
        case 7
            MapName = "Atlans"
        Case 8
            MapName = "Tarkan"
        case 10
            MapName = "Icarus"
        case 29
            MapName = "Kalima"
        case 30
            MapName = "Valley Of Loren"
        Case 33
            MapName = "Aida"
        Case 34
            MapName = "CryWolf"
        case 51
            MapName = "Elbeland"
        case else
            MapName = "New Map"
        end select
    
    End Function
    
    Function AutoSerial()
            the1 = Hex(SoNgauNhien(15))
            the2 = Hex(SoNgauNhien(15))
            the3 = Hex(SoNgauNhien(15))
            the4 = Hex(SoNgauNhien(15))
            the5 = Hex(SoNgauNhien(15))
            the6 = Hex(SoNgauNhien(15))
            the7 = Hex(SoNgauNhien(15))
            the8 = Hex(SoNgauNhien(15))
        AutoSerial = the1 & the2 & the3 & the4 & the5 & the6 & the7 & the8
    
    End Function
    
    Private Function hexValue(ByVal intHexLength)
    
        Dim intLoopCounter
        Dim strHexValue
    
        'Randomise the system timer
        Randomize Timer()
    
        'Generate a hex value
        For intLoopCounter = 1 to intHexLength
    
            'Genreate a radom decimal value form 0 to 15
            intHexLength = CInt(Rnd * 1000) Mod 16
    
            'Turn the number into a hex value
            Select Case intHexLength
                Case 1
                    strHexValue = "1"
                Case 2
                    strHexValue = "2"
                Case 3
                    strHexValue = "3"
                Case 4
                    strHexValue = "4"
                Case 5
                    strHexValue = "5"
                Case 6
                    strHexValue = "6"
                Case 7
                    strHexValue = "7"
                Case 8
                    strHexValue = "8"
                Case 9
                    strHexValue = "9"
                Case 10
                    strHexValue = "A"
                Case 11
                    strHexValue = "B"
                Case 12
                    strHexValue = "C"
                Case 13
                    strHexValue = "D"
                Case 14
                    strHexValue = "E"
                Case 15
                    strHexValue = "F"
                Case Else
                    strHexValue = "Z"
            End Select
    
            'Place the hex value into the return string
            hexValue = hexValue & strHexValue
        Next
    End Function  
    Private Function formatSQLInput(ByVal strInputEntry)
        'Remove malisous charcters from links, images and Input strings
        strInputEntry = Replace(strInputEntry, "<", "&lt;")
        strInputEntry = Replace(strInputEntry, ">", "&gt;")
        strInputEntry = Replace(strInputEntry, "[", "[")
        strInputEntry = Replace(strInputEntry, "]", "]")
        strInputEntry = Replace(strInputEntry, """", "", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "=", "=", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "'", "''", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "select", "select", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "join", "join", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "union", "union", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "where", "where", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "insert", "insert", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "delete", "delete", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "update", "update", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "like", "like", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "drop", "drop", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "create", "create", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "modify", "modify", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "rename", "rename", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "alter", "alter", 1, -1, 1)
        strInputEntry = Replace(strInputEntry, "cast", "cast", 1, -1, 1)
        formatSQLInput = strInputEntry
    End Function  
    
    Function PercentImg(Byval tu, mau)
        choichoi = round((tu/mau) * 100) * 2
        PercentImg = "<img src=""http://mu3k.clubsite.jp/muweb/Images/green.gif"" width="& choichoi &" height=""20"">"
    End Function
    
    Function Percent(Byval tu, mau)
        choichoi = round((tu/mau) * 100,2)
        Percent = choichoi & "%"
    End Function
    '====================================================================================================
    '====== Test=======================================================================================
    
    
    %>
    file: login.asp

    Code:
    <% if request.ServerVariables("HTTP_REFERER")="" then %>
    <!--#includes file="Default.htm"-->
    <%
    response.end
    end if
    %>
    <!--#includes file="../Common/ConnectSQL.asp"-->
    <!--#includes file="../Common/System.asp"-->
    <%
    
    acc = request("acc")
    pass = request("pass")
    strActiveCode = request("acc") & hexValue(35) 
    adoRec("ActiveCode") = strActiveCode
    adoRec.Update
    adoRec.Requery    
    if pass = "" or acc = "" then
    response.write("<b><font color='#FF0000'><center>Vui lòng nhập dữ liệu</center></font><b/>")
    %>
    <!--#includes file="../Page/Login.asp"-->
    <%
    elseif not islegalsql(acc) then
    response.write("<b><font color='#FF0000'><center>Tài khoản này có ký tự đặc biệt</center></font><b/>")
    %>
    <!--#includes file="../Page/Login.asp"-->
    <%
    elseif not islegalsql(pass) then
    response.write("<b><font color='#FF0000'><center>Mật khẩu có ký tự đặc biệt</center></font><b/>")
    %>
    <!--#includes file="../Page/Login.asp"-->
    <%
    else
        Set data = server.createobject("adodb.recordset")
        data.open "Select * from MEMB_INFO where memb___id='"& acc &"' and memb__pwd='"& pass &"'", conn
        if data.eof or data.bof then
        response.write("<b><font color='#FF0000'><center>Tài khoản hoặc mật khẩu không chính xác</center></font><b/>")
    %>
    <!--#includes file="../Page/Login.asp"-->
    <%
        else
        session("akalis") = acc
        Response.Cookies("ActiveCode") = strActiveCode  
        strLoggedInUserCode = Trim(Mid(Request.Cookies("ActiveCode"), 1, 45)) 
        %>
        <!--#includes file="../Page/Login.asp"-->
        <%
    
        data.close
        set data = nothing
        end if
    
    end if
    
    set conn = nothing
    
    
    
    
    %>
    bạn kiểm tra dùm mình nha!

    thank! bạn nhiều

    chắc bạn hơi bực mình vì gặp thằng gà hỏi nhiều sorry nha! ^_^

    tại mình hok biết chứ cũng ngại lắm
    Khách viếng thăm hãy cùng truyentranh xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  6. #16
    Vi phạm quy định bizwebmu's Avatar
    Ngày tham gia
    Feb 2010
    Bài viết
    33
    Thanks
    0
    Thanked 3 Times in 1 Post

    Ðề: Lập trình website MU

    Vậy, bạn muốn kiểm tra cái gì?
    Khách viếng thăm hãy cùng bizwebmu xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  7. #17
    Thành Viên
    Ngày tham gia
    May 2008
    Bài viết
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ðề: Lập trình website MU

    mình vừa sms cho bạn đó
    bạn cho mình yahoo thì tốt quá
    Khách viếng thăm hãy cùng truyentranh xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  8. #18
    Vi phạm quy định bizwebmu's Avatar
    Ngày tham gia
    Feb 2010
    Bài viết
    33
    Thanks
    0
    Thanked 3 Times in 1 Post

    Ðề: Lập trình website MU

    I'm Hidden.

    Not Yahoo plz.........................
    Khách viếng thăm hãy cùng bizwebmu xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  9. #19
    Thành Viên YeuVo_ThuongCon's Avatar
    Ngày tham gia
    May 2006
    Đang ở
    Chuyển bị lặn
    Bài viết
    482
    Thanks
    13
    Thanked 357 Times in 119 Posts

    Ðề: Lập trình website MU

    Rất hay đó cậu bizwebmu ( chắc cậu là em lão Tùng hả )
    Các PRO Tha Em

  10. #20
    Thành Viên
    Ngày tham gia
    May 2006
    Bài viết
    395
    Thanks
    32
    Thanked 37 Times in 33 Posts

    Ðề: Lập trình website MU

    Ông này là code của lão tùng
    Khách viếng thăm hãy cùng vietpro8x xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

 

 
Trang 2 của 5 Đầu tiênĐầu tiên 1 2 3 4 ... CuốiCuối

Các Chủ đề tương tự

  1. Ý tưởng mới cho 1 website ss6 sắp ra mắt.
    Bởi vothailam trong diễn đàn SQL Server & Website
    Trả lời: 7
    Bài viết cuối: 30-05-11, 02:02 PM
  2. Mua Website thương mại!
    Bởi itatknic trong diễn đàn SQL Server & Website
    Trả lời: 3
    Bài viết cuối: 27-05-09, 10:26 AM
  3. Website New ! Nét Bạn Bè
    Bởi SuperXmen trong diễn đàn SQL Server & Website
    Trả lời: 34
    Bài viết cuối: 04-05-09, 11:12 AM
  4. phần website mình sử lý ra sao vậy
    Bởi kidthanh86 trong diễn đàn Các Server Không Nằm Trong Box
    Trả lời: 0
    Bài viết cuối: 27-05-08, 01:07 PM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 10:35 AM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.