Originariamente inviato da X_Gold*
ma session("id") dove viene valorizzato ???
login.asp:
codice:
session("username")=oRS("username")
session("id") = oRS("id")
Session("utente") = Request("Username")
if InStr(1, Application("Utente"), Session("utente") & "#^#" & oRS("id") &"|" ) = 0 then
Application.Lock
Application("Utente") = Application("Utente") & Session("utente") & "#^#" & oRS("id") & "|"
Application.UnLock
end if
index.asp
codice:
username = session("username")
id = session("id")
........
SQL = "SELECT * FROM users where id = "& id
Set rec = Server.CreateObject("ADODB.Recordset")
Set Rec = oConn.Execute(SQL)
Dim arrUtenti, i
Response.Write("<p style=""margin-top: -18""><font color=""black""><font face=""Verdana"" size=""1"">(Amigos en Chat: </font>")
arrUtenti = Split(Application("Utente"),"|")
dim utenti
for i = 0 to UBound(arrUtenti)-1
if i <> UBound(arrUtenti)-1 then
response.write ("<font color=red size=1 font face=verdana>"&replace(arrUtenti(i), "#^#", " ")&", </font>")
else
response.write ("<font color=red size=1 font face=verdana>"& replace(arrUtenti(i), "#^#", " ")&"</font></font><font face=""Verdana"" size=""1""><font color=""black"">)</font>")
end if
Next