|
|
|
|
µ¹¸ÍÀÌ / 2001-07-25 / ¿ÀÈÄ 2:47:37 / 211.237.95.211
Á¶È¸¼ö : 135
|
[Áú¹®] Áú¹®ÀÔ´Ï´Ù.a |
<!-- ȸ¿ø ·Î±×ÀÎ -->
<tr>
<td width="100%" class="Text">
<div align="center">
<center>
<table border="0" width="800" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" class="Text"><%=session("name")%>(<%=session("EnartId")%>)´Ô
¹æ¹®À» ȯ¿µ ÇÕ´Ï´Ù. <a href="../index_1.asp"> [·Î±× ¾Æ¿ô]</a> / [°³ÀÎÁ¤º¸ °ü¸®]</td>
</tr>
</table></center></div></td></tr>
¿©±â¼ ¾î¶»°Ô ¼¼¼ÇÀ» ´Ý°í ·Î±×¾Æ¿ôÇÏ°Ô ÇÒ ¼ö ÀÖ³ª¿ä?
°í¼ö´ÔÀÇ ´äº¯À» ÀÌ Ãʺ¸°¡ ±â´Ù¸®°Ù½À´Ï´Ù.
[global.asa]
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
'----»õ·ÎÃß°¡
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
VisitCountFileName = Server.MapPath("\visitnum")+"\visit.txt"
Set Out = FileObject.OpenTextFile(VisitCountFileName,1,FALSE,FALSE)
Application("visit")=Out.ReadLine
Application("VisitCountFileName")=VisitCountFileName
End Sub
Sub Application_OnEnd
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set Out = FileObject.CreateTextFile(Application("VisitCountFileName"),TRUE,FALSE)
Application.Lock
Out.WriteLine(Application("visit"))
Application.UnLock
End sub
Sub Session_OnStart
'----»õ·ÎÃß°¡
Application.lock
Application("visit")= Application("visit") + 1
Application.unlock
Session.Timeout = 20
If Application("visit") MOD 5 = 0 Then
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set Out = FileObject.CreateTextFile(Application("VisitCountFileName"),TRUE,FALSE)
Application.lock
Out.WriteLine(Application("visit"))
Application.unlock
End If
End Sub
Sub Session_OnEnd
End Sub
Sub FrontPage_StartSession
On Error Resume Next
if Len(Application("FrontPage_VRoot")) > 0 then Exit Sub
' discover the VRoot for the current page;
' walk back up VPath until we find global.asa
Vroot = Request.ServerVariables("PATH_INFO")
strG1 = "global.asa"
strG2 = "Global.asa"
iCount = 0
do while Len(Vroot) > 1
idx = InStrRev(Vroot, "/")
if idx > 0 then
Vroot = Left(Vroot,idx)
else
' error; assume root web
Vroot = "/"
end if
if FrontPage_FileExists(Server.MapPath(Vroot & strG1)) then exit do
if FrontPage_FileExists(Server.MapPath(Vroot & strG2)) then exit do
if Right(Vroot,1) = "/" then Vroot = Left(Vroot,Len(Vroot)-1)
iCount = iCount + 1
if iCount > 100 then
' error; assume root web
Vroot = "/"
exit do
end if
loop
' map all URL= attributes in _ConnectionString variables
Application.Lock
if Len(Application("FrontPage_VRoot")) = 0 then
Application("FrontPage_VRoot") = Vroot
UrlVarArray = Application("FrontPage_UrlVars")
for i = 0 to UBound(UrlVarArray)
if Len(UrlVarArray(i)) > 0 then FrontPage_MapUrl(UrlVarArray(i))
next
end if
Application.Unlock
End Sub
Sub FrontPage_MapUrl(AppVarName)
' convert URL attribute in conn string to absolute file location
strVal = Application(AppVarName)
strKey = "URL="
idxStart = InStr(strVal, strKey)
If idxStart = 0 Then Exit Sub
strBefore = Left(strVal, idxStart - 1)
idxStart = idxStart + Len(strKey)
idxEnd = InStr(idxStart, strVal, ";")
If idxEnd = 0 Then
strAfter = ""
strURL = Mid(strVal, idxStart)
Else
strAfter = ";" & Mid(strVal, idxEnd + 1)
strURL = Mid(strVal, idxStart, idxEnd - idxStart)
End If
strOut = strBefore & Server.MapPath(Application("FrontPage_VRoot") & strURL) & strAfter
Application(AppVarName) = strOut
End Sub
Function FrontPage_FileExists(fspath)
On Error Resume Next
FrontPage_FileExists = False
set fs = CreateObject("Scripting.FileSystemObject")
Err.Clear
set istream = fs.OpenTextFile(fspath)
if Err.Number = 0 then
FrontPage_FileExists = True
istream.Close
end if
set istream = Nothing
set fs = Nothing
End Function
</SCRIPT>
win2000(pro)¿¡¼ local·Î ½ÇÇàÁßÀε¥ ¾î¶»°Ô ¼¼¼ÇÀ» ÁÖ¾î¾ß ÇÒ Áö
Àß ±â¾ïÀÌ ¾È³ª°í Àß ¸ð¸£°Ú³×¿ä.
´äº¯ Á» ºÎŹÇÕ´Ï´Ù. |
|
|
|