<!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> <script language="JavaScript1.2"> //Configure below to change URL path to the snow image var snowsrc="../column-aj/images-1/supk1.gif" // Configure below to change number of snow to render var no = 19; var ns4up = (document.layers) ? 1 : 0; // browser sniffer var ie4up = (document.all) ? 1 : 0; var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 600; if (ns4up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); for (i = 0; i < no; ++ i) { dx[i] = 0; // set coordinate variables xp[i] = Math.random()*(doc_width-50); // set position variables yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // set amplitude variables stx[i] = 0.02 + Math.random()/10; // set step variables sty[i] = 0.7 + Math.random(); // set step variables if (ns4up) { // set layers if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a href=\"http://www.mmm.ru.ac.th/\"><img src='"+snowsrc+"' border=\"0\"></a></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"></layer>"); } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://www.mmm.ru.ac.th\"><img src='"+snowsrc+"' border=\"0\"></a></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"></div>"); } } } function snowNS() { // Netscape main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", 10); } function snowIE() { // IE main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx[i] += stx[i]; document.all["dot"+i].style.pixelTop = yp[i]; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowIE()", 10); } if (ns4up) { snowNS(); } else if (ie4up) { snowIE(); } </script> <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/04/30/14-40/30-14-40_01.gif" width="270" height="230" /></td> <td><img src="images-1/2007/04/30/14-40/30-14-40_02.gif" width="246" height="230" /></td> <td><img src="images-1/2007/04/30/14-40/30-14-40_03.gif" width="264" height="230" /></td> </tr> <tr> <td><img src="images-1/2007/04/30/14-40/30-14-40_04.gif" width="270" height="210" /></td> <td><img src="images-1/2007/04/30/14-40/30-14-40_05.gif" width="246" height="210" /></td> <td><img src="images-1/2007/04/30/14-40/30-14-40_06.gif" width="264" height="210" /></td> </tr> <tr> <td><img src="images-1/2007/04/30/14-40/30-14-40_07.gif" width="270" height="227" /></td> <td><img src="images-1/2007/04/30/14-40/30-14-40_08.gif" width="246" height="227" /></td> <td><img src="images-1/2007/04/30/14-40/30-14-40_09.gif" width="264" height="227" /></td> </tr> <tr> <td><img src="images-1/2007/04/30/14-40/30-14-40_10.gif" width="270" height="192" /></td> <td><img src="images-1/2007/04/30/14-40/30-14-40_11.gif" width="246" height="192" /></td> <td><img src="images-1/2007/04/30/14-40/30-14-40_12.gif" width="264" height="192" /></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>