> Jeg vil skyde på at indholdet ligger i et application object.
Ligger der evt. noget i nedenstående script, som jeg kan rette i? Det er en
fil, der refereres til i de 4 andre asp-filer.
-------------------------------------------------------------------------
<%
Function CreateID
'Opret et Chat ID
tmp = Now()
For I = 1 to Len(tmp)
If IsNumeric(mid(tmp, I,1)) Then
temp = temp & mid(tmp, I, 1)
End If
Next
temp = temp / Session.SessionID
For I = 1 to Len(temp)
If IsNumeric(mid(temp, I, 1)) Then
CreateID = CreateID & mid(temp, I, 1)
End If
Next
End Function
Function GetName(ID)
tmp = Split(Application("simpleonline"), vbNewLine)
For I = 0 to UBound(tmp)
If tmp(I) <> "" Then
IdData = Split(tmp(I), vbTab)
If IdData(0) = ID Then
GetName = IdData(1)
Exit Function
End If
End If
Next
End Function
Function CheckID(ID)
tmp = Split(Application("simpleonline"), vbNewLine)
For I = 0 to UBound(tmp)
If tmp(I) <> "" Then
IdData = Split(tmp(I), vbTab)
If IdData(0) = ID Then
CheckID = True
Exit Function
End If
End If
Next
CheckID = False
End Function
Function RemoveID(ID)
tmp = Split(Application("simpleonline"), vbNewLine)
For I = 0 to UBound(tmp)
If tmp(I) <> "" Then
IdData = Split(tmp(I), vbTab)
If IdData(0) = ID Then
tmp(I) = ""
End If
End If
Next
Application.Lock
Application("simpleonline") = Join(tmp, vbNewLine)
Application.Unlock
tmp = Split(Application("simpletime"), vbNewLine)
For I = 0 to UBound(tmp)
If tmp(I) <> "" Then
IdData = Split(tmp(I), vbTab)
If IdData(0) = ID Then
tmp(I) = ""
End If
End If
Next
Application.Lock
Application("simpletime") = Join(tmp, vbNewLine)
Application.Unlock
tmp = Split(Application("simpletrans"), vbNewLine)
For I = 0 to UBound(tmp)
If tmp(I) <> "" Then
IdData = Split(tmp(I), vbTab)
If IdData(1) = ID Then
tmp(I) = ""
End If
End If
Next
Application.Lock
Application("simpletrans") = Join(tmp, vbNewLine)
Application.Unlock
End Function
Function UpdateID(ID)
tmp = Split(Application("simpletime"), vbNewLine)
For I = 0 to UBound(tmp)
If tmp(I) <> "" Then
usr = Split(tmp(I), vbTab)
If usr(0) = ID Then
tmp(I) = ID & vbTab & Now()
I = UBound(tmp)
End If
End If
Next
Application.Lock
Application("simpletime") = Join(tmp, vbNewLine)
Application.UnLock
End Function
Function CheckList
tmp = Split(Application("simpletime"), vbNewLine)
For I = 0 to UBound(tmp)
If tmp(I) <> "" Then
usr = Split(tmp(I), vbTab)
If DateDiff("n", usr(1), Now) > 1 Then
RemoveID(usr(0))
End If
End If
Next
End Function
Function GetTransID(ID)
GetTransID = ""
tmpX = Split(Application("simpletrans"), vbNewLine)
For I = 0 to UBound(tmp)
If tmpX(I) <> "" Then
TransUsr = Split(tmpX(I), vbTab)
If TransUsr(1) = ID Then
GetTransID = TransUsr(0)
Exit Function
End If
End If
Next
End Function
Function TransIDtoRealID(ID)
tmp = Split(Application("simpletrans"), vbNewLine)
For I = 0 to UBound(tmp)
If tmp(I) <> "" Then
TransUsr = Split(tmp(I), vbTab)
If TransUsr(0) = ID Then
TransIDtoRealID = TransUsr(1)
Exit Function
End If
End If
Next
End Function
%>
/Lise
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials