1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)
AddHandler SiteMap.SiteMapResolve, AddressOf Me.AppendQueryString
If (Roles.RoleExists("Administrators") = False) Then
Roles.CreateRole("Administrators")
End If
If (Roles.RoleExists("Friends") = False) Then
Roles.CreateRole("Friends")
End If
Application.Add("usercount", 0) 'variable pour le nombre total de visiteur
Application.Add("online", 0)'variable pour le nombre de visiteur en ligne
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when a new session is started
Application("usercount") += 1
Application("online") += 1
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Application("online") -= 1
End Sub |
Partager