By.KaBuS weB MaSteR
Mesaj Sayısı : 223 Kayıt tarihi : 13/06/09 Yaş : 31 Nerden : Notalar İcinden Lakap : By.KaBuS
| Konu: Sitenizde aktif online kullanıcılar Ptsi Haz. 15, 2009 9:03 pm | |
| - Kod:
-
<Object Runat="Server" Scope="application" ID="dOnlineUsers" ProgID="scripting.Dictionary"></Object>
<script LANGUAGE=VBscript RUNAT=Server> sub Application_OnStart application("ServerStart") = now end sub function Decrypt(sText) Decrypt = sText end function
function adZero(sText) if isNull(sText) then exit function adZero = string(5 - len(sText), "0") & sText end function
Sub Session_OnStart
Session.TimeOut = 5 sAktifUsrList = application("AktifUsrList")
sNewUserName = Decrypt(request.cookies("isim")+ request.cookies("soyisim"))
if sNewUserName = "" then sNewUserName = "Ziyaretci-" & AdZero(CInt(application("Ziyaretci")))
sLastActionTime = Time
sUserInfo = sNewUserName & "<|>" & sLastActionTime & "<|>" & sLastPageViewed
dOnlineUsers.Add Session.SessionID, sUserInfo
application.lock application("AktifUsr") = application("AktifUsr") + 1 application("Ziyaretci") = application("Ziyaretci") + 1
if application("TodaysDate") <> Date() then application("PageViewsToday") = 0 application("ZiyaretciToday") = 0 end if application("ZiyaretciToday") = application("ZiyaretciToday") + 1 application("TodaysDate") = Date() application.unlock
End Sub
Sub Session_OnEnd
on error resume next dOnlineUsers.Remove Session.SessionID
application.lock application("AktifUsr") = application("AktifUsr") - 1 application.unlock
End Sub </script>
| |
|