Files
KIN/approval/help.asp
2025-09-29 17:55:08 +09:00

142 lines
3.6 KiB
Plaintext

<%
'==================================================================================
'help_pms폴더에 있는 모든 그림파일을 읽어옴
'----------------------------------------------------------------------------------
Dim tmp_folder(50)
function getFolder(sPath, iDepth, bSonFdr, bShowFile)
Dim fso, objFolder
Dim folders, folder
Dim files, file
Dim sSpace
sSpace = ""
for i=0 to iDepth
sSpace = sSpace & ":tab:"
next
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFolder = fso.GetFolder(sPath)
set fso = nothing
set folders = objFolder.SubFolders
Set files = objFolder.Files
set objFolder = nothing
For Each folder in folders
'response.write sSpace& "<font color='#FFCC00'>[폴]</font>" &folder.name & "<br>"& vbCRLF
'해당 폴더의 파일
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFolder = fso.GetFolder(sPath & "\" & folder.name)
set fso = nothing
Set hfiles = objFolder.Files
tmp_folder(0) = sPath & folder.name
i = 1
For Each file in hfiles
'response.write sSpace& "<font color='#5D5D5D'>[파]</font>" &file.name & "<br>"& vbCRLF
tmp_folder(i) = file.name
i = i + 1
Next
'++ 하위폴더
if bSonFdr then
call getFolder(sPath&"\"&folder.name, iDepth+1, bSonFdr, bShowFile)
end if
Next
'++ 파일도 보여준다면
if bShowFile then
i = 1
For Each file in files
'response.write sSpace& "<font color='#5D5D5D'>[파]</font>" &file.name & "<br>"& vbCRLF
'gif 파일이 아닌 것은 저장하지 않도록 함
if right(file.name, 3) = "gif" then
tmp_folder(i) = file.name
i = i + 1
end if
Next
end if
end function
RootDir = Server.MapPath(".") & "\help\" 'image파일이 존재하는 폴더
tmp_f = getFolder(RootDir, 0, false, true)
tmp = 0
for i = 1 to ubound(tmp_folder)
if tmp_folder(i) <> "" then
tmp_folder(0) = replace(tmp_folder(0),"\","/")
'Response.Write "<a href='" & tmp_folder(j,0) & "\" & tmp_folder(j,i) & "'>" & tmp_folder(j,i) & "</a><BR>"
'Response.Write tmp_folder(i) & "<BR>"
tmp = tmp + 1
end if
next
if tmp = 0 then
Response.Write "<center><font color='red'><b>파일이 없습니다</b></font></center> "
end if
'==================================================================================
if trim(request("w")) <> "" then
tmp_i = request("w")
else
tmp_i = 1
end if
if int(tmp_i) >= int(tmp) then
tmp_i_go = 1
else
tmp_i_go = int(tmp_i) + 1
end if
if int(tmp_i) <= 1 then
tmp_i_back = tmp
else
tmp_i_back = int(tmp_i) - 1
end if
%>
<html>
<body leftmargin="0" topmargin="0">
<script language="javascript">
function closeit() {
self.close();
}
function gourl(z) {
document.pms.action = 'help.asp?w=' + z;
document.pms.submit();
}
</script>
<form name="pms" method="post">
<table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td align="right">
<font color="red">
그림을 클릭하시면 창이 닫힙니다.
</font>
<input type="button" value="이 전" onclick="gourl('<%=tmp_i_back%>')" id=button3 name=button3>
&nbsp;
<input type="button" value="다 음" onclick="gourl('<%=tmp_i_go%>')" id=button4 name=button4>
</td>
</tr>
<tr align="left">
<td><img src="./help/<%=tmp_folder(tmp_i)%>" border="0" onClick="closeit()">
</td>
</tr>
<tr>
<td align="right">
<font color="red">
그림을 클릭하시면 창이 닫힙니다.
</font>
<input type="button" value="이 전" onclick="gourl('<%=tmp_i_back%>')" id=button3 name=button3>
&nbsp;
<input type="button" value="다 음" onclick="gourl('<%=tmp_i_go%>')" id=button4 name=button4>
</td>
</tr>
</table>
</form>
</body>
</html>