Deaktiver HTML i asp
Hejza jeg vil geren ha så man ikek kan bruge html når man logger på min chat her er kille koden<!-- #include file="webchat.inc" -->
<%
Mode = Request("mode")
If Mode = "login" Then
%>
<script language="JavaScript">
<!--
window.open('chat.asp?mode=login&chatname=<%= Request("chatname") %>','','width=800,height=590');
location.href=".";
// -->
</script>
<%
Else
%>
<html>
<head>
<LINK href="style.css" type=text/css rel=stylesheet>
<script language="JavaScript">
<!--
function CheckLogin() {
if (document.loginFrm.chatname.value == "") {document.loginFrm.chatname.focus();return false;}
}
// -->
</script>
</head>
<body bgcolor="<%= BGColor1 %>" text="<%= TextColor2 %>" link="<%= LinkColor2 %>" alink="<%= LinkColor2 %>" vlink="<%= LinkColor2 %>" topmargin="20" leftmargin="20" onload="document.loginFrm.chatname.focus();">
<table border="0" width="100%" cellspacing="0" cellpadding="5" width="450">
<tr>
<td valign="top" align="left"><font size="5">Velkommen til WebChat</font></td>
</tr>
<tr>
<table>
<tr>
<td valign="top" align="left">
<form method="POST" action="default.asp" name="loginFrm" onsubmit="java script:return CheckLogin();">
<input type="hidden" name="mode" value="login">
<td valign="middle" align="left">User Name: <input type="text" name="chatname" size="20" maxlength="20" style="font-family: Verdana; font-size: 8 pt"></td>
<td valign="middle" align="left"><input type="submit" value="Log on" style="font-family: Verdana; font-size: 8 pt"></td>
</form>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" align="left"><b><u><br><br><br>Vegti inden du logger på</u></b></td>
</tr>
<tr>
<td valign="top" align="left">Webchat er udelukkende til Microsoft Internet Explorer.<br>
Hvis du vælger at bruge en anden browser, er det ikke min skyl det ikke fungerer korrekt.
<br><br><br><br>
</td>
</tr>
<tr>
<td valign="top" align="left"><b><u>Kontakt og fejlmelding</u></b></td>
</tr>
<tr>
<td valign="top" align="left"><br><br>WebChat er Vider udviklet fra SpimleChat´s Platform så det er en FreeWare og jeg vil også vider udvilke den som FreeWare til alle jer på nettet men har du en kommetar eller har du fundet en fejl og vil fortælle mig det, så send en
mail til <a href="mailto:xpmobil@msn.com">Xpmobil@msn.com</a>.</td>
</tr>
</table>
</body>
</html>
<%
End If
%>
og vis det er en lidt støre hjem så er mit chat vindu´s kille koder
<!-- #include file="webchat.inc" -->
<%
Response.Buffer = True
If Application("chatusers") = "" Then
Application("chatusers") = 0
End If
If Application("chatusers") < 0 Then
Application("chatusers") = 0
End If
Mode = Request("mode")
If Mode = "" Then
Response.Redirect "chat.asp?mode=error&type="
End If
If Mode = "login" Then
If Application("chatusers") = MaxUsers Then
Response.Redirect "chat.asp?mode=error&type="
Else
For x = 1 To MaxUsers
If Application("chatuser_" & x) = Request("chatname") Then
Response.Redirect "chat.asp?mode=error&type="
End If
Next
For x = 1 To MaxUsers
If Application("chatuser_" & x) = "" Then
Application("chatusers") = Application("chatusers") + 1
Application("chatuser_" & x) = Request("chatname")
Exit For
End If
Next
Session("chatname") = Request("chatname")
Session("chatuser") = x
For x = MaxPublicMessages To 2 Step -1
Application("publicmessage_" & x) = Application("publicmessage_" & x-1)
Next
Application("publicmessage_1") = "<b><font color='" & SystemColor & "'>System : " & Session("chatname") & " er logget på kl. " & time & "</font></b>"
%>
<html>
<head>
<LINK href="style.css" type=text/css rel=stylesheet>
<title><%= ChatTitle %></title>
<script language="JavaScript">
<!--
window.resizeTo(screen.availWidth,screen.availHeight);
window.moveTo(0,0);
function DoLogout() {
window.open('chat.asp?mode=logout&chatname=<%= Session("chatname") %>','','width=430,height=120');
}
//-->
</script>
</head>
<frameset framespacing="0" border="0" frameborder="0" rows="*,100" onunload="java script:DoLogout();">
<!-- <frame src="chat.asp?mode=bannerspace" name="bannerspace" marginwidth="15" marginheight="10" scrolling="no" noresize> -->
<frameset framespacing="0" border="0" frameborder="0" cols="180,*">
<frameset framespacing="0" border="0" frameborder="0" rows="25,*,150">
<frame src="chat.asp?mode=usersonline_header" marginwidth="20" marginheight="0" scrolling="no" noresize>
<frame src="chat.asp?mode=usersonline" marginwidth="15" marginheight="15" scrolling="auto" noresize>
<frameset framespacing="0" border="0" frameborder="0" rows="25,*">
<frame src="chat.asp?mode=functions_header" marginwidth="20" marginheight="0" scrolling="no" noresize>
<frame src="chat.asp?mode=functions" marginwidth="15" marginheight="15" scrolling="auto" noresize>
</frameset>
</frameset>
<frameset framespacing="0" border="0" frameborder="0" rows="*,150">
<frameset framespacing="0" border="0" frameborder="0" rows="25,*">
<frame src="chat.asp?mode=publicmessages_header" marginwidth="25" marginheight="0" scrolling="no" noresize>
<frame src="chat.asp?mode=publicmessages" name="publicmessages" marginwidth="20" marginheight="15" scrolling="auto" noresize>
</frameset>
<frameset framespacing="0" border="0" frameborder="0" rows="25,*">
<frame src="chat.asp?mode=privatmessages_header" marginwidth="25" marginheight="0" scrolling="no" noresize>
<frame src="chat.asp?mode=privatmessages" name="privatmessages" marginwidth="20" marginheight="15" scrolling="auto" noresize>
</frameset>
</frameset>
</frameset>
<frame src="chat.asp?mode=messagepanel" name="messagepanel" marginwidth="10" marginheight="10" scrolling="no" noresize>
<noframes>
<body>
</body>
</noframes>
</frameset>
</html>
<%
End If
End If
If Mode = "logout" Then
If Application("chatuser_" & Session("chatuser")) <> "" Then
For x = 1 To MaxPrivatMessages
Application("privatmessage_" & Request("chatname") & "_" & x) = ""
Next
For x = MaxPublicMessages To 2 Step -1
Application("publicmessage_" & x) = Application("publicmessage_" & x-1)
Next
Application("publicmessage_1") = "<b><font color='" & SystemColor & "'>Chatten : " & Session("chatname") & " er logget af kl. " & time & "</font></b>"
Application("chatusers") = Application("chatusers") - 1
Application("chatuser_" & Session("chatuser")) = ""
Session("chatname") = ""
Session("chatuser") = ""
End If
%><!-- #include file="html/logout.asp" --><%
End If
If Mode = "sendmessage" Then
If Application("chatuser_" & Session("chatuser")) = "" Then
%>
<script language="JavaScript">
<!--
top.location.href="chat.asp?mode=error";
// -->
</script>
<%
Else
If Request("messageto") = "public" Then
For x = MaxPublicMessages To 2 Step -1
Application("publicmessage_" & x) = Application("publicmessage_" & x-1)
Next
PublicMessage = Server.HTMLEncode(Request("message"))
Application("publicmessage_1") = "<b>" & Session("chatname") & " :</b> <font color='" & Request("textcolor") & "'>" & PublicMessage & "</font>"
Response.Redirect "chat.asp?mode=publicmessages"
Else
For x = MaxPrivatMessages To 2 Step -1
Application("privatmessage_" & Request("messageto") & "_" & x) = Application("privatmessage_" & Request("messageto") & "_" & x-1)
Application("privatmessage_" & Session("chatname") & "_" & x) = Application("privatmessage_" & Session("chatname") & "_" & x-1)
Next
PrivatMessage = Server.HTMLEncode(Request("message"))
Application("privatmessage_" & Request("messageto") & "_1") = "<b>" & Session("chatname") & " :</b> " & PrivatMessage
Application("privatmessage_" & Session("chatname") & "_1") = "<b>" & Session("chatname") & " :</b> " & PrivatMessage
Response.Redirect "chat.asp?mode=privatmessages"
End If
End If
End If
If Mode = "bannerspace" Then
%><!-- #include file="html/bannerspace.asp" --><%
End If
If Mode = "usersonline_header" Then
%><!-- #include file="html/usersonline_header.asp" --><%
End If
If Mode = "usersonline" Then
%><!-- #include file="html/usersonline.asp" --><%
End If
If Mode = "functions_header" Then
%><!-- #include file="html/functions_header.asp" --><%
End If
If Mode = "functions" Then
%><!-- #include file="html/functions.asp" --><%
End If
If Mode = "publicmessages_header" Then
%><!-- #include file="html/publicmessages_header.asp" --><%
End If
If Mode = "publicmessages" Then
%><!-- #include file="html/publicmessages.asp" --><%
End If
If Mode = "privatmessages_header" Then
%><!-- #include file="html/privatmessages_header.asp" --><%
End If
If Mode = "privatmessages" Then
%><!-- #include file="html/privatmessages.asp" --><%
End If
If Mode = "messagepanel" Then
%><!-- #include file="html/messagepanel.asp" --><%
End If
If Mode = "error" Then
%><!-- #include file="html/error.asp" --><%
End If
%>
så håber i kan hjælpe mig og forkla hvor jeg skal smide kdoen ind da jeg geren vil lræe det selv !! så den der komemr med det beste forklaninig få pointen førs til mølle for malet føst
