<% '============================================================================== '각종 함수 모음 '==============================================================================
'#################################################################### 'DB 관련 함수 '####################################################################
Function ConnStrNateMjb() 'ConnStrNateMjb = "provider=sqloledb;server=localhost;database=머머머;uid=**;pwd=****;" ConnStrNateMjb = "provider=sqloledb;server=머머머;database=머머머;uid=**;pwd=***;" End Function
'####################################################################
'============================================================== 'if.... else 조건문.. '============================================================== Function iif(condition, byval trueV, byval falseV) if condition then iif = trueV else iif = falseV end if End Function
'============================================================== '디버그용 출력 '============================================================== Function dprintf(getString) response.write getString response.end End Function
'============================================================== '출력 '============================================================== Function printf(getString) response.write getString End Function
'============================================================== '받은 문자열 인코딩(ASCII 코드) '============================================================== Function encodingStr(getString) Dim i, chrat, encode_str
encode_str = ""
for i = 1 to len(getString) chrat = mid(getString, i, 1) encode_str = encode_str & hex(asc(chrat)) next
encodingStr = encode_str End Function
'============================================================== '받은 문자열 디코딩(ASCII 코드) '============================================================== Function decodingStr(getString) Dim i, m, n, decode_str
decode_str = ""
for i = 1 to len(getString) step 2 m = mid(getString, i, 2) n = "&H" & m
if n > "&H7F" then m = mid(getString, i, 4) n = "&H" & m i = i + 2 end if
decode_str = decode_str & chr(n) next
decodingStr = decode_str End Function
'============================================================== 'alert 메시지 '============================================================== Sub msgAlert(msg) Response.Write "<script language=javascript>" & vbcrlf Response.Write "<!--" & vbcrlf Response.Write "alert('" & msg & "');" & vbcrlf Response.Write "//-->" & vbcrlf Response.Write "</script>" & vbcrlf Response.End End Sub
'============================================================== 'alert 메시지, 그리고 이동 '============================================================== Sub msgRefresh(msg, page) Response.Write "<SCRIPT language=javascript>" & vbcrlf Response.Write "<!--" & vbcrlf Response.Write "alert('" & msg & "');" & vbcrlf if page = "back" then Response.Write "history.back();" & vbcrlf elseif page = "close" then Response.Write "self.close();" & vbcrlf else Response.Write "location.replace('" & page & "');" & vbcrlf end if Response.Write "//-->" & vbcrlf Response.Write "</SCRIPT>" & vbcrlf Response.End End Sub
'============================================================== 'alert 메시지, 그리고 메타테그를 이용한 페이지이동 '============================================================== Sub metaRedirect(msg, page) Response.Write "<script language=javascript>" & vbcrlf Response.Write "<!--" & vbcrlf if Trim(msg) <> "" then Response.Write "alert('" & msg & "');" & vbcrlf end if Response.Write "//-->" & vbcrlf Response.Write "</script>" & vbcrlf if page = "back" then Response.Write "<meta http-equiv='refresh' content='0;url=javascript:history.back();'>" & vbcrlf else Response.Write "<meta http-equiv='refresh' content='0;url=" + page + "'>" & vbcrlf end if Response.End End Sub
'============================================================== '현재의 윈도우창 처리, 그리고 이동 '============================================================== Sub dynamicRefresh(closeVal, page) Response.Write "<SCRIPT language=javascript>" & vbcrlf Response.Write "<!--" & vbcrlf if closeVal = "yes" then Response.Write "self.close();" & vbcrlf end if if page = "" or page = "no" or IsNull(page) or IsEmpty(page) then Response.Write "" else Response.Write page & ";" & vbcrlf end if Response.Write "//-->" & vbcrlf Response.Write "</SCRIPT>" & vbcrlf Response.End End Sub
'============================================================== '해당 페이지로 이동 '============================================================== Sub respon_Redirect(page) Response.Redirect page Response.End End Sub
'============================================================== 'Replace의 확장... Null 체크 '============================================================== Function nReplace(getStr, pattern, convertStr) if getStr = "" or IsNull(getStr) or IsEmpty(getStr) then nReplace = "" else nReplace = Trim(replace(getStr, pattern, convertStr)) end if End Function
'============================================================== '파라미터를 비교해서 비어있지 않은값을 리턴 '============================================================== Function returnExistVal(val1, val2) if Trim(val1) = "" and Trim(val2) = "" then returnExistVal = "" elseif Trim(val1) = "" then returnExistVal = val2 elseif Trim(val2) = "" then returnExistVal = val1 else returnExistVal = -1 end if End Function
'============================================================== 'Trim의 확장... Null 체크 '============================================================== Function nTrim(getString) if getString = "" or IsNull(getString) or IsEmpty(getString) then nTrim = "" else nTrim = Trim(getString) end if End Function
'============================================================== 'Int의 확장.... 숫자형이 아닐 때 한번 더 체크 '============================================================== Function nInt(getNumber) Dim conNumber
conNumber = CStr(getNumber)
if IsNumeric(conNumber) then conNumber = Int(conNumber) elseif conNumber = "" or IsNull(conNumber) or IsEmpty(conNumber) then conNumber = 0 else conNumber = 0 end if
nInt = conNumber End Function
'============================================================== 'CInt의 확장.... 숫자형이 아닐 때 한번 더 체크 '============================================================== Function nCInt(getNumber) Dim conNumber
conNumber = CStr(getNumber) if IsNumeric(conNumber) then conNumber = CInt(conNumber) elseif conNumber = "" or IsNull(conNumber) or IsEmpty(conNumber) then conNumber = 0 else conNumber = 0 end if
nCInt = conNumber End Function
'============================================================== 'CLng의 확장.... 숫자형이 아닐 때 한번 더 체크 '============================================================== Function nCLng(getNumber) Dim conNumber
conNumber = CStr(getNumber) if IsNumeric(conNumber) then conNumber = CLng(conNumber) elseif conNumber = "" or IsNull(conNumber) or IsEmpty(conNumber) then conNumber = 0 else conNumber = 0 end if
nCLng = conNumber End Function
'============================================================== 'HTML Tag를 화면에 보여주기 위해 convert 또는 revert한다. '==============================================================
'-------------------------------------------------------- ' 정규표현식을 이용한 대치 ' --------------------------------------------------------
Function eregi_replace(pattern, replace, text) Dim eregObj Set eregObj= New RegExp
eregObj.Pattern= pattern ' Set Pattern(패턴 설정) eregObj.IgnoreCase = True ' Set Case Insensitivity(대소문자 구분 여부) eregObj.Global = True ' Set All Replace(전체 문서에서 검색) eregi_replace = eregObj.Replace(text, replace) ' Replace String End Function
'------------------------------------------------------ ' HTML 태그 제거 '------------------------------------------------------ Function delete_tag(atcText) atcText= eregi_replace("<html(.*|)<body([^>]*)>","",atcText) atcText= eregi_replace("</body(.*)</html>(.*)","",atcText) atcText= eregi_replace("<[/]*(div|layer|body|html|head|meta|form|input|select|textarea|font|base|br|a href|img|u|strong|EM|P|A|span|table|tbody|tr|td|b|iframe|center|COLGROUP|COL|TFOOT|OL|Li|link|MARQUEE|UL|APPLET|OBJECT|!-)[^>]*>","",atcText) atcText= eregi_replace("<(style|script|title|link|embed)(.*)</(style|script|title|embed)>","",atcText) atcText= eregi_replace("<[/]*(script|style|title|xmp|embed)>","",atcText) atcText= eregi_replace("([a-z0-9]*script:)","deny_$1",atcText) atcText= eregi_replace("<(?|%)","<$1",atcText) atcText= eregi_replace("(?|%)>","$1>",atcText)
atcText= Replace(atcText, "<", "<") atcText= Replace(atcText, ">", ">")
delete_tag = atcText END Function
'------------------------------------------------------ '엔터키값(CHR(13)&CHR(10))을 <br> 태그로 변경 '------------------------------------------------------ Function convertChr(getString) Dim conStr
conStr = getString if conStr = "" or IsNull(conStr) or IsEmpty(conStr) then conStr = "" else conStr = replace(conStr, CHR(13)&CHR(10), "<br>") '케리지 리턴 / 라인피드 conStr = replace(conStr, CHR(13), "<br>") '케리지 리턴 conStr = replace(conStr, CHR(10), "<br>") '라인피드 end if
convertChr = conStr End Function
'------------------------------------------------------ 'HTML Tag를 화면에 출력하도록 Convert시킨다. '엔터값은 <br>로 변경 '------------------------------------------------------ Function convertTag(getString, conChrValue) Dim conStr
conStr = getString if conStr = "" or IsNull(conStr) or IsEmpty(conStr) then conStr = "" else conStr = replace(conStr, CHR(60), "<") '< conStr = replace(conStr, CHR(62), ">") '> if conChrValue = "Y" then '엔터값을 <br>로 변경 conStr = convertChr(conStr) end if end if
convertTag = conStr End Function
'------------------------------------------------------ 'HTML Tag가 화면에 실행되도록 Revert시킨다. '------------------------------------------------------ Function revertTag(getString) Dim revStr
revStr = getString if revStr = "" or IsNull(revStr) or IsEmpty(revStr) then revStr = "" else revStr = replace(revStr, "<", CHR(60)) '< revStr = replace(revStr, ">", CHR(62)) '> end if
revertTag = revStr End Function
'------------------------------------------------------ 'HTML Tag를 화면에 출력시 <b>태그는 허용 '------------------------------------------------------ Function revertBold(getString) Dim revStr
revStr = getString if revStr = "" or IsNull(revStr) or IsEmpty(revStr) then revStr = "" else revStr = replace(revStr, "<b>", "<b>") revStr = replace(revStr, "<B>", "<B>") revStr = replace(revStr, "</b>", "</b>") revStr = replace(revStr, "<B>", "</B>") end if
revertBold = revStr End Function
'============================================================== '받은 문자열에서 작은따옴표를 "''"로 convert 시킨다. '============================================================== Function convertSingleQ(getString) if getString = "" or IsNull(getString) or IsEmpty(getString) then convertSingleQ = "" else convertSingleQ = replace(getString , "'", "''") end if End Function
'============================================================== '입력필드에서 " 사용시 뒷부분 잘리는것 막기위해 convert 시킨다. '============================================================== Function convertDoubleQ(getString) if getString = "" or IsNull(getString) or IsEmpty(getString) then convertDoubleQ = "" else convertDoubleQ = replace(getString, chr(34), """) end if End Function
'============================================================== '입력필드 또는 검색할때 url주소에서 ', " 를 convert 시킨다. '============================================================== Function convertSinDouQ(getString) Dim convString
if getString = "" or IsNull(getString) or IsEmpty(getString) then convString = "" else convString = replace(getString, chr(34), """) convString = replace(convString, chr(39), "'") end if
convertSinDouQ = convString
End Function
'============================================================== '지정된 길이 만큼 문자열 자르고 "..."으로 처리 '============================================================== Function cutString(getString, strSize) if getString = "" or IsNull(getString) or IsEmpty(getString) then cutString = "" else if Len(Trim(getString)) <= strSize then cutString = getString else cutString = Left(getString, strSize) & "..." end if end if End Function
'============================================================== '일반 숫자로 되어 있는것을 파일크기 형태로 변환(단위:KB, MB) '============================================================== Function ConvertFileSize(getNumber) Dim conNumber
conNumber = CStr(getNumber) if IsNumeric(conNumber) then conNumber = (int(conNumber/1024) * -1) * -1
if int(conNumber) = int(0) then conNumber = 1 & "KB" elseif int(conNumber) => int(1000) then conNumber = Round(conNumber/1024, 1) & "MB" else conNumber = conNumber & "KB" end if elseif conNumber = "" or IsNull(conNumber) or IsEmpty(conNumber) then conNumber = "" else conNumber = "" end if
ConvertFileSize = conNumber End Function
'============================================================== '특정문자열의 포함여부 확인 '============================================================== Function isin(getString, element) if InStr(1, getString, element) > 0 then isin = True else isin = False end if End Function
'============================================================== '숫자를 원하는 길이로 가져오기 '============================================================== function getNumberLen(getNumber, numLength) Dim numStr, i
numStr = "" for i = 1 to numLength numStr = numStr & "0" next
getNumberLen = right(numStr & getNumber, numLength) End Function
'============================================================== '숫자 3자리 마다 콤마 삽입 '============================================================== Function addComma(nNumber) Dim strNumber, nLen, strSub Dim i, nFirst, nSize, strTotNumber
strNumber = CStr(nNumber) nLen = Len(strNumber)
For i = nLen To 1 Step -3 nFirst = i - 2 nSize = 3 if (i - 2) < 1 then nFirst = 1 nSize = i end if strSub = Mid(strNumber, nFirst, nSize) strTotNumber = strSub + strTotNumber if (nLen > 3) And (i - 2) > 1 then strTotNumber = "," + strTotNumber end if Next
addComma = strTotNumber End Function
'============================================================== '문자열의 정확한 바이트 수를 리턴하는 함수 '============================================================== Function stringByte(getString) Dim strLen, i, j, totalByte
totalByte = 0 j = 1 strLen = Len(getString)
For i=1 To strLen if Asc(Mid(getString, j, 1)) < 0 then totalByte = totalByte + 2 else totalByte = totalByte + 1 end if j = j + 1 Next
stringByte = totalByte End Function
'============================================================== '문자열을 제한된 바이트 수만큼 자르기 '============================================================== Function CutstringByte(getString, limitLen) Dim strLen, i, j, setString, totalByte
strLen = Len(getString) j = 1 setString = "" totalByte = 0
For i=1 To strLen if Asc(Mid(getString, j, 1)) < 0 then totalByte = totalByte + 2 else totalByte = totalByte + 1 end if
if int(totalByte) <= int(limitLen) then setString = setString + Mid(getString, j, 1) else Exit For end if
j = j + 1 Next
CutstringByte = setString End Function
'============================================================== '통화기호(FormatCurrency)의 확장형 (컴퓨터 설정에 따름$,₩...) '============================================================== function nFormatCurrency(getNumber) Dim conNumber
if getNumber = "" or IsNull(getNumber) or IsEmpty(getNumber) then conNumber = "" else conNumber = FormatCurrency(getNumber) end if
nFormatCurrency = conNumber End Function
'============================================================== 'DateTime형을 각각의 형태로 변환시킨다. '============================================================== '------------------------------------------------------ 'DateTime 형을 YYYY.MM.DD hh:mm 형태로 출력 '------------------------------------------------------ function nFormatDateCyworld(getDate) Dim conDate, tempDate
if IsDate(getDate) then conDate = getNumberLen(Year(getDate), 4) & "." & getNumberLen(Month(getDate), 2) & "." & getNumberLen(Day(getDate), 2) & " " & getNumberLen(Hour(getDate), 2) & ":" & getNumberLen(Minute(getDate), 2) else conDate = "" end if
nFormatDateCyworld = conDate End Function
'------------------------------------------------------ 'DateTime 형을 YYYY.MM.DD(weekly) TIME 형태로 출력 '------------------------------------------------------ function nFormatDateAll(getDate) Dim conDate, tempDate
if IsDate(getDate) then tempDate = CStr(getDate) tempDate = replace(tempDate, "-", ".") conDate = left(tempDate, 10) & "(" & convertWeek(getDate) & ")" & " " & mid(tempDate, 11) else conDate = "" end if
nFormatDateAll = conDate End Function
'------------------------------------------------------ 'DateTime 형을 YYYY년 MM월 DD일 형태로 출력 '------------------------------------------------------ Function nFormatDateKOR(getDate) Dim conDate
conDate = Year(getDate) & "년 " & Month(getDate) & "월 " & Day(getDate) & "일" nFormatDateKOR = conDate End Function
'------------------------------------------------------ 'DateTime 형을 YYYY(.-/)MM(.-/)DD 형태로 출력 '------------------------------------------------------ function nFormatDateForm(getDate, getForms) Dim conDate
if IsDate(getDate) then conDate = Year(getDate) & getForms & Right("0" & CStr(Month(getDate)), 2) & getForms & Right("0" & CStr(Day(getDate)), 2) else conDate = "" end if
nFormatDateForm = conDate End Function
'------------------------------------------------------ 'DateTime 형을 YYYY(.-/)MM(.-/)DD 형태로 출력 '------------------------------------------------------ function nFormatDateWeek(getDate, getForms) Dim conDate
if IsDate(getDate) then conDate = Year(getDate) & getForms & Right("0" & CStr(Month(getDate)), 2) & getForms & Right("0" & CStr(Day(getDate)), 2) & " " & convertWeek(getDate) else conDate = "" end if
nFormatDateWeek = conDate End Function
'------------------------------------------------------ 'DateTime 형을 20041225073033 (년월일시분초)형태로 출력 '------------------------------------------------------ function nFormatDateUnique(getDate) Dim conDate
if IsDate(getDate) then conDate = getNumberLen(Year(getDate), 4) & getNumberLen(Month(getDate), 2) & getNumberLen(Day(getDate), 2) & getNumberLen(Hour(getDate), 2) & getNumberLen(Minute(getDate), 2) & getNumberLen(Second(getDate), 2) else conDate = "" end if
nFormatDateUnique = conDate End Function
'------------------------------------------------------ 'DateTime 형을 20041225 형태로 출력 '------------------------------------------------------ function nFormatDatenum(getDate) Dim conDate
if IsDate(getDate) then conDate = getNumberLen(Year(getDate), 4) & getNumberLen(Month(getDate), 2) & getNumberLen(Day(getDate), 2) else conDate = "" end if
nFormatDatenum = conDate End Function
'------------------------------------------------------ 'DateTime 형을 요일형태로 출력 '------------------------------------------------------ Function convertWeek(getDate) dim conDate
select case weekday(getDate,1) case 1 conDate = "일요일" case 2 conDate = "월요일" case 3 conDate = "화요일" case 4 conDate = "수요일" case 5 conDate = "목요일" case 6 conDate = "금요일" case 7 conDate = "토요일" end select
convertWeek = conDate End Function
'------------------------------------------------------ '자정 이후 지정된 시간만큼 경과한 초 수를 반환한다. '------------------------------------------------------ Function timeToSecond(gTime) Dim sDiv, convertSec
sDiv = split(gTime, " ") convertSec = -1
if uBound(sDiv) = 0 then if InStr(gTime, ":") > 0 then splitTime = split(sDiv(0), ":")
gHour = cInt(splitTime(0)) gMin = cInt(splitTime(1)) gSec = cInt(splitTime(2))
convertSec = (((gHour * 60) + gMin) * 60) + gSec else convertSec = 0 end if elseif uBound(sDiv) = 1 then splitTime = split(sDiv(1), ":")
if sDiv(0) = "오전" and cInt(splitTime(0)) = 12 then gHour = 0 elseif sDiv(0) = "오후" and cInt(splitTime(0)) <> 12 then gHour = cInt(splitTime(0)) + 12 else gHour = cInt(splitTime(0)) end if gMin = cInt(splitTime(1)) gSec = cInt(splitTime(2))
convertSec = (((gHour * 60) + gMin) * 60) + gSec elseif uBound(sDiv) = 2 then splitTime = split(sDiv(2), ":")
if sDiv(1) = "오전" and cInt(splitTime(0)) = 12 then gHour = 0 elseif sDiv(1) = "오후" and cInt(splitTime(0)) <> 12 then gHour = cInt(splitTime(0)) + 12 else gHour = cInt(splitTime(0)) end if gMin = cInt(splitTime(1)) gSec = cInt(splitTime(2))
convertSec = (((gHour * 60) + gMin) * 60) + gSec end if
timeToSecond = convertSec
End Function
'============================================================== ' 코드명가져 오기 '============================================================== Function getCode(code) Dim coSQL, coRS
coSQL = "SELECT CODE_NAME FROM CODE_TAB " coSQL = coSQL & " WHERE CODE_CLASS = '" & UCase(code_class) & "' " coSQL = coSQL & " AND CODE = '" & UCase(code) & "' " Set coRS = OpenRecordSet(coSQL) if coRS.RecordCount = 1 then getCode = coRS(0) elseif coRS.RecordCount > 1 then getCode = "중복코드" else getCode = "코드없음" end if coRS.close Set coRS = nothing End Function
'============================================================== '메일주소가 있으면 메일로 링크 '============================================================== Function emailLink(email, linkStr) if Trim(email) = "" or isnull(email) or isEmpty(email) then emailLink = linkStr else emailLink = "<a href='mailto:" & email & "'>" & linkStr & "</a>" end if End Function
'============================================================== 'TD 태그 출력 '============================================================== Function printTd(getString, sAlign) printTd = "<td align=" & sAlign & ">" & getString & "</td>" End Function
'============================================================== 'GET/POST 방식으로 전달된 데이터 화면에 출력 '============================================================== Function viewSubmitData() Dim strkey
response.write "============== Request.QueryString ==============" response.write "<table border=1 cellspacing=0 cellpadding=1 borderColorDark='white' borderColorLight='silver'>" response.write "<tr>" response.write "<th>ITEM NAME</th>" response.write "<th>REQUEST</th>" response.write "<th>VALUE</th>" response.write "</tr>" For Each strkey in Request.QueryString response.write "<tr>" response.write "<td>" & strkey & "</td>" response.write "<td>" & "= Request(" & Chr(34) & strkey & Chr(34) & ")" & "</td>" response.write "<td>" & Request.QueryString(strkey) & " </td>" response.write "</tr>" 'Response.Write strkey & " = Request(" & Chr(34) & strkey & Chr(34) & ") --> " & Request.QueryString(strkey) & "<br>" 'Server.URLEncode(Request.QueryString(strkey)) Next response.write "</table>" response.write "<br><br>" response.write "============== Request.Form ==============" response.write "<table border=1 cellspacing=0 cellpadding=1 borderColorDark='white' borderColorLight='silver'>" response.write "<tr>" response.write "<th>ITEM NAME</th>" response.write "<th>REQUEST</th>" response.write "<th>VALUE</th>" response.write "</tr>" For Each strkey in Request.Form response.write "<tr>" response.write "<td>" & strkey & "</td>" response.write "<td>" & "= Request(" & Chr(34) & strkey & Chr(34) & ")" & "</td>" response.write "<td>" & Request.Form(strkey) & " </td>" response.write "</tr>" 'Response.Write strkey & " = Request(" & Chr(34) & strkey & Chr(34) & ") --> " & Request.Form(strkey) & "<br>" 'Server.URLEncode(Request.Form(strkey)) Next response.write "</table>" response.end End Function
'============================================================== '썸네일 이미지 경로 만들기 '============================================================== Function thumbFileName(filePathName, checkStr) Dim filePath, fileName, thumbFile
if Trim(filePathName) = "" or isnull(filePathName) or isEmpty(filePathName) then newPathName = "" else if InStr(filePathName, checkStr) > 0 then filePath = Left(filePathName, InStrRev(filePathName, checkStr)) fileName = Mid(filePathName, InStrRev(filePathName, checkStr) + 1) newPathName = filePath & "thumb_" & fileName else newPathName = filePathName end if end if
thumbFileName = newPathName
End Function
'============================================================== '페이지의 경로 '==============================================================
'------------------------------------------------------ '현재 페이지의 전체경로(쿼리값 포함) '------------------------------------------------------ Function current_full_path() current_full_path = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("PATH_INFO")&"?"& Request.ServerVariables("QUERY_STRING") End Function
'------------------------------------------------------ '현재 페이지의 전체경로(쿼리값 미포함) '------------------------------------------------------ Function current_path() current_path = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("PATH_INFO") End Function
'------------------------------------------------------ 'HTTP_HOST를 제외한 현재 페이지의 경로 '------------------------------------------------------ Function current_vir_path() current_vir_path = Request.ServerVariables("PATH_INFO") End Function
'------------------------------------------------------ '현재 페이지의 경로에서 첫번째 폴더명(/첫번째폴더/두번째/) '------------------------------------------------------ Function current_first_folder() Dim virPath
virPath = current_vir_path() if InStr(2, virPath, "/") > 2 then current_first_folder = Mid(virPath, 2, InStr(2, virPath, "/") - 2) else current_first_folder = "/" end if End Function
'------------------------------------------------------ '현재 페이지가 속해 있는 폴더명 '------------------------------------------------------ Function current_folder() Dim virPath, startNum, newPath
virPath = current_vir_path() startNum = instrRev(virPath, "/" , instrRev(virPath, "/") - 1) + 1 newPath = Mid(virPath, startNum)
current_folder = Mid(newPath, 1, instrRev(newPath, "/") - 1) End Function
'------------------------------------------------------ '현재 페이지의 파일명 '------------------------------------------------------ Function current_page() Dim virPath
virPath = current_vir_path() current_page = Mid(virPath, InStrRev(virPath, "/") + 1) End Function
'------------------------------------------------------ '링크되어온 이전페이지의 전체경로 (쿼리값 포함) '------------------------------------------------------ Function before_full_path() before_full_path = Request.ServerVariables("HTTP_REFERER") End Function
'------------------------------------------------------ '링크되어온 이전페이지의 파일명 '------------------------------------------------------ Function before_page() Dim virPath
virPath = before_full_path() before_page = Mid(virPath, InstrRev(virPath, "/") + 1) End Function
%> |