Oddio...e come faccio????.....sinceramente sono alla prime armi con asp e non so molto dove mettere mano sul codici..il codice che uso per mandare i mess è questo...non è che potresti dirmi dove modificarlo...sempre che non ti distrurbi, ma è vitale praticamente che io riesca a inserire i mess privati nella chat.
Scusa il distrubo e grazie!!!!!!!!!!!!!!
Codice
------------------------------------------
<%@ Language=VBScript %>
<%
Option Explicit
Dim Text, TempArray
If Not Request("Message") = "" Or Not Request("Emotion") = "" Then
Text = CStr(Replace(Request("Message"),"'","`"))
If Application("TPlace") > 49 Then
Application("TPlace") = 0
End If
If (Left(UCase(Text),2) = "/H") Or (Left(Text,2) = "/?") Or (UCase(Text) = "HELP") Then
%>
<script language="JavaScript">
<!--
//
{
window.open("Help.htm","Help","width=130,height=300,screenX=50,screenY=0,scrollbars=no,toolbar=no,menubar=no,resizable=no,locationbar=no,hotkeys=no");
}
// -->
</script>
<%
ElseIf Left(UCase(Text),2) = "/Q" Then
Application.LOCK
If Application("TPlace") > 49 Then
Application("TPlace") = 0
End If
TempArray = Application("Talk")
TempArray(Application("TPLACE")) = "<img src=Images/Exit.gif> " & "<b>" & Session("ID") & "</b><font color=red> has left. " & Now() & "</font>"
Application("Talk") = TempArray
Application("TPlace") = Application("TPlace")+1
Application.Unlock
Session.Abandon()
%>
<script language="JavaScript">
<!--
{
parent.close();
}
//-->
</script>
<%
ElseIf Left(UCase(Text),2) = "/R" Then
'Change the refresh rate
Dim Refresh
Refresh = UCase(Text)
Refresh = Replace(Refresh, "/R", "")
'We should be left with a number
If IsNumeric(Refresh) Then
Session("Refresh") = Refresh
End If
Else
Application.LOCK
Text = CheckProfanity( Text )'Check for Profanity
If Left(UCase(text),3) = "ZZZ" Then text = "I'm falling asleep here. Is anyone home?!"
text = CStr(Replace(text,"<","<"))
text = CStr(Replace(text,">",">"))
text = CStr(Replace(text,":-)", "<img src='1.gif'>"))
text = CStr(Replace(text,";-)", "<img src='20.gif'>"))
text = CStr(Replace(text,":-(", "<img src='3.gif'>"))
text = CStr(Replace(text,":-|", "<img src='4.gif'>"))
text = CStr(Replace(text,":-@", "<img src='5.gif'>"))
text = CStr(Replace(text,":-?", "<img src='6.gif'>"))
text = CStr(Replace(text,":-!", "<img src='7.gif'>"))
text = CStr(Replace(text,"(s)", "<img src='8.gif'>"))
text = CStr(Replace(text,"(h)", "<img src='9.gif'>"))
text = CStr(Replace(text,":(", "<img src='10.gif'>"))
text = CStr(Replace(text,":_(", "<img src='12.gif'>"))
text = CStr(Replace(text,"(sorrisone)", "<img src='13.gif'>"))
text = CStr(Replace(text,":)", "<img src='14.gif'>"))
text = CStr(Replace(text,"(b)", "<img src='15.gif'>"))
text = CStr(Replace(text,"(baz)", "<img src='16.gif'>"))
text = CStr(Replace(text,"(sadik)", "<img src='17.gif'>"))
text = CStr(Replace(text,"(besos)", "<img src='18.gif'>"))
text = CStr(Replace(text,"(torta)", "<img src='19.gif'>"))
text = CStr(Replace(text,"(bm!)", "<img src='21.gif'>"))
text = CStr(Replace(text,":-d", "<img src='25.gif'>"))
text = CStr(Replace(text,"(i)", "<img src='22.gif'>"))
text = CStr(Replace(text,"(l)", "<img src='23.gif'>"))
text = CStr(Replace(text,"(inc)", "<img src='24.gif'>"))
text = CStr(Replace(text,":-o", "<img src='26.gif'>"))
text = CStr(Replace(text,":p", "<img src='27.gif'>"))
'Replace words with symbols
'text = CStr(Replace(UCase(text), "LOVE", "<img src='9.gif'>"))
TempArray = Application("Talk")
TempArray(Application("TPLACE")) ="<img src=logomini.gif><font face=tahoma size=1><b> " & Session("ID") & "</b>: </font><font face=tahoma color=maroon size=1>" & Request.Form("emotion") & "</b></font>" & text & "</b></font>"
Application("Talk") = TempArray
Application("TPlace") = Application("TPlace")+1
Application.Unlock
End If
End If
%>
<html>
<head>
<title>Chat</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body BGCOLOR="#003366" LANGUAGE="javascript" onload="document.SENDMSG.Message.focus();">
<form METHOD="POST" ACTION="Message.asp" name="SENDMSG">
<table width="640" cellspacing="0" cellpadding="0" border="0" height="0">
<tr>
<td width="470">
<input NAME="Message" TYPE="TEXT" VALUE SIZE="45">
<font size="1"> <a href="index3.htm">
<map name="Map">
<area shape="rect" coords="3,3,83,24" href="index3.htm">
<area shape="rect" coords="78,1,81,5" href="#">
</map>
</a></font> </td>
<td width="170" rowspan="4" align="center" valign="top" bordercolor="#FFFF00" bgcolor="#FFFF00">
</form>
</td>
</tr>
<tr>
<td width="470" background="images/stripesgray.gif" valign="middle" align="left"><font face="Tahoma" size="1" color="#339966">
<div style="letter-spacing:0.3em;"></div>
</font></td>
</tr>
<tr>
<td width="470" valign="middle" align="center">
<!-- Start:Advertising -->
<!-- End:Advertising -->
</td>
</tr>
<tr>
<td width="470" background="images/stripesgray.gif" align="right" valign="middle">
<font face="Tahoma" size="1" color="#339966"> </font>
<div style="letter-spacing:0.3em;">
<div id="Layer1" style="position:absolute; left:383px; top:0px; width:293px; height:148px; z-index:1">
<div align="left"><img src="index.jpg" width="296" height="128"></div>
</div>
</div>
</td>
</tr>
</body>
</html>
<%
Function CheckProfanity( Text )
Dim arrSwear, x, n
'Get the Arrays
arrSwear = Application("SwearWords")
Text = Split(Text, " ")
For x = LBound(Text) To UBound(Text)
'Check if it is profane
For n = LBound(arrSwear) To UBound(arrSwear)
If InStr(UCase(Text(x)), arrSwear(n)) > 0 Then
Text(x) = "@#$"
Exit For
End If
Next
Next
CheckProfanity = Join(Text, " ")
End Function