Avatar billede pacroonold Nybegynder
20. marts 2000 - 07:22 Der er 18 kommentarer og
2 løsninger

HJÆLP TIL CHAT, 1000 p. GIVES !

Jeg har en chat, som skal laves lidt om... Først og fremmest skal brugeren automatisk blive logget af, hvis han ikke har været aktiv i fx. 10 min.
Og i denne her chat, kan man skrive en kode og så kommer der et eller andet billede frem...Det er ikke så godt, for det tager på serverens kræfter... Og hvis i gider, så må der også gerne være en kick out user, som kun brugeren "Admin" må bruge...

Håber der er en flink programør derude...

Mvh.
Pacroon
-------
Avatar billede pacroonold Nybegynder
20. marts 2000 - 07:23 #1
Og hvis det ikke er nok, må vi jo finde ud af nogle bannerreklamer på min side...
Avatar billede pacroonold Nybegynder
20. marts 2000 - 07:24 #2
index.asp
---------
<html>
<head>
<title>Chat</title>
<style>
<!--
A:link    {text-decoration: none; color: #FFFFFF }
A:visited {text-decoration: none; color: #FFFFFF }
A:active  {text-decoration: none; color: #OOOOOO }
A:hover     {text-decoration: underline; color: #FFFFFF }
-->
</style>
</head>
<body bgcolor="#000000" text="#FFFFFF">
<script language="javascript">

function chat() {
  window.open("default.asp", "new", "resizable=0,scrollbars=0,toolbar=0,location=0,menubar=0,status=0,width=700,height=550")
}

</script>

<table border="0" width="31%" cellspacing="0" cellpadding="0" height="73">
  <tr>
    <td width="100%" bgcolor="#636363" height="21">&nbsp;<font face="Verdana" size="2">Chat:</font></td>
  </tr>
  <tr>
    <td width="100%" height="21"></td>
  </tr>
  <tr>
    <td width="100%" height="21"><font size="2" face="Verdana"><a href="java script:chat()">Indgangen:</a></font></td>
  </tr>
  <tr>
    <td width="100%" height="10" valign="top"><% If Application("user1") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user1") & "'>" & Application("user1") & "</a> - </font>"
                                                If Application("user2") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user2") & "'>" & Application("user2") & "</a> - </font>"
                                                If Application("user3") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user3") & "'>" & Application("user3") & "</a> - </font>"
                                                If Application("user4") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user4") & "'>" & Application("user4") & "</a> - </font>"
                                                If Application("user5") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user5") & "'>" & Application("user5") & "</a> - </font>" & vbCrLf
                                                If Application("user6") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user6") & "'>" & Application("user6") & "</a> - </font>"
                                                If Application("user7") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user7") & "'>" & Application("user7") & "</a> - </font>"
                                                If Application("user8") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user8") & "'>" & Application("user8") & "</a> - </font>"
                                                If Application("user9") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user9") & "'>" & Application("user9") & "</a> - </font>"
                                                If Application("user10") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user10") & "'>" & Application("user10") & "</a> - </font>" & vbCrLf
                                                If Application("user11") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user11") & "'>" & Application("user11") & "</a> - </font>"
                                                If Application("user12") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user12") & "'>" & Application("user12") & "</a> - </font>"
                                                If Application("user13") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user13") & "'>" & Application("user13") & "</a> - </font>"
                                                If Application("user14") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user14") & "'>" & Application("user14") & "</a> - </font>"
                                                If Application("user15") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user15") & "'>" & Application("user15") & "</a> - </font>" & vbCrLf
                                                If Application("user16") <> "" Then Response.Write "<font size=1 face=Verdana><a href='..//view.asp?mode=bruger&navn=" & Application("user16") & "'>" & Application("user16") & "</a> - </font>"
                                                If Application("user17") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user17") & "'>" & Application("user17") & "</a> - </font>"
                                                If Application("user18") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user18") & "'>" & Application("user18") & "</a> - </font>"
                                                If Application("user19") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user19") & "'>" & Application("user19") & "</a> - </font>"
                                                If Application("user20") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user20") & "'>" & Application("user20") & "</a> - </font>" & vbCrLf
                                                If Application("user21") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user21") & "'>" & Application("user21") & "</a> - </font>"
                                                If Application("user22") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user22") & "'>" & Application("user22") & "</a> - </font>"
                                                If Application("user23") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user23") & "'>" & Application("user23") & "</a> - </font>"
                                                If Application("user24") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user24") & "'>" & Application("user24") & "</a> - </font>"
                                                If Application("user25") <> "" Then Response.Write "<font size=1 face=Verdana><a href='../view.asp?mode=bruger&navn=" & Application("user25") & "'>" & Application("user25") & "</a></font>"
                                              %>
    </td>
  </tr>
</table>

</body>
</html>
Avatar billede pacroonold Nybegynder
20. marts 2000 - 07:24 #3
Logoff.asp
----------
<%
BrugerNummer = request("userID")

  For userID = 1 to 15
    If Application("user" & userID) <> "" Then
      Application("user" & userID & "txt25") = Application("user" & userID & "txt24")
      Application("user" & userID & "txt24") = Application("user" & userID & "txt23")
      Application("user" & userID & "txt23") = Application("user" & userID & "txt22")
      Application("user" & userID & "txt22") = Application("user" & userID & "txt21")
      Application("user" & userID & "txt21") = Application("user" & userID & "txt20")
      Application("user" & userID & "txt20") = Application("user" & userID & "txt19")
      Application("user" & userID & "txt19") = Application("user" & userID & "txt18")
      Application("user" & userID & "txt18") = Application("user" & userID & "txt17")
      Application("user" & userID & "txt17") = Application("user" & userID & "txt16")
      Application("user" & userID & "txt16") = Application("user" & userID & "txt15")
      Application("user" & userID & "txt15") = Application("user" & userID & "txt14")
      Application("user" & userID & "txt14") = Application("user" & userID & "txt13")
      Application("user" & userID & "txt13") = Application("user" & userID & "txt12")
      Application("user" & userID & "txt12") = Application("user" & userID & "txt11")
      Application("user" & userID & "txt11") = Application("user" & userID & "txt10")
      Application("user" & userID & "txt10") = Application("user" & userID & "txt9")
      Application("user" & userID & "txt9") = Application("user" & userID & "txt8")
      Application("user" & userID & "txt8") = Application("user" & userID & "txt7")
      Application("user" & userID & "txt7") = Application("user" & userID & "txt6")
      Application("user" & userID & "txt6") = Application("user" & userID & "txt5")
      Application("user" & userID & "txt5") = Application("user" & userID & "txt4")
      Application("user" & userID & "txt4") = Application("user" & userID & "txt3")
      Application("user" & userID & "txt3") = Application("user" & userID & "txt2")
      Application("user" & userID & "txt2") = Application("user" & userID & "txt1")
      Application("user" & userID & "txt1") = "<font face=Verdana size=1 color=#FFFFFF>System: " & Application("user" & BrugerNummer) & " er logget af chatten kl. " & time & "</font>"
    End if
  Next

Response.Cookies("Chat")("Login") = ""
Application("user" & BrugerNummer) = ""
Application("user" & BrugerNummer & "ip") = ""
Application("user" & BrugerNummer & "txt13") = ""
Application("user" & BrugerNummer & "txt12") = ""
Application("user" & BrugerNummer & "txt11") = ""
Application("user" & BrugerNummer & "txt10") = ""
Application("user" & BrugerNummer & "txt9") = ""
Application("user" & BrugerNummer & "txt8") = ""
Application("user" & BrugerNummer & "txt7") = ""
Application("user" & BrugerNummer & "txt6") = ""
Application("user" & BrugerNummer & "txt5") = ""
Application("user" & BrugerNummer & "txt4") = ""
Application("user" & BrugerNummer & "txt3") = ""
Application("user" & BrugerNummer & "txt2") = ""
Application("user" & BrugerNummer & "txt1") = ""

%>
<script language="javascript">
self.close()
</script>
Avatar billede pacroonold Nybegynder
20. marts 2000 - 07:25 #4
message.asp
-----------

<%
Session("selected") = request("user")
BrugerNummer = request("userID")
BeskedSendt = False

Function Skift(nummer)
  Application("user" & nummer & "txt44") = Application("user" & nummer & "txt43")
  Application("user" & nummer & "txt43") = Application("user" & nummer & "txt42")
  Application("user" & nummer & "txt42") = Application("user" & nummer & "txt41")
  Application("user" & nummer & "txt41") = Application("user" & nummer & "txt40")
  Application("user" & nummer & "txt40") = Application("user" & nummer & "txt39")
  Application("user" & nummer & "txt39") = Application("user" & nummer & "txt38")
  Application("user" & nummer & "txt38") = Application("user" & nummer & "txt37")
  Application("user" & nummer & "txt37") = Application("user" & nummer & "txt36")
  Application("user" & nummer & "txt36") = Application("user" & nummer & "txt35")
  Application("user" & nummer & "txt35") = Application("user" & nummer & "txt34")
  Application("user" & nummer & "txt34") = Application("user" & nummer & "txt33")
  Application("user" & nummer & "txt33") = Application("user" & nummer & "txt32")
  Application("user" & nummer & "txt32") = Application("user" & nummer & "txt31")
  Application("user" & nummer & "txt31") = Application("user" & nummer & "txt30")
  Application("user" & nummer & "txt30") = Application("user" & nummer & "txt29")
  Application("user" & nummer & "txt29") = Application("user" & nummer & "txt28")
  Application("user" & nummer & "txt28") = Application("user" & nummer & "txt27")
  Application("user" & nummer & "txt27") = Application("user" & nummer & "txt26")
  Application("user" & nummer & "txt26") = Application("user" & nummer & "txt25")
  Application("user" & nummer & "txt25") = Application("user" & nummer & "txt24")
  Application("user" & nummer & "txt24") = Application("user" & nummer & "txt23")
  Application("user" & nummer & "txt23") = Application("user" & nummer & "txt22")
  Application("user" & nummer & "txt22") = Application("user" & nummer & "txt21")
  Application("user" & nummer & "txt21") = Application("user" & nummer & "txt20")
  Application("user" & nummer & "txt20") = Application("user" & nummer & "txt19")
  Application("user" & nummer & "txt19") = Application("user" & nummer & "txt18")
  Application("user" & nummer & "txt18") = Application("user" & nummer & "txt17")
  Application("user" & nummer & "txt17") = Application("user" & nummer & "txt16")
  Application("user" & nummer & "txt16") = Application("user" & nummer & "txt15")
  Application("user" & nummer & "txt15") = Application("user" & nummer & "txt14")
  Application("user" & nummer & "txt14") = Application("user" & nummer & "txt13")
  Application("user" & nummer & "txt13") = Application("user" & nummer & "txt12")
  Application("user" & nummer & "txt12") = Application("user" & nummer & "txt11")
  Application("user" & nummer & "txt11") = Application("user" & nummer & "txt10")
  Application("user" & nummer & "txt10") = Application("user" & nummer & "txt9")
  Application("user" & nummer & "txt9") = Application("user" & nummer & "txt8")
  Application("user" & nummer & "txt8") = Application("user" & nummer & "txt7")
  Application("user" & nummer & "txt7") = Application("user" & nummer & "txt6")
  Application("user" & nummer & "txt6") = Application("user" & nummer & "txt5")
  Application("user" & nummer & "txt5") = Application("user" & nummer & "txt4")
  Application("user" & nummer & "txt4") = Application("user" & nummer & "txt3")
  Application("user" & nummer & "txt3") = Application("user" & nummer & "txt2")
  Application("user" & nummer & "txt2") = Application("user" & nummer & "txt1")
End function

If Request.Form("besked") <> "" Then
  If Request.Form("user") = "all" Then
For userID = 1 to 20
    If Application("user" & userID) <> "" Then
        Call Skift(userID)
        Application("user" & userID & "txt1") = "<b><font face=Verdana size=1 color=#66CCFF>" & now & "</font><font face=Verdana size=1 color=#66CCFF> <a href='../view.asp?mode=bruger&navn=" & Request.Form("nick") & "' target='main'>" & Request.Form("nick") & "</a> : </font><font face=Verdana size=1 color=#ffffff> " & Request.Form("besked") & "</font>"
      End if
    Next
  Else
    For userID = 1 to 20
      If Application("user" & userID) <> "" Then
        If (userID & "t") = (Request.Form("user") & "t") Then
          If (userID & "t") = (Request.Form("user") & "t") Then
            BeskedSendt = True
          End if
          Call Skift(userID)
          Application("user" & userID & "txt1") = "<b><font face=Verdana size=1 color=#ccbb99>" & now & "</font><font face=Verdana size=1 color=#ffeecc><a href='../view.asp?mode=bruger&navn=" & Request.Form("nick") & "' target='main'>" & Request.Form("nick") & "</a> : </font><font face=Verdana size=1 color=#ffffff> [ til " & Application("user" & Request.Form("user")) & " ] " & Request.Form("besked") & "</font></b>"
        End if
      End if
    Next
    If BeskedSendt = True Then
      Call Skift(BrugerNummer)
      Application("user" & BrugerNummer & "txt1") = "<b><font face=Verdana size=1 color=#66CCFF>" & now & "</font><font face=Verdana size=1 color=#ffeecc> <a href='../view.asp?mode=bruger&navn=" & Request.Form("nick") & "' target='main'>" & Request.Form("nick") & "</a> : </font><font face=Verdana size=1 color=#ffffff> [ til " & Application("user" & Request.Form("user")) & " ] " & Request.Form("besked") & "</font></b>"
    Else
      Call Skift(BrugerNummer)
      Application("user" & BrugerNummer & "txt1") = "<font face=Verdana size=1 color=#66CCFF><b>System: [ til " & Request.Form("Nick") & " ] Ingen kontakt til kaldte bruger, fordi han/hun er logget af..</b></font>"
    End if
  End if
End if
%>
<html>
<head>
<title>Motellet - Chat</title>
</head>
<body bgcolor="#000000" text="#FFFFFF" onload="document.chat.besked.focus()">
<form action="message.asp" method="post" name="chat">
  <input type="hidden" name="hidden">
<table border="0" width="680" cellspacing="0" cellpadding="0">
  <tr>
    <td width="195"><input name="besked" type="text" size="25" value=""></td>
    <td width="40"><select name="user" size="1">
    <option value="all" selected>Alle <%
If not Application("user1") = Application("user" & BrugerNummer) then
If Application("user1") <> "" then
If session("selected") = "1" then
Response.Write "<option value=1 selected>" & Application("user1")
else
Response.Write "<option value=1>" & Application("user1")
End If
End If
End If
If not Application("user2") = Application("user" & BrugerNummer) then
If Application("user2") <> "" then
If session("selected") = "2" then
Response.Write "<option value=2 selected>" & Application("user2")
else
Response.Write "<option value=2>" & Application("user2")
End If
End If
End If
If not Application("user3") = Application("user" & BrugerNummer) then
If Application("user3") <> "" then
If session("selected") = "3" then
Response.Write "<option value=3 selected>" & Application("user3")
else
Response.Write "<option value=3>" & Application("user3")
End If
End If
End If
If not Application("user4") = Application("user" & BrugerNummer) then
If Application("user4") <> "" then
If session("selected") = "4" then
Response.Write "<option value=4 selected>" & Application("user4")
else
Response.Write "<option value=4>" & Application("user4")
End If
End If
End If
If not Application("user5") = Application("user" & BrugerNummer) then
If Application("user5") <> "" then
If session("selected") = "5" then
Response.Write "<option value=5 selected>" & Application("user5")
else
Response.Write "<option value=5>" & Application("user5")
End If
End If
End If
If not Application("user6") = Application("user" & BrugerNummer) then
If Application("user6") <> "" then
If session("selected") = "6" then
Response.Write "<option value=6 selected>" & Application("user6")
else
Response.Write "<option value=6>" & Application("user6")
End If
End If
End If
If not Application("user7") = Application("user" & BrugerNummer) then
If Application("user7") <> "" then
If session("selected") = "7" then
Response.Write "<option value=7 selected>" & Application("user7")
else
Response.Write "<option value=7>" & Application("user7")
End If
End If
End If
If not Application("user8") = Application("user" & BrugerNummer) then
If Application("user8") <> "" then
If session("selected") = "8" then
Response.Write "<option value=8 selected>" & Application("user8")
else
Response.Write "<option value=8>" & Application("user8")
End If
End If
End If
If not Application("user9") = Application("user" & BrugerNummer) then
If Application("user9") <> "" then
If session("selected") = "9" then
Response.Write "<option value=9 selected>" & Application("user9")
else
Response.Write "<option value=9>" & Application("user8")
End If
End If
End If
If not Application("user10") = Application("user" & BrugerNummer) then
If Application("user10") <> "" then
If session("selected") = "10" then
Response.Write "<option value=10 selected>" & Application("user10")
else
Response.Write "<option value=10>" & Application("user10")
End If
End If
End If
If not Application("user11") = Application("user" & BrugerNummer) then
If Application("user11") <> "" then
If session("selected") = "11" then
Response.Write "<option value=11 selected>" & Application("user11")
else
Response.Write "<option value=11>" & Application("user11")
End If
End If
End If
If not Application("user12") = Application("user" & BrugerNummer) then
If Application("user12") <> "" then
If session("selected") = "12" then
Response.Write "<option value=12 selected>" & Application("user12")
else
Response.Write "<option value=12>" & Application("user12")
End If
End If
End If
If not Application("user13") = Application("user" & BrugerNummer) then
If Application("user13") <> "" then
If session("selected") = "13" then
Response.Write "<option value=13 selected>" & Application("user13")
else
Response.Write "<option value=13>" & Application("user13")
End If
End If
End If
If not Application("user14") = Application("user" & BrugerNummer) then
If Application("user14") <> "" then
If session("selected") = "14" then
Response.Write "<option value=14 selected>" & Application("user14")
else
Response.Write "<option value=14>" & Application("user14")
End If
End If
End If
If not Application("user15") = Application("user" & BrugerNummer) then
If Application("user15") <> "" then
If session("selected") = "15" then
Response.Write "<option value=15 selected>" & Application("user15")
else
Response.Write "<option value=15>" & Application("user15")
End If
End If
End If
If not Application("user16") = Application("user" & BrugerNummer) then
If Application("user16") <> "" then
If session("selected") = "16" then
Response.Write "<option value=16 selected>" & Application("user16")
else
Response.Write "<option value=16>" & Application("user16")
End If
End If
End If
If not Application("user17") = Application("user" & BrugerNummer) then
If Application("user17") <> "" then
If session("selected") = "17" then
Response.Write "<option value=17 selected>" & Application("user17")
else
Response.Write "<option value=17>" & Application("user17")
End If
End If
End If
If not Application("user18") = Application("user" & BrugerNummer) then
If Application("user18") <> "" then
If session("selected") = "18" then
Response.Write "<option value=18 selected>" & Application("user18")
else
Response.Write "<option value=18>" & Application("user18")
End If
End If
End If
If not Application("user19") = Application("user" & BrugerNummer) then
If Application("user19") <> "" then
If session("selected") = "19" then
Response.Write "<option value=19 selected>" & Application("user19")
else
Response.Write "<option value=19>" & Application("user19")
End If
End If
End If
If not Application("user20") = Application("user" & BrugerNummer) then
If Application("user20") <> "" then
If session("selected") = "20" then
Response.Write "<option value=20 selected>" & Application("user20")
else
Response.Write "<option value=20>" & Application("user20")
End If
End If
End If
If not Application("user21") = Application("user" & BrugerNummer) then
If Application("user21") <> "" then
If session("selected") = "21" then
Response.Write "<option value=21 selected>" & Application("user21")
else
Response.Write "<option value=21>" & Application("user21")
End If
End If
End If
If not Application("user22") = Application("user" & BrugerNummer) then
If Application("user22") <> "" then
If session("selected") = "22" then
Response.Write "<option value=22 selected>" & Application("user22")
else
Response.Write "<option value=22>" & Application("user22")
End If
End If
End If
If not Application("user23") = Application("user" & BrugerNummer) then
If Application("user23") <> "" then
If session("selected") = "23" then
Response.Write "<option value=23 selected>" & Application("user23")
else
Response.Write "<option value=23>" & Application("user23")
End If
End If
End If
If not Application("user24") = Application("user" & BrugerNummer) then
If Application("user24") <> "" then
If session("selected") = "24" then
Response.Write "<option value=24 selected>" & Application("user24")
else
Response.Write "<option value=24>" & Application("user24")
End If
End If
End If
If not Application("user25") = Application("user" & BrugerNummer) then
If Application("user25") <> "" then
If session("selected") = "25" then
Response.Write "<option value=25 selected>" & Application("user25")
else
Response.Write "<option value=25>" & Application("user25")
End If
End If
End If
%>
  </select></td>
    <td width="10"></td>
    <td width="60"><input src="../gif/b_send.gif" width="52" height="20" name="Send" type="image" border="0"></td>
    <td width="230"></td>
    <td width="80"><a href="message.asp?userID=<%=BrugerNummer%>"><img src="../gif/b_opdater.gif" width="73" height="20" border="0" alt="Opdater"></a></td>
    <td width="60"><a href="logoff.asp?userID=<%=BrugerNummer%>" target="_parent"><img src="../gif/b_logud.gif" width="65" height="20" border="0" alt="Log ud !"></td>
  </tr>
</table>
<input type="hidden" name="userID" value="<%=BrugerNummer%>">
<input type="hidden" name="nick" value="<%=Application("user" & BrugerNummer)%>">
</form>
</body>
Avatar billede pacroonold Nybegynder
20. marts 2000 - 07:26 #5
display.asp
-----------
<%BrugerNummer = request("userID")%>
<html>
<head>
<title></title>
<meta http-equiv="refresh" content="5;display.asp?userID=<%=BrugerNummer%>">
<style>
<!--
A:link    {text-decoration: none; color: #FFFFFF }
A:visited {text-decoration: none; color: #FFFFFF }
A:active  {text-decoration: none; color: #OOOOOO }
A:hover     {text-decoration: underline; color: #FFFFFF }
-->
</style>
</head>
<body bgcolor="#000000">
<%
for x = 1 to 44
response.write "      " & application("user" & BrugerNummer & "txt" & x) & "<br>" &vbCrLf
Next
%>
</font>
</body>
</html>
Avatar billede pacroonold Nybegynder
20. marts 2000 - 07:26 #6
default.asp
-----------
<%
Nick = request.Cookies("login")("navn")

PladsFundet = "False"
NavnFundet = "False"
LogonMessage = "True"

If Request.Cookies("Chat")("Login") <> "" Then
  PladsFundet = "True"
  UlovligtFundet = "False"
  NavnFundet = "False"
  PladsFundet = "True"
  BrugerNummer = Request.Cookies("login")("navn")
LogonMessage = "False"
userID = BrugerNummer
      Application("user" & userID & "txt20") = Application("user" & userID & "txt19")
      Application("user" & userID & "txt19") = Application("user" & userID & "txt18")
      Application("user" & userID & "txt18") = Application("user" & userID & "txt17")
      Application("user" & userID & "txt17") = Application("user" & userID & "txt16")
      Application("user" & userID & "txt16") = Application("user" & userID & "txt15")
      Application("user" & userID & "txt15") = Application("user" & userID & "txt14")
      Application("user" & userID & "txt14") = Application("user" & userID & "txt13")
      Application("user" & userID & "txt13") = Application("user" & userID & "txt12")
      Application("user" & userID & "txt12") = Application("user" & userID & "txt11")
      Application("user" & userID & "txt11") = Application("user" & userID & "txt10")
      Application("user" & userID & "txt10") = Application("user" & userID & "txt9")
      Application("user" & userID & "txt9") = Application("user" & userID & "txt8")
      Application("user" & userID & "txt8") = Application("user" & userID & "txt7")
      Application("user" & userID & "txt7") = Application("user" & userID & "txt6")
      Application("user" & userID & "txt6") = Application("user" & userID & "txt5")
      Application("user" & userID & "txt5") = Application("user" & userID & "txt4")
      Application("user" & userID & "txt4") = Application("user" & userID & "txt3")
      Application("user" & userID & "txt3") = Application("user" & userID & "txt2")
      Application("user" & userID & "txt2") = Application("user" & userID & "txt1")
      Application("user" & userID & "txt1") = "<font face=Verdana size=1 color=#ffaa44><b>System: [ til " &  nick & " ] du var allerede logget på, husk at logge af når du er færdig..</b></font>"

End if

If NavnFundet = "True" then response.redirect "error.asp?err=2"

APPLICATION.LOCK

For userID = 1 to 20
  If Application("user" & userID) = "" Then
    If PladsFundet = "False" Then
      Application("user" & userID) = Nick
      Application("user" & userID & "ip") = Request.ServerVariables("REMOTE_ADDR")
      PladsFundet = "True"
      BrugerNummer = userID
    End if
  End if
Next

APPLICATION.UNLOCK

If PladsFundet = "False" then response.redirect "error.asp?err=1"

Response.Cookies("Chat")("Login") = BrugerNummer

If LogonMessage = "True" Then
  For userID = 1 to 20
    If Application("user" & userID) <> "" Then
      Application("user" & userID & "txt21") = Application("user" & userID & "txt20")
      Application("user" & userID & "txt20") = Application("user" & userID & "txt19")
      Application("user" & userID & "txt19") = Application("user" & userID & "txt18")
      Application("user" & userID & "txt18") = Application("user" & userID & "txt17")
      Application("user" & userID & "txt17") = Application("user" & userID & "txt16")
      Application("user" & userID & "txt16") = Application("user" & userID & "txt15")
      Application("user" & userID & "txt15") = Application("user" & userID & "txt14")
      Application("user" & userID & "txt14") = Application("user" & userID & "txt13")
      Application("user" & userID & "txt13") = Application("user" & userID & "txt12")
      Application("user" & userID & "txt12") = Application("user" & userID & "txt11")
      Application("user" & userID & "txt11") = Application("user" & userID & "txt10")
      Application("user" & userID & "txt10") = Application("user" & userID & "txt9")
      Application("user" & userID & "txt9") = Application("user" & userID & "txt8")
      Application("user" & userID & "txt8") = Application("user" & userID & "txt7")
      Application("user" & userID & "txt7") = Application("user" & userID & "txt6")
      Application("user" & userID & "txt6") = Application("user" & userID & "txt5")
      Application("user" & userID & "txt5") = Application("user" & userID & "txt4")
      Application("user" & userID & "txt4") = Application("user" & userID & "txt3")
      Application("user" & userID & "txt3") = Application("user" & userID & "txt2")
      Application("user" & userID & "txt2") = Application("user" & userID & "txt1")
      Application("user" & userID & "txt1") = "<font face=Verdana size=1 color=#ffaa44><b>System: <a href='../view.asp?mode=bruger&navn=" & nick & "' target='main'>" & Application("user" & BrugerNummer) & "</a> logget på chatten kl. " & time & "</font></b>"
    End if
  Next
End if
%>
<html>
<head>
<title>Chat</title>
<base>
</head>
<frameset rows="*,50" frameborder="0" border="0">
<frame src="display.asp?userID=<%=BrugerNummer%>" scrolling="no" name="chatramme">
<frame src="message.asp?userID=<%=BrugerNummer%>" scrolling="no">
</frameset>
</html>
Avatar billede bocker Nybegynder
20. marts 2000 - 14:24 #7
Avatar billede bocker Nybegynder
20. marts 2000 - 14:24 #8
og forresten rimelig fed.
Avatar billede bocker Nybegynder
20. marts 2000 - 14:28 #9
http://www.theill.com/asp/feature_chat.asp

Der er lidt om den, kom lige i tanke om, du måske ville læse hvad den kunne :)
Avatar billede respen Nybegynder
20. marts 2000 - 16:13 #10
Der er vist gået inflation i point tildelingen. ;-)
Avatar billede bocker Nybegynder
20. marts 2000 - 17:11 #11
??

Der mangler 45 points hehe
Avatar billede pacroonold Nybegynder
20. marts 2000 - 17:17 #12
Der er vist gået lidt kuk i pointsystemet... Jeg kan ikke forhøje.

Kan du leve med at få "så lidt" point ?
Avatar billede bocker Nybegynder
20. marts 2000 - 18:47 #13
jo det kan jeg godt, bare acceptere.

Måske er grunden til du ikke kan forhøje, at du ikke har flere points? hihi
Avatar billede bocker Nybegynder
20. marts 2000 - 21:47 #14
Du kan også se på:

http://www.aspin.com/, hvis den anden ikke er god nok...

Er den god nok?!
Avatar billede Slettet bruger
21. marts 2000 - 14:42 #15
Du skal ikke acceptere svaret fra bocker... du mister ale dine points, og han får ikke nogle, da max point ligger på 300 p...

Bocker... Sys du at du er sej, når du på den måde prøver ay nare 1000 points fra ham..??

-Anders
Avatar billede pacroonold Nybegynder
21. marts 2000 - 17:05 #16
Jeg havde nu også tænkt mig at der var en der skulle skrive scriptet om for mig... Men du giver bare en url, men hvis du vil accepteres, får du altså kun 100 point...

/Pacroon
Avatar billede tdaugaard Nybegynder
21. marts 2000 - 17:08 #17
pacroon> Jeg tror du skal prøve at bruge FOR...NEXT noget mere ...

det vil se MEGET bedre ud og være nemmere at rette i hvis du f.eks. en dag vil have at der skal kunne være flere brugere på systemet.
Avatar billede bocker Nybegynder
21. marts 2000 - 20:00 #18
backslash >> Hvorfor fanden skal jeg have skylden for noget?!?! JEG HAR FANDME IKKE BEDT OM 1000 POINTS!! DU KAN FANDME BARE LUKKE ARET!
Avatar billede pacroonold Nybegynder
26. marts 2000 - 12:46 #19
Der kom ingen svar jeg kunne bruge, så jeg lukker spørgsmålet
Avatar billede Slettet bruger
26. marts 2000 - 18:40 #20
bocker.. tag nu lige en slapper.....
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester