|
|
|
|
µ¹¸ÍÀÌ / 2001-08-29 / ¿ÀÈÄ 5:35:29 / 203.234.144.16
Á¶È¸¼ö : 118
|
[Áú¹®] Ä«¿îÆÿ¡·¯ÀÔ´Ï´Ù.
|
[main.asp]
<tr> <font size="-1" color="BROWN">¹æ¹®ÀÚ ¼ö
<%
count = application("count")
for i=1 to Len(count)
select case Mid(count,i,1)
case "1"
response.write "<img src = 'image\1.jpg' align='middle'>"
case "2"
response.write "<img src = '\image\2.jpg' align='middle'>"
case "3"
response.write "<img src = '\image\3.jpg' align='middle'>"
case "4"
response.write "<img src = '\image\4.jpg' align='middle'>"
case "5"
response.write "<img src = '\image\5.jpg' align='middle'>"
case "6"
response.write "<img src = '\image\6.jpg' align='middle'>"
case "7"
response.write "<img src = '\image\7.jpg' align='middle'>"
case "8"
response.write "<img src = '\image\8.jpg' align='middle'>"
case "9"
response.write "<img src = '\image\9.jpg' align='middle'>"
case "0"
response.write "<img src = '\image\0.jpg' align='middle'>"
end select
next
%> ¹ø° ÀÔ´Ï´Ù.
[global.asa]
<script language="VBScript" Runat="Server">
sub Application_OnStart
Set Application("DBConn")=Server.CreateObject("ADODB.Connection")
Application("DBConn").Open ("DSN=*****;UID=****;PWD=*****")
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
VisitCountFileName = "C:\visitnum\visit.txt"
Application("VisitCountFileName") = VisitCountFileName
Application("time") = now
Application("count") = 10000
End sub
Sub Application_OnEnd
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set Out = FileObject.CreateTextFile(Application("visitCountFileName"),TRUE)
Application.Lock
Out.WriteLine(Application("count"))
Application.unlock
End sub
Sub Session_OnStart
ipaddr = Request.ServerVariables("REMOTE_ADDR")
SQL = "INSERT INTO userCount(ssdat, ipaddress) VALUES(getdate(), '"&ipaddr&"')"
Application("DBConn").execute(SQL)
Application.lock
Application("count") = Application("count")+1
Application.unlock
session.timeout = 20
If Application("count") MOD 10 = 0 then
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Application.lock
out.writeLine(Application("count"))
out.close
Application.unlock
End if
End Sub
Sub Session_OnEnd
End Sub
Sub Session_OnEnd
Application.Lock
Application("Count")=Application("Count")-1
Application.UnLock
End Sub
</script>
Ä«¿îÅÍ´Â ½ÃÀ۵Ǿú½À´Ï´Ù.
±×·±µ¥¿ä. ÇÑÂü Ä«¿îÆÃÇÏ´Ù°¡ ¿¹)10100 --> 10084·Î
¹Ù²î³×¿ä.
Á¦°¡ º¸±â¿¡ ¿¡·¯°¡ º¸ÀÌÁú ¾Ê¾Æ¼¿ä.
¿ì¿Õ ÈÄ¿¡ ÀÌ »ç½ÇÀ» ¾Ë¾Ò´Âµ¥ ¿Ö ±×·±Áö Á» °¡¸£ÃÄ
ÁÖ¼¼¿ä....
|
|
|
|