<%
Function getuserallczjf170824(czje, czjifen, cztype, czbili, czextra, isuzdy)
  If czje = "" Or IsNull(czje) Then
    getuserallczjf170824 = "0,0,0"
    Exit Function
  End If
  If Not IsNumeric(czje) Then
    getuserallczjf170824 = "0,0,0"
    Exit Function
  End If
  czgivejf = 0
  ewgivejf = 0
  If czjifen<>"" And InStr(czjifen, "|")>0 And InStr(czjifen, ",")>0 Then
    czjifenjegroup1 = Split(czjifen, "|")(0)
    spczjifenjegroup1 = Split(czjifenjegroup1, ",")
    ubczjifenjegroup1 = UBound(spczjifenjegroup1)
    czjifenjfgroup1 = Split(czjifen, "|")(1)
    spczjifenjfgroup1 = Split(czjifenjfgroup1, ",")
    ubczjifenjfgroup1 = UBound(spczjifenjfgroup1)
    If ubczjifenjegroup1>ubczjifenjfgroup1 Then
      uball = ubczjifenjfgroup1
    Else
      uball = ubczjifenjegroup1
    End If
    Select Case cztype
      Case 1
        For adri1 = 0 To uball
          If CSng(czje) = CSng(spczjifenjegroup1(adri1)) Then
            czgivejf = spczjifenjfgroup1(adri1)
            Exit For
          End If
        Next
      Case 2
        If isuzdy = 1 Then
          czgivejf = czje
        Else
          For adri1 = 0 To uball
            If CSng(czje) = CSng(spczjifenjegroup1(adri1)) Then
              czgivejf = spczjifenjegroup1(adri1)
            Else
            End If
          Next
        End If
        czgivejf = czgivejf * czbili
    End Select
  End If
  If czextra<>"" And InStr(czextra, "|")>0 And InStr(czextra, ",")>0 Then
    czextrajegroup = Split(czextra, "|")(0)
    spczextrajegroup = Split(czextrajegroup, ",")
    ubczextrajegroup = UBound(spczextrajegroup)
    czextrajfgroup = Split(czextra, "|")(1)
    spczextrajfgroup = Split(czextrajfgroup, ",")
    ubczextrajfgroup = UBound(spczextrajfgroup)
    If ubczextrajegroup>ubczextrajfgroup Then
      uball2 = ubczextrajfgroup
    Else
      uball2 = ubczextrajegroup
    End If
    For adri2 = 0 To uball2
      If CSng(czje)>= CSng(spczextrajegroup(adri2)) Then
        ewgivejf = spczextrajfgroup(adri2)
      Else
        Exit For
      End If
    Next
  End If
  getuserallczjf170824 = czgivejf&","&ewgivejf&","&CSng(czgivejf) + CSng(ewgivejf)
End Function

Function crordernum170824()
  num1 = FormatDate(Now(), 14)
  num2 = gen_key(5)
  crordernum170824 = num1&num2
End Function


Function formatnum2w170824(byval num)
  'num=FormatNumber(num,2)
  If InStr(num, ".") = 1 Then num = "0"&num
  formatnum2w170824 = num
End Function


Function urlsport170824()
  sName = Request.ServerVariables("SERV"&"ER_NAME")
  sPort = Request.ServerVariables("SERV"&"ER_PORT")
  sinfo = Request.ServerVariables("PAT"&"H_INFO")
  If sport<>"80" And sport<>"" Then
    sports = ":"&sport
  Else
    sports = ""
  End If
  url = "http://"&sName&sports&sinfo
  spurl = Split(url, "/")
  uburl = UBound(spurl)
  urlsport170824 = Replace(url, "/"&spurl(uburl -1)&"/"&spurl(uburl), "")
End Function



%>