<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <title></title> <style type="text/css"> <!-- @import url("../css/web_new-1.css"); body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> </head> <body> <table width="780" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="top"><table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images-1/2007/05/03/03-05/03-05-50_01.gif" width="278" height="246" /></td> <td><img src="images-1/2007/05/03/03-05/03-05-50_02.gif" width="254" height="246" /></td> <td><img src="images-1/2007/05/03/03-05/03-05-50_03.gif" width="248" height="246" /></td> </tr> <tr> <td><img src="images-1/2007/05/03/03-05/03-05-50_04.gif" width="278" height="241" /></td> <td><img src="images-1/2007/05/03/03-05/03-05-50_05.gif" width="254" height="241" /></td> <td><img src="images-1/2007/05/03/03-05/03-05-50_06.gif" width="248" height="241" /></td> </tr> <tr> <td><img src="images-1/2007/05/03/03-05/03-05-50_07.gif" width="278" height="264" /></td> <td><img src="images-1/2007/05/03/03-05/03-05-50_08.gif" width="254" height="264" /></td> <td><img src="images-1/2007/05/03/03-05/03-05-50_09.gif" width="248" height="264" /></td> </tr> <tr> <td><img src="images-1/2007/05/03/03-05/03-05-50_10.gif" width="278" height="222" /></td> <td><img src="images-1/2007/05/03/03-05/03-05-50_11.gif" width="254" height="222" /></td> <td><img src="images-1/2007/05/03/03-05/03-05-50_12.gif" width="248" height="222" /></td> </tr> </table></td> </tr> <tr> <td align="center" valign="top"><table width="500" border="0" cellpadding="0" cellspacing="0" class="border"> <tr> <td align="center" valign="middle" background="images-1/main/main-2-gif-1_19.gif"><table width="150" height="25" border="0" cellpadding="0" cellspacing="0" class="txt12"> <tr> <td width="25" height="25" align="center" valign="middle"><img src="../animation/icon_connect.gif" width="16" height="16" /></td> <td align="left" valign="middle"><% Call LogActiveUser() Call ActiveUserCleanup() Response.Write "User Online " & Application("ActiveUsers") & " คน" 'Response.Write "<img src=""image/boy6.gif""> " & Application("ActiveUsers") & " คน" Sub LogActiveUser Dim strActiveUserList Dim intUserStart, intUserEnd Dim strUser Dim strDate strActiveUserList = Application("ActiveUserList") If Instr(1, strActiveUserList, Session.SessionID) > 0 Then Application.Lock intUserStart = Instr(1, strActiveUserList, Session.SessionID) intUserEnd = Instr(intUserStart, strActiveUserList, "|") strUser = Mid(strActiveUserList, intUserStart, intUserEnd - intUserStart) strActiveUserList = Replace(strActiveUserList, strUser, Session.SessionID & ":" & Now()) Application("ActiveUserList") = strActiveUserList Application.UnLock Else Application.Lock Application("ActiveUsers") = CInt(Application("ActiveUsers")) + 1 Application("ActiveUserList") = Application("ActiveUserList") & Session.SessionID & ":" & Now() & "|" Application.UnLock End If End Sub Sub ActiveUserCleanup Dim ix Dim intUsers Dim strActiveUserList Dim aActiveUsers Dim intActiveUserCleanupTime Dim intActiveUserTimeout intActiveUserCleanupTime = 1 'เวลาที่เราต้องการให้รันไฟล์นี้ครับตอนนี้เซตเป็น ทุกๆ1 นาทีครับ intActiveUserTimeout = 10 'เวลาที่เราจะตัดสินว่าเค้าไม่อยู่ในเวบเราแล้วที่นี้คือ 20 นาทีครับ If Application("ActiveUserList") = "" Then Exit Sub If DateDiff("n", Application("ActiveUsersLastCleanup"), Now()) > intActiveUserCleanupTime Then Application.Lock Application("ActiveUsersLastCleanup") = Now() Application.Unlock intUsers = 0 strActiveUserList = Application("ActiveUserList") strActiveUserList = Left(strActiveUserList, Len(strActiveUserList) - 1) aActiveUsers = Split(strActiveUserList, "|") For ix = 0 To UBound(aActiveUsers) If DateDiff("n", Mid(aActiveUsers(ix), Instr(1, aActiveUsers(ix), ":") + 1, Len(aActiveUsers(ix))), Now()) > intActiveUserTimeout Then aActiveUsers(ix) = "XXXX" Else intUsers = intUsers + 1 End If Next strActiveUserList = Join(aActiveUsers, "|") & "|" strActiveUserList = Replace(strActiveUserList, "XXXX|", "") Application.Lock Application("ActiveUserList") = strActiveUserList Application("ActiveUsers") = intUsers Application.UnLock End If End Sub %></td> </tr> </table></td> <td align="center" valign="middle" background="images-1/main/main-2-gif-1_20.gif"><% Set objFS=Server.CreateObject("Scripting.FileSystemObject") Set objRF=objFS.OpenTextFile(Server.MapPath("counter/pagecount-aj.txt")) visitor_no=objRF.ReadLine objRF.Close Set objRF=Nothing visitor_no=visitor_no+1 Set objRF=objFS.OpenTextFile(Server.MapPath("counter/pagecount-aj.txt"), 2) objRF.WriteLine visitor_no objRF.Close Set objRF=Nothing Set objFS=Nothing %> <table width="200" height="30" border="0" align="center" cellpadding="0" cellspacing="0" background="counter/border.gif" cellpacing="0"> <tr> <td width="60" height="30"></td> <% For flag_counter=1 To 7-Len(visitor_no)%> <td bgcolor="#000000"><img src="counter/0.gif" vspace="0" hspace="0" width="16" height="21" /></td> <%Next%> <% For flag_counter=1 To Len(visitor_no)%> <td bgcolor="#000000"><img src="counter/<%=Mid(visitor_no,flag_counter,1)%>.gif" vspace="0" hspace="0" /></td> <%Next%> </tr> </table></td> </tr> </table></td> </tr> </table> </body> </html>