R RDL Medlem sedan mars 2001 344 inlägg Frågan 20 juni 2001 21:47 #1 Ursäkta rubriken.. men kom inte på någon bättre eftersom det är verkligen rätt fucked up..
Jaja.. hursomhelst..
<%
Dim Personer
Personer = "<a href=" & Application("adiosas") & ".asp>" & Application("adiosas") & "</a><br>"
Response.Write Personer
%>
Blir
<a href=*ono*doe.asp>*ono*doe</a>
hm.. ett vill ha bort dessa: *
Sen vill jag bara ha ett namn i adiosas i taget så att det blir
<a href=ono.asp>ono</a>
<a href=doe.asp>doe</a>
Någon som har lust att hjälpa??
Vide Medlem sedan dec. 1999 8 577 inlägg Varför finns det så ifrån början om du inte vill ha det så :q
------------------
Vide rox = new Vide();
rox.learn("C#");
webeye.nu
R RDL Medlem sedan mars 2001 344 inlägg Var finns vad?? *förvirrad*
R RDL Medlem sedan mars 2001 344 inlägg hm.. vill inte ha så!! vill inte!! ändra!! ::) :) :)
Vide Medlem sedan dec. 1999 8 577 inlägg Ja, varför har du värdet "*ono*doe" i Application("adiosas") om du inte vill ha det så?
------------------
Vide rox = new Vide();
rox.learn("C#");
webeye.nu
R RDL Medlem sedan mars 2001 344 inlägg gah.. får grudeleiosera mig..
Har två sessioner den ena heter ono den andra doe.. Vill att de ska dela upp sig.. sen fattar jag inte att varför det blir * or framför??
Försökte med Replace.. fast lyckades inge vidare..
Vide Medlem sedan dec. 1999 8 577 inlägg jo, det är ju bättre att inte skapa buggen i första hand än att försöka ta bort den i efterhand...
Hur ser koden ut som lägger in sessionerna i application?
------------------
Vide rox = new Vide();
rox.learn("C#");
webeye.nu
R RDL Medlem sedan mars 2001 344 inlägg Lite variabler ändrade..
Global.asa
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnStart
Application("anv") = 0
End Sub
Sub Session_OnStart
Session.Timeout = 20
Session("Start") = Now
Application.Lock
Application("anv") = Application("anv") + 1
Application.UnLock
Session.TimeOut = 20
End Sub
Sub Session_OnEnd
Application.Lock
Application("anv") = Application("anv") - 1
Application("users") = Replace(Application("users"), "*" & Session("anv") & "*", "*")
Application("writeUsr1") = Application("writeUsr2")
Application("writeUsr2") = Application("writeUsr3")
Application("writeUsr3") = Application("writeUsr4")
Application("writeUsr4") = Application("writeUsr5")
Application("writeUsr5") = Application("writeUsr6")
Application("writeUsr6") = ""
Application.UnLock
End Sub
</SCRIPT>
Flygin.asp
Session("inne") = 1
session("anv") = rsUser("username")
Application.Lock
Application("users") = Application("users") & "\*" & Session("anv")
Application("writeUsr1") = Application("writeUsr2")
Application("writeUsr2") = Application("writeUsr3")
Application("writeUsr3") = Application("writeUsr4")
Application("writeUsr4") = Application("writeUsr5")
Application("writeUsr5") = Application("writeUsr6")
Application("writeUsr6") = ""
Application.UnLock
Test.asp
<%
Option Explicit
if Session("inne") = 1 then
%>
<!-- #include file="ssi/huvudet.asp" -->
<center>
<font class="s">
<b><u>Inloggade användare:</u></b><br>
<%
Dim Personer
Personer = "<a href=" & Application("users") & ".asp>" & Application("users") & "</a><br>"
Response.Write Personer
%>
<br>
<b><% =Application("anv") %></b> inloggade nu
</font>
</center>
</body>
</html>
<% end if %>
Hjälper det?
Vide Medlem sedan dec. 1999 8 577 inlägg Något sånthär:
aA = Split(Application("adiosas"),"*")
For i = 0 To Ubound(aA)
Response.Write "<a href=" & aA(i) & ".asp>" & aA(i) & "</a><br>"
Next
------------------
Vide rox = new Vide();
rox.learn("C#");
webeye.nu