<%
Dim blnOzelKapat
blnOzelKapat = CBool(Session("OzelKapat"))
Select Case intType
Case 0
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td><font color=7A7673>" & Time & "</font> <b><font color=black>(<font color=F74000>" & strAuthor & "</font><font color=black>)</font></b> " & strMessage & "</td></tr></table>"";")
Case 1
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td class=\""consolemessage\"">" & strMessage & "</td></tr></table>"";")
Response.Write(vbCrLf & "GMMSGSound();")
Case 2
Response.Write(vbCrLf & strMessage)
'Özel Mesaj
Case 3
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td class=\""privatemessage\""><font color=7A7673>" & Time & "</font> <b><font color=red>Özel Msj <font color=brown>" & strAuthor & "</font> Gönderdi:</font> " & strMessage & "</td></tr></b></table>"";")
Response.Write(vbCrLf & "PMMSGSound();")
Call WriteLog(strAuthor & "|>>> [" & strUsername & "] Özel Mesaj: [" & strMessage & "] (" & Time & ")")
End Select
Merhabalar Case3 bolumunde session kontrolu yapamıyorum if komutu olmadıgı ıcın else ıse yaramıyor Session("OzelKapat")=True ıle gırıs yapanlar yanı ozellerını kapatanlar Ozel mesaj kısmını kullanamasın ıstıyorum ben soyle bıseyler yaptım ama bı turlu calıstıramadım nerede hata yapıyorum
Case 3
Session("OzelKapat") = "True" then
Response.Write(vbCrLf & "addHTML += ""Özel Mesaj Yazamassınız!"";")
Case Else
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td class=\""privatemessage\""><font color=7A7673>" & Time & "</font> <b><font color=red>Özel Msj <font color=brown>" & strAuthor & "</font> Gönderdi:</font> " & strMessage & "</td></tr></b></table>"";")
Response.Write(vbCrLf & "PMMSGSound();")
Call WriteLog(strAuthor & "|>>> [" & strUsername & "] Özel Mesaj: [" & strMessage & "] (" & Time & ")")
End Select
yardımlarınızı beklıyorum lutfen :S
Case koşul komutu acil yardım?
6
●434
- 01-12-2010, 02:10:12
- 01-12-2010, 12:07:51Function Ozel_Kapat()
If Session("OzelKapat") = True then
Response.Write(vbCrLf & "addHTML += ""Özel Mesaj Yazamassınız!"";")
End If
End Function
strMessage = CheckForLink(strMessage)
Select Case intType
Case 0
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td><font color=7A7673>" & Time & "</font> <b><font color=black>(<font color=F74000>" & strAuthor & "</font><font color=black>)</font></b> " & strMessage & "</td></tr></table>"";")
Case 1
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td class=\""consolemessage\"">" & strMessage & "</td></tr></table>"";")
Response.Write(vbCrLf & "GMMSGSound();")
Case 2
Response.Write(vbCrLf & strMessage)
'PM
Case 3
Ozel_Kapat()
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td class=\""privatemessage\""><font color=7A7673>" & Time & "</font> <b><font color=red>Özel Msj <font color=brown>" & strAuthor & "</font> Gönderdi:</font> " & strMessage & "</td></tr></b></table>"";")
Response.Write(vbCrLf & "PMMSGSound();")
Call WriteLog(strAuthor & "|>>> [" & strUsername & "] Özel Mesaj: [" & strMessage & "] (" & Time & ")")
End Select
dediğiniz gibi bu şekilde uyguladım malesef çalışmıyor
- 01-12-2010, 12:51:57
<% Dim saryMessages Dim intArrayPass Dim intTempArrayPass Dim intLastMessageID Dim blnShowMessage Dim blnRecordstoShow Dim blnOzelKapat Dim blnFormatText blnOzelKapat = CBool(Session("OzelKapat")) blnFormatText = CBool(Session("FormatText")) intLastMessageID = Clng(Session("lastMessage")) strUsername = Session("Username") blnRecordstoShow = False If strUsername = "" OR CheckIfBanned(getIP()) Then Response.End 'Get the array If IsArray(Application(ApplicationMsg)) Then saryMessages = Application(ApplicationMsg) Else ReDim saryMessages(6, 0) Application.Lock Application(ApplicationMsg) = saryMessages Application.UnLock End If Response.Write(vbCrLf & "var addHTML = """";") For intArrayPass = 1 TO UBound(saryMessages, 2) 'Array Legend '0 = Author '1 = Message '2 = Date '3 = Type '4 = User ID, 0 = All '5 = Message ID Dim strAuthor Dim strMessage Dim dtmDate Dim intType '0 = Regular Chat '1 = Admin Chat '2 = New User '3 = User Left '4 = /me Command '5 = Private Message '6 = Command Notification Dim saryUserMsgTo Dim intMsgID blnShowMessage = True strAuthor = saryMessages(0, intArrayPass) strMessage = saryMessages(1, intArrayPass) dtmDate = saryMessages(2, intArrayPass) intType = saryMessages(3, intArrayPass) saryUserMsgTo = saryMessages(4, intArrayPass) intMsgID = Clng(saryMessages(5, intArrayPass)) If isArray(saryUserMsgTo) Then blnShowMessage = False For intTempArrayPass = 0 TO UBound(saryUserMsgTo) If saryUserMsgTo(intTempArrayPass) = strUsername Then blnShowMessage = True End If Next End If If blnShowMessage AND intMsgID > intLastMessageID Then If intType <> 1 Then If blnFormatText Then strMessage = Replace(strMessage, "\", "\\") strMessage = Replace(strMessage, """", "\""") strMessage = removeAllTags(strMessage) strAuthor = removeAllTagss(strAuthor) strMessage = FormatMessage(strMessage) Else strMessage = CleanMessage(strMessage) End If End If strMessage = CheckForLink(strMessage) Select Case intType Case 0 Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td><font color=7A7673>" & Time & "</font> <b><font color=black>(<font color=F74000>" & strAuthor & "</font><font color=black>)</font></b> " & strMessage & "</td></tr></table>"";") Case 1 Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td class=\""consolemessage\"">" & strMessage & "</td></tr></table>"";") Response.Write(vbCrLf & "GMMSGSound();") Case 2 Response.Write(vbCrLf & strMessage) 'PM Case 3 Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td class=\""privatemessage\""><font color=7A7673>" & Time & "</font> <b><font color=red>Özel Msj <font color=brown>" & strAuthor & "</font> Gönderdi:</font> " & strMessage & "</td></tr></b></table>"";") Response.Write(vbCrLf & "PMMSGSound();") Call WriteLog(strAuthor & "|>>> [" & strUsername & "] Özel Mesaj: [" & strMessage & "] (" & Time & ")") End Select blnRecordstoShow = True intLastMessageID = intMsgID Session("lastMessage") = intLastMessageID End If Next 'Extra javascript stuff If blnRecordstoShow Then Response.Write(vbCrLf & "var chatBoxHTML = document.getElementById(""chatBox"");") Response.Write(vbCrLf & "chatBoxHTML.innerHTML += addHTML;") Response.Write(vbCrLf & "toBottom()") End If %>Rica etsem senden bu koda dediğini uygulayabilirmisin ben başaramadımda ? - 01-12-2010, 14:59:44sadece case 3 kısmında if kontrolu kullandım
<%
Dim saryMessages
Dim intArrayPass
Dim intTempArrayPass
Dim intLastMessageID
Dim blnShowMessage
Dim blnRecordstoShow
Dim blnOzelKapat
Dim blnFormatText
blnOzelKapat = CBool(Session("OzelKapat"))
blnFormatText = CBool(Session("FormatText"))
intLastMessageID = Clng(Session("lastMessage"))
strUsername = Session("Username")
blnRecordstoShow = False
If strUsername = "" OR CheckIfBanned(getIP()) Then Response.End
'Get the array
If IsArray(Application(ApplicationMsg)) Then
saryMessages = Application(ApplicationMsg)
Else
ReDim saryMessages(6, 0)
Application.Lock
Application(ApplicationMsg) = saryMessages
Application.UnLock
End If
Response.Write(vbCrLf & "var addHTML = """";")
For intArrayPass = 1 TO UBound(saryMessages, 2)
'Array Legend
'0 = Author
'1 = Message
'2 = Date
'3 = Type
'4 = User ID, 0 = All
'5 = Message ID
Dim strAuthor
Dim strMessage
Dim dtmDate
Dim intType
'0 = Regular Chat
'1 = Admin Chat
'2 = New User
'3 = User Left
'4 = /me Command
'5 = Private Message
'6 = Command Notification
Dim saryUserMsgTo
Dim intMsgID
blnShowMessage = True
strAuthor = saryMessages(0, intArrayPass)
strMessage = saryMessages(1, intArrayPass)
dtmDate = saryMessages(2, intArrayPass)
intType = saryMessages(3, intArrayPass)
saryUserMsgTo = saryMessages(4, intArrayPass)
intMsgID = Clng(saryMessages(5, intArrayPass))
If isArray(saryUserMsgTo) Then
blnShowMessage = False
For intTempArrayPass = 0 TO UBound(saryUserMsgTo)
If saryUserMsgTo(intTempArrayPass) = strUsername Then
blnShowMessage = True
End If
Next
End If
If blnShowMessage AND intMsgID > intLastMessageID Then
If intType <> 1 Then
If blnFormatText Then
strMessage = Replace(strMessage, "\", "\\")
strMessage = Replace(strMessage, """", "\""")
strMessage = removeAllTags(strMessage)
strAuthor = removeAllTagss(strAuthor)
strMessage = FormatMessage(strMessage)
Else
strMessage = CleanMessage(strMessage)
End If
End If
strMessage = CheckForLink(strMessage)
Select Case intType
Case 0
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td><font color=7A7673>" & Time & "</font> <b><font color=black>(<font color=F74000>" & strAuthor & "</font><font color=black>)</font></b> " & strMessage & "</td></tr></table>"";")
Case 1
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td class=\""consolemessage\"">" & strMessage & "</td></tr></table>"";")
Response.Write(vbCrLf & "GMMSGSound();")
Case 2
Response.Write(vbCrLf & strMessage)
'PM
Case 3
if blnOzelKapat=true then
response.Write("özel mesajı kapattık")
else
Response.Write(vbCrLf & "addHTML += ""<table width=\""100%\""><tr><td class=\""privatemessage\""><font color=7A7673>" & Time & "</font> <b><font color=red>Özel Msj <font color=brown>" & strAuthor & "</font> Gönderdi:</font> " & strMessage & "</td></tr></b></table>"";")
Response.Write(vbCrLf & "PMMSGSound();")
Call WriteLog(strAuthor & "|>>> [" & strUsername & "] Özel Mesaj: [" & strMessage & "] (" & Time & ")")
end if
End Select
blnRecordstoShow = True
intLastMessageID = intMsgID
Session("lastMessage") = intLastMessageID
End If
Next
'Extra javascript stuff
If blnRecordstoShow Then
Response.Write(vbCrLf & "var chatBoxHTML = document.getElementById(""chatBox"");")
Response.Write(vbCrLf & "chatBoxHTML.innerHTML += addHTML;")
Response.Write(vbCrLf & "toBottom()")
End If
%> - 01-12-2010, 16:57:30Çok teşekkür ederim blue41 Allah razı olsun verdiğin kodu denedim şuan sorunsuz çalışmakta..
Çalışmalarında başarılar dilerim. Kolay gelsin.