LKW CHAT OnlineStatus; SDL Bestelldatum Überfällige BEstellungen (PLOSE); REchnugnsnsuche (Abs+Empf); VZ-Preise IMEX +Avisokosten
This commit is contained in:
@@ -140,6 +140,25 @@ Public Class cSession
|
||||
Return False
|
||||
|
||||
End Function
|
||||
Public Shared Function IS_ONLINE_Status(sess_maId, Optional andIsRealUser = False) As String
|
||||
Try
|
||||
Dim SQL As New SQL
|
||||
Dim where = ""
|
||||
If andIsRealUser Then where = " AND mit_pseudoUser=0 "
|
||||
Dim sess_IdOnline = SQL.getValueTxtBySql("SELECT TOP 1 sess_lastRm FROM tblSessions where sess_maId='" & sess_maId & "' and sess_lastActivity > dateadd(MINUTE,-120, getdate()) and sess_lastRm > dateadd(MINUTE,-2, getdate()) AND sess_logout is null ORDER BY sess_lastActivity DESC,sess_lastRm DESC", "ADMIN",,, Nothing)
|
||||
If sess_IdOnline IsNot Nothing AndAlso IsDate(sess_IdOnline) AndAlso sess_IdOnline > CDate("01.01.2000") Then
|
||||
If DateDiff(DateInterval.Minute, CDate(sess_IdOnline), Now) > 10 Then
|
||||
Return "AFK"
|
||||
Else
|
||||
Return "ONLINE"
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
Return "OFFLINE"
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function GET_IP_FROM_MAID(sess_maId) As String
|
||||
|
||||
Reference in New Issue
Block a user