Planeta Priston
Seja Bem vindo ao Fórum Planeta Priston, Cadastre-se para total acesso ao Fórum.

Participe do fórum, é rápido e fácil

Planeta Priston
Seja Bem vindo ao Fórum Planeta Priston, Cadastre-se para total acesso ao Fórum.
Planeta Priston
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Adicionando 3 coroas de SoD

Ir para baixo

Adicionando 3 coroas de SoD Empty Adicionando 3 coroas de SoD

Mensagem  Kinho Dom Fev 19, 2012 1:06 pm

isClanMember.asp

Código:
<!-- #include file ="settings.asp" -->
<%
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Version 2.0 NOVEMBER 2006

' Assign Global Variables
Dim dbhost, dbuser, dbpass, dbname, userid, gserver, chname

Dim tTime
tTime = " ¿ÀÈÄ "

FillSettings()

Dim strSplit
strSplit = Chr("&H" & "0D")

' Parameter Variables
' isClanMember (userid, gserver, chname)
userid = Trim(Request("userid"))
gserver = Trim(Request("gserver"))
chname = Trim(Request("chname"))

if userid = "" Or gserver = "" Or chname = "" Then
   Response.Write("Code=100" & strSplit)
   Response.End
End if

Dim QUERY, RS, objConn

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=SQLOLEDB; Data Source=" & dbhost & "; Initial Catalog=" & dbname & "; User ID=" & dbuser & "; Password=" & dbpass

QUERY = "SELECT ClanName FROM UL WHERE ChName='" & chname & "'"

Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open QUERY, objConn, 3, 1

if RS.RecordCount = 0 Then
   RS.Close
   Set RS = Nothing
   objConn.Close
   Set objConn = Nothing
   Response.Write("Code=0" & strSplit & "CMoney=500000" & strSplit & "CNFlag=0" & strSplit)
   Response.End
End if

Dim clname
clname = RS("ClanName").Value
if clname = "" Then
   RS.Close
   QUERY = "DELETE FROM UL WHERE ChName='" & chname & "'"
   RS.Open QUERY, objConn, 3, 1
   Set RS = Nothing
   objConn.Close
   Set objConn = Nothing
   Response.Write("Code=0" & strSplit & "CMoney=500000" & strSplit & "CNFlag=0" & strSplit)
   Response.End
End if

RS.Close
QUERY = "SELECT ClanZang,MemCnt,Note,MIconCnt,RegiDate,LimitDate,PFlag,KFlag,ClanMoney,MIconCnt FROM CL WHERE ClanName='" & clname & "'"
RS.Open QUERY, objConn, 3, 1

if RS.RecordCount = 0 Then
   RS.Close
   QUERY = "DELETE FROM UL WHERE ChName='" & chname & "'"
   RS.Open QUERY, objConn, 3, 1
   Set RS = Nothing
   objConn.Close
   Set objConn = Nothing
   Response.Write("Code=0" & strSplit & "CMoney=500000" & strSplit & "CNFlag=0" & strSplit)
   Response.End
End if

Dim ClanLeader, ClanMembers, ClanNote, ClanIMG, CreateDate, ClanSubChief, EndDate, PFlag, KFlag, ClanMoney, iIMG
ClanLeader = RS("ClanZang").Value
ClanMembers = RS("MemCnt").Value
ClanNote = RS("Note").Value
ClanIMG = RS("MIconCnt").Value
CreateDate = RS("RegiDate").Value
EndDate = RS("LimitDate").Value
PFlag = RS("PFlag").Value
KFlag = RS("KFlag").Value
ClanMoney = RS("ClanMoney").Value
iIMG = RS("MIconCnt").Value

Dim strReturn

RS.Close

QUERY = "SELECT TOP 3 ClanName,Cpoint FROM CL ORDER BY Cpoint DESC"
RS.Open QUERY, objConn, 3, 3

Dim tclName, CNFlag

If RS.RecordCount > 0 Then
   tclName = RS("ClanName").Value
   If(tclName = clname) And (RS("Cpoint").Value > 0) Then
      CNFlag = 1
   Else
      CNFlag = 0
   RS.MoveNext
   tclName = RS("ClanName").Value
   If(tclName = clname) And (RS("Cpoint").Value > 0) Then
      CNFlag = 2
   Else
      CNFlag = 0
   RS.MoveNext
   tclName = RS("ClanName").Value
   If(tclName = clname) And (RS("Cpoint").Value > 0) Then
      CNFlag = 3
   
   Else
      CNFlag = 0
end if
end if

   End If
   RS.Close
End If


Dim tSubDate, tSubTime, y, tSub, tSub2
For y = 1 To Len(CreateDate)
   tSub = Mid(CreateDate,y,1)
   If tSub2 = 0 Then
      If Not tSub = " " Then
         tSubDate = tSubDate & tSub
      Else
         tSub2 = 1
      End If
   Else
      If tSub2 = 1 Then
         If Not tSub = " " Then
            tSubTime = tSubTime & tSub
         Else
            tSub2 = 2
         End If
      End If
   End If
Next

CreateDate = tSubDate & tTime & tSubTime
y = 1
tSub = ""
tSub2 = 0
tSubDate = ""
tSubTime = ""

For y = 1 To Len(EndDate)
   tSub = Mid(EndDate,y,1)
   If tSub2 = 0 Then
      If Not tSub = " " Then
         tSubDate = tSubDate & tSub
      Else
         tSub2 = 1
      End If
   Else
      If tSub2 = 1 Then
         If Not tSub = " " Then
            tSubTime = tSubTime & tSub
         Else
            tSub2 = 2
         End If
      End If
   End If
Next

EndDate = tSubDate & tTime & tSubTime

QUERY = "SELECT ChName FROM UL WHERE ClanName='" & clname & "' AND Permi=2"
RS.Open QUERY, objConn, 3, 1

If RS.RecordCount = 0 Then
   ClanSubChief = ""
Else
   ClanSubChief = RS("ChName").Value
End If

If ClanLeader = chname Then
   if ClanSubChief = "" Then
      strReturn = "Code=2" & strSplit & "CName=" & clname & strSplit & "CNote=" & ClanNote & strSplit & "CZang=" & ClanLeader & strSplit & "CStats=1" & strSplit & "CMCnt=" & ClanMembers & strSplit & "CIMG=" & ClanIMG & strSplit & "CSec=60" & strSplit & "CRegiD=" & CreateDate & strSplit & "CLimitD=" & EndDate & strSplit & "CDelActive=0" & strSplit & "CPFlag=" & PFlag & strSplit & "CKFlag=" & KFlag & strSplit & "CMoney=" & ClanMoney & strSplit & "CNFlag=" & CNFlag & strSplit
   Else
      strReturn = "Code=2" & strSplit & "CName=" & clname & strSplit & "CNote=" & ClanNote & strSplit & "CZang=" & ClanLeader & strSplit & "CSubChip=" & ClanSubChief & strSplit & "CStats=1" & strSplit & "CMCnt=" & ClanMembers & strSplit & "CIMG=" & ClanIMG & strSplit & "CSec=60" & strSplit & "CRegiD=" & CreateDate & strSplit & "CLimitD=" & EndDate & strSplit & "CDelActive=0" & strSplit & "CPFlag=" & PFlag & strSplit & "CKFlag=" & KFlag & strSplit & "CMoney=" & ClanMoney & strSplit & "CNFlag=" & CNFlag & strSplit
   End if
Else
   if ClanSubChief = "" Then
      strReturn = "Code=1" & strSplit & "CName=" & clname & strSplit & "CNote=" & ClanNote & strSplit & "CZang=" & ClanLeader & strSplit & "CStats=1" & strSplit & "CMCnt=" & ClanMembers & strSplit & "CIMG=" & ClanIMG & strSplit & "CSec=60" & strSplit & "CRegiD=" & CreateDate & strSplit & "CLimitD=" & EndDate & strSplit & "CDelActive=0" & strSplit & "CPFlag=0" & strSplit & "CKFlag=0" & strSplit & "CMoney=" & ClanMoney & strSplit & "CNFlag=" & CNFlag & strSplit
   Else
      strReturn = "Code=1" & strSplit & "CName=" & clname & strSplit & "CNote=" & ClanNote & strSplit & "CZang=" & ClanLeader & strSplit & "CSubChip=" & ClanSubChief & strSplit & "CStats=1" & strSplit & "CMCnt=" & ClanMembers & strSplit & "CIMG=" & ClanIMG & strSplit & "CSec=60" & strSplit & "CRegiD=" & CreateDate & strSplit & "CLimitD=" & EndDate & strSplit & "CDelActive=0" & strSplit & "CPFlag=0" & strSplit & "CKFlag=0" & strSplit & "CMoney=" & ClanMoney & strSplit & "CNFlag=" & CNFlag & strSplit
   End if
End if

RS.Close

If ClanSubChief = chname Then
   If Not ClanLeader = chname Then
      strReturn = "Code=5" & strSplit & "CName=" & clname & strSplit & "CNote=" & ClanNote & strSplit & "CZang=" & ClanLeader & strSplit & "CSubChip=" & ClanSubChief & strSplit & "CStats=1" & strSplit & "CMCnt=" & ClanMembers & strSplit & "CIMG=" & ClanIMG & strSplit & "CSec=60" & strSplit & "CRegiD=" & CreateDate & strSplit & "CLimitD=" & EndDate & strSplit & "CDelActive=0" & strSplit & "CPFlag=" & PFlag & strSplit & "CKFlag=" & KFlag & strSplit & "CMoney=" & ClanMoney & strSplit & "CNFlag=" & CNFlag & strSplit
   End If
End if

QUERY = "UPDATE UL SET MIconCnt='" & iIMG & "' WHERE ChName='" & chname & "'"
RS.Open QUERY, objConn, 3, 1

Set RS = Nothing
objConn.Close
Set objConn = Nothing

Response.Write(strReturn)
%>

Créditos: MaK
Kinho
Kinho
Colaborador
Colaborador

Mensagens : 35
Pontos : 78
Reputação : 1
Data de inscrição : 18/02/2012
Idade : 29
Localização : Rio de Janeiro

Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos