20. marts 2000 - 07:22Der 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...
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>
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"
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...
Der kom ingen svar jeg kunne bruge, så jeg lukker spørgsmålet
Synes godt om
Slettet bruger
26. marts 2000 - 18:40#20
bocker.. tag nu lige en slapper.....
Synes godt om
Ny brugerNybegynder
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.