<% 'function InputValue($strvalue) '변수필터 'function InputValue2($strvalue) '변수필터2 'Function InputValue3($CheckValue)'변수필터3 'function InputValue4($strvalue) '변수필터4 'function getTextmode($strvalue) '텍스트모드로 변환 'function mnai ($ssn) '나이구하는 함수 'function no_cache() '캐쉬제거 'function FolderCreate($strDir) '폴더검사후 없으면 생성 'function page($url) '페이지 'function page2(url) '페이지2 'function trmouseover(clr) '마우스오버시색상적용 'function title_str2(str,w,help) '타이틀2 'function popup_view() '팝업띄우기 'function remove_tags( str ) '태그삭제 'function StringToHTML( str, max, br ) '지정한 폭(max)만큼 문자열 조절 (한글을 2바이트로 인식) 'sub loding(st,strlink) '처리완료 'function isdir(strDirectory) '폴더 유무확인 'function wfile(filedname, maxMbyte, strDirectory) '업로드파일저장하기(dext버젼) 'function wfile2(filedname, maxMbyte, strDirectory, ext) '업로드파일저장하기(dext버젼) ->제한파일추가 'function cfile(filedname,strDirectory1,strDirectory) '파일복사 'function dfile(strpath) '파일삭제 'function get_lastdate(m_id) '마지막접속시간정보구하기 'function get_FileName1(filename) '파일확장자 이미지 'function get_name(m_id) '회원이름찾기 'sub input_type(iptype,ip_name,ip_value,size,maxlength,ip_aciton) 'input 관리 'function bbs_tablename_str(a_num) '게시판테이블명 알아내기 'function bbs_bbsname_str(a_num) ' 게시판 명알아내기 'function countTotal2()'전체접속통계 'function countToday2() '오늘접속통계 'Function Back_back(message) 'history.go(-1) 'Function Back_back2(message, url) 'location.href 'Function Back_back3(message, url) 'top.location.href 'Function Sung_gong(message) 'message->window.close() 'Function Sung_gong2(message, url) 'message->location.href ->(opener.location.reload()) 'Function Sung_gong3(message) 'message->window.close() ->(opener.location.reload()) 'Function ChkValSelect(ByVal value1, ByVal value2) '셀렉트버튼 'Function ChkValChkBox(ByVal value1, ByVal value2) '체크박스 'Function ChkValChkBox2(ByVal value1, ByVal value2) '체크박스2 'Function sendMail(from_add, to_add, cc, bcc, subject, body) 메일보내기 'Function sendMail2(from_add, to_add, cc, bcc, subject, body) '메일보내기2 'function get_idx_add() 'idx 자동생성. 'Function GetImageSize(Virtual_Image_Path) '이미지크기 (전체) 'Function GetImageSize_w(Virtual_Image_Path) '이미지크기 (가로) 'Function GetImageSize_h(Virtual_Image_Path) '이미지크기 (세로) 'function ViewCreate() '통합게시판 view 'function TabIndex() '자동인덱스 'function manager_leftmenu() '관리자 페이지 좌측메뉴 '************** Information **************************************** ' Program Title : 문자열처리구문1 ' Company : ' Creator : 윤 종 우 2004. 03. 05 ' Update : 2008. 11 '********************************************************************* function InputValue(strvalue) strvalue = trim(strvalue) strvalue = replace(strvalue, "&", "&") strvalue = replace(strvalue, "<", "<") strvalue = replace(strvalue, ">", ">") strvalue = replace(strvalue, "'", "'") strvalue = replace(strvalue, chr(34), """) strvalue = replace(strvalue, """", """) InputValue = strvalue End function '************** Information **************************************** ' Program Title : 문자열처리구문2 ' Company : ' Creator : 윤 종 우 2004. 03. 05 ' Update : 2008. 11 '********************************************************************* function InputValue2(strvalue) ' strvalue = Replace(strvalue," ","") strvalue = Replace(strvalue,"'","''") strvalue = Replace(strvalue, "", "") strvalue = Replace(strvalue, "", "") InputValue2 = strvalue End Function Function InputValue3(CheckValue) CheckValue = replace(CheckValue, "&" , "&") CheckValue = replace(CheckValue, "<", "<") CheckValue = replace(CheckValue, ">", ">") CheckValue = replace(CheckValue, "'", "`") CheckValue = replace(CheckValue, " ", "  ") InputValue3 = CheckValue End Function '************** Information **************************************** ' Program Title : 문자열처리구문4 ' Company : ' Creator : 2006. 3. 14 '********************************************************************* function InputValue4(strvalue) strvalue = trim(strvalue) strvalue = Replace(strvalue,"'","''") InputValue4 = strvalue End Function '************** Information **************************************** ' Program Title : 텍스트모드 ' Company : ' Creator : 윤 종 우 2004. 03. 05 '********************************************************************* function getTextmode(strvalue) if strvalue <> "" or not isnull(strvalue) then strvalue=Replace(strvalue, "<" , "<") strvalue=Replace(strvalue, ">" , ">") strvalue=Replace(strvalue,chr(13),"
") strvalue=Replace(strvalue," ","  ") strvalue=Replace(strvalue,"\t","   ") end If getTextmode = strvalue end Function function InputValue77(strvalue) strvalue = replace(strvalue, " ", "") strvalue = replace(strvalue, "'", "") strvalue = replace(strvalue, "<", "<") strvalue = replace(strvalue, ">", ">") strvalue = replace(strvalue, "", "") strvalue = replace(strvalue, "", "") strvalue = replace(strvalue, """, """") InputValue77 = strvalue End function function InputValueXSS(strvalue) strvalue = remove_tags( strvalue ) strvalue = replace(strvalue, "", "") strvalue = replace(strvalue, "<", "") strvalue = replace(strvalue, ">", "") strvalue = replace(strvalue, "alert(", "") strvalue = replace(strvalue, ");", "") strvalue = replace(strvalue, "<", "") strvalue = replace(strvalue, ">", "") strvalue = replace(strvalue, """", """) InputValueXSS = strvalue End function '************** Information **************************************** ' Program Title : title_str2 ' Company : ' Creator : '********************************************************************* function title_str2(str, w, help) %>
<%=str%> <%=help%>
<% End function '************** Information **************************************** ' Program Title : trmouseover ' Company : ' Creator : '********************************************************************* function trmouseover(clr) response.write "onMouseOver=this.style.backgroundColor='"&clr&"' onMouseOut=this.style.backgroundColor=''" End Function '************** Information **************************************** ' Program Title : 업로드파일저장하기(dext버젼) ' Company : 나눔아이앤씨 ' Creator : 최 경 수 2007 '********************************************************************* function wfile2(filedname, maxMbyte, strDirectory, ext) '필드명, 최대용량, 업로드경로, 허용파일(zip,gif,jpg...) Dim fileName,filePath,fileSize, loop_i, FSO Set FSO = Server.CreateObject("Scripting.FileSystemObject") if Len(UploadForm(filedname)) > 0 then 'strDirectory = server.MapPath("./")&"\data\"&a_tablename&"\" If FSO.FolderExists(strDirectory) = False Then '폴더가 없으면 새로 생성한다.. FSO.CreateFolder(strDirectory) End if '--파일 정보추출 fileName = UploadForm(filedname).FileName '파일이름.. filePath = UploadForm(filedname).FilePath '절대경로.. fileSize = UploadForm(filedname).FileLen '파일사이즈.. saveFileName = strDirectory & fileName '실제 저장되 경로에 파일... '--확장장와 파일 이름 분리 strfile = split(fileName,".") strName = strfile(0) '파일명 strExt = strfile(UBound(strfile)) '확장자 If ext<>"" then ext = Replace(ext, " ", "") ext_arr = Split(ext,",") ext_stat = false For loop_i = 0 To UBound( ext_arr ) If LCase(strExt) = LCase(ext_arr(loop_i)) Then ext_stat = True Exit for End if Next If ext_stat = False Then Back_back "허용되지 않은 파일형식입니다.\n\n 허용파일("&ext&")" End If '-- 파일크기가 검사 '1MByte = 1048576Byte if Round(fileSize) > Round(1048576 * maxMbyte) then Back_back "파일크기가"& maxMbyte &"MByte 이하여만 합니다." end if '같은 파일 이 존재할경우 --> _1,_2 이런식으로 파일명 변경..ㅡㅡv bExist = True count= 0 Do While bExist If (FSO.FileExists(saveFileName)) Then count = count + 1 FileName = strName & "_" & count & "." & strExt saveFileName = strDirectory & FileName Else Exit Do '없으며 빠져나간당.. End If Loop '파일 저장 UploadForm(filedname).SaveAs saveFileName end if 'Set UploadForm = nothing Set FSO = nothing wfile2 = FileName end function '************** Information **************************************** ' Program Title : 업로드파일저장하기(dext버젼) 파일명 자동생성 ' Company : 나눔아이앤씨 ' Creator : 최 경 수 2007 '********************************************************************* function wfile3(filedname, maxMbyte, strDirectory, ext) '필드명, 최대용량, 업로드경로, 허용파일(zip,gif,jpg...) Dim fileName,filePath,fileSize, loop_i, FSO Set FSO = Server.CreateObject("Scripting.FileSystemObject") if Len(UploadForm(filedname)) > 0 then 'strDirectory = server.MapPath("./")&"\data\"&a_tablename&"\" If FSO.FolderExists(strDirectory) = False Then '폴더가 없으면 새로 생성한다.. FSO.CreateFolder(strDirectory) End if '--파일 정보추출 fileName = UploadForm(filedname).FileName '파일이름.. filePath = UploadForm(filedname).FilePath '절대경로.. fileSize = UploadForm(filedname).FileLen '파일사이즈.. saveFileName = strDirectory & fileName '실제 저장되 경로에 파일... '--확장장와 파일 이름 분리 strfile = split(fileName,".") strName = strfile(0) '파일명 strExt = strfile(UBound(strfile)) '확장자 ext = Replace(ext, " ", "") ext_arr = Split(ext,",") ext_stat = false For loop_i = 0 To UBound( ext_arr ) If LCase(strExt) = LCase(ext_arr(loop_i)) Then ext_stat = True Exit for End if Next If ext_stat = False Then Back_back "허용되지 않은 파일형식입니다.\n\n 허용파일("&ext&")" '-- 파일크기가 검사 '1MByte = 1048576Byte if Round(fileSize) > Round(1048576 * maxMbyte) then Back_back "파일크기가"& maxMbyte &"MByte 이하여만 합니다." end if If LCase(strExt) = "jpg" Or LCase(strExt) = "gif" Then FileName = Replace( Date(), "-" ,"" ) & Right( "0".Hour(now), 2) & Right( "0".minute(now), 2) & Right( "0".second(now), 2) & "." & strExt saveFileName = strDirectory & FileName else '같은 파일 이 존재할경우 --> _1,_2 이런식으로 파일명 변경..ㅡㅡv bExist = True count= 0 Do While bExist If (FSO.FileExists(saveFileName)) Then count = count + 1 FileName = strName & "_" & count & "." & strExt saveFileName = strDirectory & FileName Else Exit Do '없으며 빠져나간당.. End If Loop End If '파일 저장 UploadForm(filedname).SaveAs saveFileName end if 'Set UploadForm = nothing Set FSO = nothing wfile3 = FileName end function '************** Information **************************************** ' Program Title : dfile ' Company : ' Creator : '********************************************************************* function dfile( dir_path, delfile) ''경로, 원본파일명 Dim FSO Set FSO = Server.CreateObject("Scripting.FileSystemObject") If FSO.fileExists(dir_path&delfile) = true Then '파일이 있으면 지운다. 'response.write dir_path&delfile 'response.end FSO.DeleteFile(dir_path&delfile) End if Set FSO = Nothing End Function Sub dfolder(strDirectory) Dim fso Set fso = Server.CreateObject("Scripting.FileSystemObject") If FSO.FolderExists(strDirectory) = True Then '파일저장 폴더가 존재한다면 제거한다. FSO.DeleteFolder(strDirectory) End If Set FSO = Nothing End Sub '************** Information **************************************** ' Program Title : ' Company : ' Creator : '********************************************************************* function cfile(filedname,strDirectory1,strDirectory) Set FSO = Server.CreateObject("Scripting.FileSystemObject") If FSO.FolderExists(strDirectory) = False Then '폴더가 없으면 새로 생성한다.. FSO.CreateFolder(strDirectory) End if '--확장장와 파일 이름 분리 strfile = split(filedname,".") strName = strfile(0) '파일명 strExt = strfile( UBound(strfile) ) '확장자 '같은 파일 이 존재할경우 --> _1,_2 이런식으로 파일명 변경..ㅡㅡv bExist = True count= 0 org_file = strDirectory1&filedname fwsaveFileName = strDirectory&filedname FileName = filedname Do While bExist If (FSO.FileExists(fwsaveFileName)) Then count = count + 1 FileName = strName & "_" & count & "." & strExt fwsaveFileName = strDirectory & FileName Else Exit Do '없으며 빠져나간당.. End If Loop 'response.write org_file & "," & fwsaveFileName '파일 저장 If (FSO.FileExists(org_file)) Then FSO.CopyFile org_file,fwsaveFileName End if Set FSO = nothing cfile = FileName end function '************** Information **************************************** ' Program Title : loding ' Company : ' Creator : '********************************************************************* function loding( st, strlink) response.write "" End Function '************** Information **************************************** ' Program Title : 페이징 ' Company : ' Creator : 윤 종 우 2004. 05. 13 '********************************************************************* function page(url) v_temp = int((v_page - 1) / v_block) * v_block + 1 If v_temp = 1 then ''response.write "[이전 "&v_block&"개]" else num = v_temp-v_block response.write "이전 " End if v_loop = 1 Do While (v_loop <= v_block and v_temp <= v_totalpage) If CInt(v_temp) = CInt(v_page) then response.write ""&v_temp&" " else response.write ""&v_temp&" " End if v_temp = v_temp + 1 v_loop = v_loop + 1 loop If v_temp > v_totalpage then ''response.write "[다음 "&v_block&"개]" else response.write " " End if End Function function pageStyle(url) Dim a_class Dim v_search_enc : v_search_enc = server.urlencode( v_search ) Dim v_keyword_enc : v_keyword_enc = server.urlencode( v_keyword ) v_temp = int((v_page - 1) / v_block) * v_block + 1 If v_temp = 1 then ''response.write "[이전 "&v_block&"개]" else num = v_temp-v_block response.write " " End if v_loop = 1 Response.write "" If v_temp > v_totalpage then ''response.write "[다음 "&v_block&"개]" else response.write " " End if End Function function pageStyle2(url) Dim a_class Dim v_search_enc : v_search_enc = server.urlencode( v_search ) Dim v_keyword_enc : v_keyword_enc = server.urlencode( v_keyword ) v_temp = int((v_page - 1) / v_block) * v_block + 1 If v_temp = 1 then ''response.write "[이전 "&v_block&"개]" else num = v_temp-v_block response.write " " End if v_loop = 1 Response.write "" If v_temp > v_totalpage then ''response.write "[다음 "&v_block&"개]" else response.write " " End if End function '************** Information **************************************** ' Program Title : 페이지2 ' Company : ' Creator : 윤 종 우 2004. 05. 13 '********************************************************************* function page2(url) v_temp = int((v_page - 1) / v_block) * v_block + 1 If v_temp = 1 then ''response.write "[이전 "&v_block&"개]" else num = v_temp - v_block response.write "이전 " End if v_loop = 1 Do While (v_loop <= v_block and v_temp <= v_totalpage) If CInt(v_temp) = CInt(v_page) then response.write ""&v_temp&" " else response.write ""&v_temp&" " End if v_temp = v_temp + 1 v_loop = v_loop + 1 loop If v_temp > v_totalpage then ''response.write "[다음 "&v_block&"개]" else response.write " " End if End function '************** Information **************************************** ' Program Title : Back_back ' Company : ' Creator : 윤 종 우 '********************************************************************* function Back_back(msg) response.write "페이지이동" response.write "" Response.write "" response.end End function function Back_back2(msg, url) response.write "페이지이동" response.write "" Response.write "" response.end End Function function Back_back_close(msg) response.write "페이지이동" response.write "" Response.write "" response.end End Function function goUrl(url) response.write "페이지이동" response.write "" Response.write "" response.end End function Function goURL2(url,target) response.write "페이지이동" Response.Write"" Response.write "" Response.End End Function '************** Information **************************************** ' Program Title : 폴더검사후 없으면 생성 ' Company : ' Creator : 윤 종 우 2004. 05. 13 '********************************************************************* function FolderCreate(strDir) Dim FSO Set FSO = Server.CreateObject("Scripting.FileSystemObject") 'response.write strDir 'response.end If FSO.FolderExists(strDir) = False Then '폴더가 없으면 새로 생성한다.. FSO.CreateFolder(strDir) End if set FSO = Nothing End Function '************** Information **************************************** ' Program Title : ' ' Company : ' Creator : 윤 종 우 2004. 05 '********************************************************************* function get_FileName1(filename) Dim filename1, fileend If trim(filename) = "" then filename1 = "default.gif" Else filename = split( CStr(filename), "." ) fileend = lcase( trim( filename( ubound(filename) ) ) ) Select Case fileend Case "asf" : filename1 = "icon_asf.png" Case "asx" : filename1 = "icon_asf.png" Case "doc" : filename1 = "icon_doc.png" Case "mpg" : filename1 = "icon_mpg.png" Case "mpeg" : filename1 = "icon_mpeg.png" Case "bat" : filename1 = "icon_bat.png" Case "bmp" : filename1 = "icon_bmp.png" Case "com" : filename1 = "icon_com.png" Case "sys" : filename1 = "icon_sys.png" Case "dll" : filename1 = "icon_dll.png" Case "exe" : filename1 = "icon_exe.png" Case "gif" : filename1 = "icon_gif.png" Case "htm" : filename1 = "icon_html.png" Case "html" : filename1 = "icon_html.png" Case "hwp" : filename1 = "icon_hwp.png" Case "xls" : filename1 = "icon_xls.png" Case "jpg" : filename1 = "icon_jpg.png" Case "mp3" : filename1 = "icon_mp3.png" Case "pcx" : filename1 = "icon_pcx.png" Case "png" : filename1 = "icon_png.png" Case "ppt" : filename1 = "icon_ppt.png" Case "ra" : filename1 = "icon_ra.png" Case "txt" : filename1 = "icon_txt.png" Case "url" : filename1 = "icon_url.png" Case "wav" : filename1 = "icon_wav.png" Case "zip" : filename1 = "icon_zip.png" Case "pdf" : filename1 = "icon_pdf.png" Case Else : filename1 = "icon_no.png" End Select End If get_FileName1 = filename1 End Function '************** Information **************************************** ' Program Title : 'input관리 ' Company : ' Creator : 윤 종 우 2005-10-28 '********************************************************************* function input_type (iptype, ip_name, ip_value, size, maxlength, ip_aciton) If maxlength <> "0" then maxlength_str = "maxlength='"&maxlength&"'" End if If iptype = "text" then %> <%=ip_aciton%>> <% ElseIf ipztype = "password" then %> <%=ip_aciton%>> <% ElseIf ipztype = "ipdate" then %> <%=ip_aciton%>> [날짜선택] <% ElseIf ipztype = "textarea" then %> <% ElseIf ipztype = "file" then %> <%=ip_aciton%>> <% End If End Function '************** Information **************************************** ' Program Title : 'idx 자동생성. ' Company : ' Creator : 윤 종 우 2008-11-20 '********************************************************************* function get_idx_add() 'Dim jw1, jw1, a_num Randomize() jw1 = Int((Rnd * 99) + 1) jw2 = Int((Rnd * 99999999) + 1) + Int(session.sessionId()) jw2 = Right(CStr(jw2),6) a_num = trim(jw1) + trim(jw2) get_idx_add = a_num End Function '************** Information **************************************** ' Program Title : 셀렉트버튼 값체크 ' Company : ' Creator : 2006. 08. '********************************************************************* Function chkSelect(value1, value2) If Not( IsNull(value1) Or IsNull(value2) ) Then If CStr(value1) = CStr(value2) Then chkSelect = "selected = 'selected'" End if End if End Function function chkSelectStatus( value1, value2) chkSelectStatus = false If Not( IsNull(value1) Or IsNull(value2) ) Then If CStr(value1) = CStr(value2) Then chkSelectStatus = true End if End if End function '************** Information **************************************** ' Program Title : 체크박스or라디오버튼 값체크 ' Company : ' Creator : 2006. 08. '********************************************************************* function chkRadio(value1, value2) If Not( IsNull(value1) Or IsNull(value2) ) Then If trim(value1) = trim(value2) then chkRadio = "checked='checked'" else chkRadio = "" End If End if End function function chkRadio2(value1, value2) return_val = "" value1_arr = split(value1, ",") For i=0 To ubound(value1_arr)-1 If trim(value1_arr(i)) = trim(value2) then return_val = "checked='checked'" End if next chkRadio2 = return_val End function function chkRadioStatus(value1, value2) If trim(value1) = trim(value2) then chkRadioStatus = true else chkRadioStatus = false End if End function function chkRadio2Status( value1, value2) return_val = false value1_arr = split(value1, ",") For i=0 To UBound(value1_arr)-1 If trim(value1_arr(i)) = trim(value2) then return_val = true End if next chkRadio2Status = return_val End function '************** Information **************************************** ' Program Title : 체크박스or라디오버튼 값체크 ' Company : ' Creator : 2009-09-25 '********************************************************************* function chkchkbox2(value1, value2) If instr(value1, value2)>0 Then chkchkbox2 = "checked='checked'" Else chkchkbox2 = "" End if End function '************** Information **************************************** ' Program Title : 'new 아이콘 출력.(get_newimg) ' Company : ' Creator : 윤 종 우 2005-07-27 '********************************************************************* function get_newimg(vdate, a_new) if isDate(vDate) Then if DateDiff("d", vDate, date()) <= CInt(a_new) Then response.write "새글" End If End if End Function '************** Information **************************************** ' Program Title : 'new 아이콘 출력.(get_newimg) ' Company : ' Creator : 윤 종 우 2005-07-27 '********************************************************************* function get_newimg2(vdate, a_new) if isDate(vDate) Then if DateDiff("d", vDate, date()) <= CInt(a_new) Then response.write "NEW(새글)" End If End if End Function function get_newimg_main(vdate, a_new) if isDate(vDate) Then if DateDiff("d", vDate, date()) <= CInt(a_new) Then get_newimg_main = "" End If End if End Function '************** Information **************************************** ' Program Title : 태그삭제 remove_tags( str ) ' Company : ' Creator : 윤 종 우 2004. 09. 03 '********************************************************************* function remove_tags( str ) Dim i, tag, dest, temp, length If IsNull( str ) Then str = "" tag = false dest = "" temp = str length = len(temp) For i=1 To length ch = mid(temp,i,1) If ch="<" then tag = true End if If ch=">" then tag = false ch = "" End If If ( Not tag and ch <> chr(13) and ch <> chr(10) and ch <> chr(9)) then dest = dest & ch End if next dest = replace(dest, " ", "" ) remove_tags = dest End Function '************** Information **************************************** ' Program Title : 문자열 조절 StringToHTML ' Company : ' Creator : 2006. 07. 04 '********************************************************************* function StringToHTML( str, max, br ) Dim i, length, buf, tmp, count, count2, ch, first first = false if ( isnull(str) ) then StringToHTML = "ㅋㅋㅋ" Exit Function end if if max>0 then buf = Trim( str ) 'buf = Replace( buf, CHR(9), " " ) 'buf = Replace( buf, CHR(13), "" ) length = len( buf ) count = 1 count2 = 0 tmp = "" for i=1 to length if count>max then if br=false then tmp = tmp & "..." exit for end if if i" count = 1 first = true end if ch = mid( buf, i, 1 ) if ch=CHR(10) then if br=false then exit for end if tmp = tmp & "
" count = 1 first = true elseif count>1 AND ch=CHR(32) then if not first then tmp = tmp & " " end if elseif count = 1 and ch = CHR(32) then tmp = tmp else tmp = tmp & ch first = false end if if asc(ch)<0 then '한글이면 count = count+2 else '영문이면 count = count+1 end if next else tmp = str tmp = Trim( tmp ) tmp = Replace( tmp, "&", "&" ) tmp = Replace( tmp, "<", "<" ) tmp = Replace( tmp, ">", ">" ) 'tmp = Replace( tmp, CHR(10), "
" ) 'tmp = Replace( tmp, CHR(32), " " ) end if StringToHTML = tmp end function '************** Information **************************************** ' Program Title : 팝업띄우는 모듈 popup_view() ' Company : ' Creator : 윤 종 우 2010-02-04 '********************************************************************* function popup_view() table = "popup" getdate_str = Date() sql = " select * from "&table&" where w_chk = 'Y' and edate >= '"&getdate_str&"' and sdate <= '"&getdate_str&"' order by sdate" Set rs = Dbcon.execute(sql) do while not rs.eof idx = trim(rs("idx")) w_width = trim(rs("w_width")) w_height = trim(rs("w_height")) w_top = trim(rs("w_top")) w_left = trim(rs("w_left")) ck_chk = trim(rs("ck_chk")) ck_val = trim(rs("ck_val")) scrollbars = trim(rs("scrollbars")) toolbar = trim(rs("toolbar")) menubar = trim(rs("menubar")) locations = trim(rs("locations")) If ck_val = "" Then ck_val = "1" End if %> <% rs.movenext Loop Set rs = nothing ''************************************************************************************************* getdate_str = Date() sql = " select count(idx) as idx from "&table&" where w_chk = 'T' and edate >= '"&getdate_str&"' and sdate <= '"&getdate_str&"'" 'response.write sql Set rs = Dbcon.execute(sql) If rs.eof Then rs_t_pop_str = 0 Else rs_t_pop_str = rs(0) End If Set rs = nothing If rs_t_pop_str <> 0 then ''----------------------------------------------------------------------------------------------------------- %> <% End if End Function '************** Information **************************************** ' Program Title : 자동증가 TabIndex ' Company : ' Creator : 윤 종 우 2009-08-04 '********************************************************************* function getTabIndex() tabindex = tabindex + 1 getTabIndex = tabindex End Function '************** Information **************************************** ' Program Title : 관리자 페이지 좌측메뉴 ' Company : ' Creator : 윤 종 우 2009-08-04 '********************************************************************* function manager_leftmenu(ct_ref, skin) R_Fields_L = "ct_idx, ct_name" sql = "Select "&R_Fields_L&" from manager_menu where ct_chk='Y' AND ct_ref = "&ct_ref&" AND ct_depth = '2' order by ct_code ASC" Set rs = Dbcon.execute(sql) do while not rs.eof mct_idx = rs("ct_idx") mct_name = rs("ct_name") %> <% rs.movenext Loop Set rs = nothing End Function function ViewCreate() Dim sql, i, qry, col ''기존 뷰테이블 삭제 'qry = "DROP VIEW board_total" 'Dbcon.execute qry ''뷰생성 qry ="SELECT a_tablename, a_bbsname, a_num FROM board_config " Set col = Dbcon.execute(qry) i = 1 do while not col.eof If i=1 then sql = " alter VIEW board_total AS " Else sql = sql & " UNION ALL " End If sql = sql & " SELECT '"&col("a_num")&"' as a_num, '"&col("a_bbsname")&"' as a_bbsname, b_num, b_type, b_id, b_name, b_pwd, b_subject, b_email, b_jumin, b_phone1, b_phone2, b_phone3, b_cate, b_catename, b_noticechk, b_content, b_ip, b_count, b_look, b_open, b_ref, b_step, b_level, b_regdate, b_chuchun, b_sbjclr, b_sdate, b_edate, b_temp1, b_temp2, b_temp3, b_temp4, b_temp5, b_temp6, b_temp7, b_file1, b_file2, b_file3, b_file4, b_file5,b_c_count FROM "&col("a_tablename")&" " i=i+1 col.movenext Loop if sql <>"" Then Dbcon.execute sql End if End function function ViewCreateMember() ''기존 뷰테이블 삭제 qry = "DELETE FROM member_view" Dbcon.execute qry sql = "INSERT INTO member_view(" sql = sql & "lvlname, g_manager, m_num, m_id, m_pwd, m_name, m_lastdate, m_level, m_date" sql = sql & ")" sql = sql & "SELECT g_menuname AS lvlname, g_manager, m_num, m_id, m_pwd, m_name, m_lastdate, m_level, m_date FROM member as a INNER JOIN member_group as b ON a.m_level = b.g_num" Dbcon.execute sql End Function function ViewCreateMenuChk() ''기존 뷰테이블 삭제 qry = "DELETE FROM manager_menu_chk_view" Dbcon.execute qry sql = "INSERT INTO manager_menu_chk_view(" sql = sql & "g_num, ct_idx, ct_name, ct_chk, ct_depth, ct_codeno, ct_url, ct_code" sql = sql & ")" sql = sql & "SELECT a.g_num, b.ct_idx, b.ct_name, b.ct_chk, b.ct_depth, b.ct_codeno, b.ct_url, b.ct_code FROM manager_menu_access as a INNER JOIN manager_menu as b ON a.ct_idx = b.ct_idx" Dbcon.execute sql End function '************** Information **************************************** ' Program Title : 폴더검사후 없으면 생성 ' Company : ' Creator : 윤 종 우 2004. 05. 13 '********************************************************************* function Folderfilesize(strDir) Dim fso, ff Set fso = Server.CreateObject("Scripting.FileSystemObject") If fso.FileExists (strDir) Then Set ff = fso.GetFile(strDir) Folderfilesize = ff.size Set ff = nothing Else Folderfilesize = false End if Set fso = nothing End Function '************** Information **************************************** ' Program Title : 용량 자동 계산 ' Company : ' Creator : 윤 종 우 2009-08-12 '********************************************************************* function byteConvert(bytes) Dim s, e, i, ss, t s = array("B", "Kb", "MB", "GB", "TB", "PB") e = int(log(bytes)/log(1024)) For i=1 To e If i>1 Then ss = ss & "*" ss = ss & " 1024 " Next If ss<>"" Then execute("x = "&ss) End If t = bytes/x t = (int(t*100))/100&s(e) byteConvert = t End function '************** Information **************************************** ' Program Title : /디렉토리별 용량 자동계산 ' Company : ' Creator : 윤 종 우 2009-08-12 '********************************************************************* function get_dirsize(dir) Dim fso, ff Set fso = Server.CreateObject("Scripting.FileSystemObject") If fso.FolderExists (dir) Then Set ff = fso.GetFolder(dir) get_dirsize = ff.size Set ff = nothing Else get_dirsize = false End if Set fso = Nothing End function '************** Information **************************************** ' Program Title : 잔여일 자동계산 ' Company : ' Creator : 윤 종 우 2009-08-12 '********************************************************************* function get_ssday(sc_hdate1, sc_hdate2) get_ssday = DateDiff("d",sc_hdate1, sc_hdate2) End function '************** Information **************************************** ' Program Title : 관리자 페이지 좌측메뉴 ' Company : ' Creator : 윤 종 우 2009-08-04 '********************************************************************* function manager_leftmenu2(ct_ref, skin) Dim sql, sql2, Rs, Rs2 ''관리메뉴 부분(대메뉴) R_Fields_L = "ct_idx, ct_name, ct_codeno" sql = "SELECT "&R_Fields_L&" FROM manager_menu WHERE ct_chk='Y' AND ct_ref = "&ct_ref&" AND ct_depth = '2' order by ct_code ASC" Set Rs = Dbcon.execute(sql) Do While Not Rs.eof mct_idx = Rs("ct_idx") mct_name = Rs("ct_name") mct_codeno = Rs("ct_codeno") If get_menu_chk(mct_codeno, Session("ss_g_num")) <> 0 then %> <% End if Rs.movenext loop Set Rs = nothing End function '************** Information **************************************** ' Program Title : 사용메뉴가능여부 ' Company : ' Creator : 윤 종 우 2009-08-18 '********************************************************************* function get_menu_chk(mct_codeno,g_num) Dim sql, Rs sql = "select count(ct_idx) from manager_menu_chk_view where g_num = '"&g_num&"' and ct_codeno like '"&mct_codeno&"%'" Set Rs = Dbcon.execute(sql) mct_cnt = Rs(0) Set Rs = Nothing get_menu_chk = mct_cnt End Function '************** Information **************************************** ' Program Title : 사용메뉴가능여부 ' Company : ' Creator : 윤 종 우 2009-08-18 '********************************************************************* function get_menu2_url(mct_codeno, g_num) Dim sql, Rs If g_num = 1 then ''총관리자일경우 sql = "select top 1 ct_codeno from manager_menu where ct_depth = '2' AND ct_chk = 'Y' and ct_codeno like '"&mct_codeno&"%' order by ct_code ASC" else sql = "select top 1 ct_codeno from manager_menu_chk_view where g_num = '"&g_num&"' and ct_codeno like '"&mct_codeno&"%' order by ct_code ASC" End If Set Rs = Dbcon.execute(sql) If Not Rs.eof Then ct_codeno = rs("ct_codeno") Else ct_codeno = "#" End If Set Rs = nothing get_menu2_url = ct_codeno End Function '************** Information **************************************** ' Program Title : 사용메뉴가능여부 ' Company : ' Creator : 윤 종 우 2009-08-18 '********************************************************************* function get_menu3_url(mct_codeno, g_num) Dim sql, Rs If g_num = 1 then ''총관리자일경우 sql = "select top 1 ct_url from manager_menu where ct_depth = '3' and ct_codeno like '"&mct_codeno&"%' order by ct_code ASC" else sql = "select top 1 ct_url from manager_menu_chk_view where g_num = '"&g_num&"' and ct_codeno like '"&mct_codeno&"%' order by ct_code ASC" End if Set Rs = Dbcon.execute (sql) If Not Rs.eof Then ct_url = Rs("ct_url") Else ct_url = "#" End If Set Rs = Nothing get_menu3_url = ct_url End function '************** Information **************************************** ' Program Title : 에디터옵션 ' Company : ' Creator : 윤 종 우 2009-08-24 '********************************************************************* function editor_opt1() %> // Customize Link and FileUpload Dialog xq.ui_templates.basicLinkDialog= '
\n

link

\n
\n \n \n

URL을 입력해주세요.

\n \n \n
\n 취소\n 생성\n
\n
\n

\n
' xq.ui_templates.basicFileUploadDialog=''; xq.ui_templates.basicMultiFileUploadDialog= ''; xq.ui_templates.basicTableDialog= ''; <% End function '************** Information **************************************** ' Program Title : 페이지로딩 ' Company : ' Creator : 윤 종 우 2009-08-26 '********************************************************************* function loading_layer() %> <% End function '************** Information **************************************** ' Program Title : 썸네일 ' Company : ' Creator : 윤 종 우 2009-09-01 'function GD2_make_thumb($max_x,$max_y/*줄여줄 이미지의 가로세로 크기*/,$dst_name/*생성될 이미지파일이름*/,$src_file/*원본 파일이름*/) { '********************************************************************* sub GD2_make_thumb(width, height, pg_img, strDir, saveDir) ' ( 가로, 세로, 이미지파일명, 원본이미지 경로, 썸네일이미지 경로 ) Dim objImage Dim strOpenFileName '해당 원본 이미지 파일 Dim strSaveFileName '저장될 이미지 파일 strOpenFileName = strDir & pg_img strSaveFileName = saveDir & pg_img Set objImage = Server.CreateObject("Nanumi.ImagePlus") '466생성 objImage.OpenImageFile strOpenFileName objImage.OverWrite = True '저장시 파일이름이 같을 경우 덮어쓰기 가능, 기본값 False(덮어쓰기 불가능) objImage.ImageFormat = "JPG" '저장 이미지 포맷 설정, 기본값 JPG objImage.Quality = 75 'JPG압축률설정(1~100),JPG파일 저장시에만 적용됨, 기본값: 75 objImage.AllowEnlarge = False '확대가능여부(원본이미지보다 크게 할 경우 True), 기본값: False objImage.ChangeSize width, height '썸네일 이미지 생성시 너비,높이 objImage.SaveFile strSaveFileName 'objImage.Dispose Set objImage = Nothing end Sub '************** Information **************************************** ' Program Title : 게시판 명 ' Company : ' Creator : 윤 종 우 2009-09-11 '********************************************************************* function get_bbsname(a_num) Dim sql, Rs sql = "select a_bbsname from board_config where a_num = '"&a_num&"'" Set Rs = Dbcon.Execute (sql) a_bbsname = Rs("a_bbsname") Set Rs = nothing get_bbsname = a_bbsname End function '************** Information **************************************** ' Program Title : 게시판 테이블 명 ' Company : ' Creator : 윤 종 우 2009-09-11 '********************************************************************* function get_tablename(a_num) Dim sql, Rs sql = "select a_tablename from board_config where a_num = '"&a_num&"'" Set Rs = Dbcon.Execute (sql) a_tablename= Rs("a_tablename") Set Rs = Nothing get_tablename = a_tablename End function '************** Information **************************************** ' Program Title : 이북명 ' Company : ' Creator : 윤 종 우 2009-09-18 '********************************************************************* function get_ebsubject(eb_pk) Dim sql, Rs sql = "select eb_subject from ebook where eb_pk = '"&eb_pk&"'" Set Rs = Dbcon.Execute (sql) eb_subject = rs("eb_subject") Set Rs = nothing get_ebsubject = eb_subject End function '************** Information **************************************** ' Program Title : 설문조사명 ' Company : ' Creator : 윤 종 우 2009-09-22 '********************************************************************* function get_pollsubject(po_pk) Dim sql, Rs sql = "select po_subject from poll where po_pk = '"&po_pk&"'" Set Rs = Dbcon.Execute (sql) po_subject = rs("po_subject") Set Rs = Nothing get_pollsubject = po_subject End function '************** Information **************************************** ' Program Title : 수강인원 ' Company : ' Creator : 윤 종 우 2009-09-22 '********************************************************************* function get_edusat_reqeust_cnt(po_idx, es_temp) Dim sql, Rs sql = "select count(es_idx) as cnt from edusat_request where po_idx = '"&po_idx&"' AND es_temp='"&es_temp&"'" Set Rs = Dbcon.Execute (sql) cnt = rs(0) Set Rs = nothing get_edusat_reqeust_cnt = cnt End function '************** Information **************************************** ' Program Title : 수강인원 ' Company : ' Creator : 윤 종 우 2009-09-22 '********************************************************************* function get_edusat_cnt(po_idx, temp_str) Dim sql, Rs sql = "select "&temp_str&" from edusat where po_idx = '"&po_idx&"'" Set Rs = Dbcon.Execute (sql) rev = rs(0) Set Rs = nothing get_edusat_cnt = rev End function '************** Information **************************************** ' Program Title : 게시글 뽑아오기 ' Company : ' Creator : 윤 종 우 2009-10-15 '********************************************************************* function get_main_board(bbs_name, a_num, cnt) Dim sql, Rs, i sql = "select top "&cnt&" b_num, b_name, b_subject, b_regdate from "&bbs_name&" where b_open = 'Y'and b_look = 'Y' and b_type='N' order by b_regdate desc " Set Rs = Dbcon.Execute (sql) i=0 Do While Not Rs.eof b_num = Rs("b_num") b_name = Rs("b_name") b_subject = Rs("b_subject") b_regdate = Rs("b_regdate") b_subject = Rs("b_subject") b_subject_str = remove_tags(b_subject) b_subject_str = StringToHTML(b_subject_str, 36, false ) b_regdate = mid(Rs("b_regdate"),0,10) b_regdate2 = mid(Rs("b_regdate"),5,5) %>
  • <%=b_subject_str%><%=get_newimg(b_regdate, 1)%>[<%=str_replace("-", ".", b_regdate2)%>]
  • <% i=i+1 Rs.movenext Loop Set Rs = nothing End function '************** Information **************************************** ' Program Title : 전체방문자수 ' Company : ' Creator : 윤 종 우 2009-11-04 '********************************************************************* function countTotal2() Dim sql, Rs sql ="select count(vNum) as vCount from visit_counter" Set Rs = Dbcon.Execute (sql) countTotal = Rs(0) Set Rs = Nothing countTotal2 = countTotal End Function '************** Information **************************************** ' Program Title : 전체방문자수 ' Company : ' Creator : 윤 종 우 2009-11-04 '********************************************************************* function countToday2() Dim sql, Rs sql ="select count(vNum) as TCount from visit_counter where vYY = "&Year(now)&" and vMM = "&Month(now)&" and vDD = "&Day(now) Set Rs = Dbcon.Execute (sql) countToday = Rs(0) Set Rs = Nothing countToday2 = countToday End Function '************** Information **************************************** ' Program Title : 전체방문자수 ' Company : ' Creator : 윤 종 우 2009-11-04 '********************************************************************* function countYesterday2() Dim sql, Rs Dim Yesterday Yesterday = DateAdd("d",-1,now) sql ="select count(vNum) as YCount from visit_counter where vYY="&Year(yesterday)&" and vMM = "&month(yesterday)&" and vDD = "&day(yesterday) Set Rs = Dbcon.Execute (sql) countYesterday = Rs(0) Set Rs = Nothing countYesterday2 = countYesterday End Function '' 날짜 포맷 Function getDateFm(vDate, vKey) Dim y, m, d, h, mi, ss, pm if Not isDate(vDate) then getDateFm = False Exit Function End if pm = "오전" y = Year(vDate) m = Month(vDate) d = Day(vDate) h = Hour(vDate) mi = Minute(vDate) ss = Second(vDate) if len(m) = 1 then m = "0" & m if len(d) = 1 then d = "0" & d if h > 11 And (vKey = 1) then pm = "오후" if h > 12 then h = h Mod 12 end if if len(h) = 1 then h = "0" & h if len(mi) = 1 then mi = "0" & mi if len(ss) = 1 then ss = "0" & ss Select Case vKey Case 0 : getDateFm = y & "년 " & m & "월 " & d & "일" Case 1 : getDateFm = pm & "/" & h & "시/" & mi & "분" Case 3 : getDateFm = Y & "-"& m &"-"& d &" "& h & ":" & mi & ":" & ss Case 4 : getDateFm = Y & "-"& m &"-"& d Case 5 : getDateFm = Y & "."& m &"."& d Case 6 : getDateFm = Y & m End Select End Function '//페이지 이동 및 메세지 출력 sub goMessage_board(msg, prepage, ok, no, a_num) Dim querystring '//$msg = mb_convert_encoding($msg, "UTF-8", "EUC-KR"); querystring = "msg=" & server.urlencode(msg) querystring = querystring & "&prepage=" & server.urlencode(prepage) querystring = querystring & "&ok=" & server.urlencode(ok) querystring = querystring & "&no=" & server.urlencode(no) querystring = querystring & "&a_num=" & server.urlencode(a_num) response.redirect "/content/board/message.asp?" & querystring response.end End Sub '//페이지 이동 및 메세지 출력 sub goMessage_board2(msg, prepage, ok, no, a_num) Dim querystring '//$msg = mb_convert_encoding($msg, "UTF-8", "EUC-KR"); querystring = "msg=" & server.urlencode(msg) querystring = querystring & "&prepage=" & server.urlencode(prepage) querystring = querystring & "&ok=" & server.urlencode(ok) querystring = querystring & "&no=" & server.urlencode(no) querystring = querystring & "&a_num=" & server.urlencode(a_num) response.redirect "http://" & Replace(Request.ServerVariables("HTTP_HOST"),"real","www") & "/content/board/message.asp?" & querystring response.end End Sub '//페이지 이동 및 메세지 출력 sub goMessage_Login(msg, prepage, ok, no, a_num) Dim querystring '//$msg = mb_convert_encoding($msg, "UTF-8", "EUC-KR"); querystring = "msg=" & server.urlencode(msg) querystring = querystring & "&prepage=" & server.urlencode( "/content/06guide/12_01.asp?prepage=" & server.urlencode(prepage) ) querystring = querystring & "&ok=" & server.urlencode(ok) querystring = querystring & "&no=" & server.urlencode(no) querystring = querystring & "&a_num=" & server.urlencode(a_num) response.redirect "/content/board/message.asp?" & querystring response.end End Sub '//페이지 이동 및 메세지 출력 sub locationhref( prepage ) ' Dim querystring 'querystring .= "&prepage=" & server.urlencode( prepage ) response.redirect prepage response.end End sub '************** Information **************************************** ' Program Title : 관리자페이지 체크 ' Company : 나눔아이앤씨 ' Creator : 윤 종 우 2004. 05. 13 '********************************************************************* function no_cache() Response.Expires = -1 Response.Expiresabsolute = Now() - 1 Response.AddHeader "Pragma", "no_cache" Response.AddHeader "cache-control", "no-cache" Response.CacheControl = "no-cache" end Function '************** Information **************************************** ' Program Title : SMS 발송 '********************************************************************* function sendSms(tran_phone, msg, rtn_url, alert) %> sms발송 <% If alert <> "" then %> <% End if %>
    <% response.end End Function '************** Information **************************************** ' Program Title : 메일 발송 '********************************************************************* Function sendMail(from_add, to_add, cc, bcc, subject, body) Dim objMail Set objMail = Server.CreateObject ("CDO.Message") Set iConf = objMail.Configuration 'SendUsing 속성을 지정하기 위한 개체 생성 With iConf.Fields .item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 '1일 경우 로컬(SMTP), 2일 경우 외부(SMTP)로 메일전송 .item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ' 포트번호 .item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "local" ' 외부일 경우 ip,도메인명 .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\Inetpub\mailroot\Pickup" .Update End With '.To = sMailTo '받는 사람 이메일 주소 '.From = sMailFrom '보내는 사람 이메일 주소 '.Cc = sMailCc '참조 이메일 주소 '.Bcc = sMailBcc '숨은 참조 이메일 주소 '.Subject = sMailSubject '제목 objMail.From = from_add 'objMail.ReplyTo = "sp1000je@naver.com" objMail.cc = cc objMail.bcc = bcc objMail.Subject = subject objMail.HTMLBody = body objMail.to = to_add objMail.Send set objMail = nothing end Function '작업로그 저장 Sub managerJob(mj_id, mj_name, mj_job) Dim sql, mj_date, mj_ip mj_date = Date() & " " & Right("0" & hour(now), 2) & ":" & Right("0" & minute(now), 2) 'mj_ip = request.ServerVariables("REMOTE_ADDR") mj_ip = remoteIP() sql = "insert into manager_job_log(mj_id, mj_name, mj_job, mj_YY, mj_MM, mj_DD, mj_date, mj_ip)" sql = sql & "values('" & mj_id & "', '" & mj_name & "', '" & mj_job & "', '" & year(now) & "','" & month(now) & "','" & day(now) & "','" & mj_date & "', '" & mj_ip & "')" dbcon.execute sql End Sub '부서메뉴트리 Sub getBuseoMenuTree( start_bdm_ref ) Dim sql, tree_data, i, fields, count Dim bdm_idx, bdm_depth, bdm_ref, bdm_menuname, bdm_chk Dim style fields = "bdm_idx, bdm_depth, bdm_ref, bdm_menuname, bdm_chk" sql = "select " & fields & " from bd_menu_page where bdm_ref = '" & start_bdm_ref &"' order by bdm_code asc" Set rs = dbcon.execute( sql ) If rs.bof Or rs.eof Then tree_data = null Else tree_data = rs.getrows End if Set rs = Nothing If Not( isnull( tree_data ) ) then For i = 0 To Ubound(tree_data, 2) count = 0 bdm_idx = tree_data(0, i) bdm_depth = tree_data(1, i) bdm_ref = tree_data(2, i) bdm_menuname= tree_data(3, i) bdm_chk = tree_data(4, i) '하위 메뉴가 있는지 확인 sql = "select count(*) from bd_menu_page where bdm_ref = '" & bdm_idx & "'" Set rs = dbcon.execute( sql ) count = rs(0) Set rs = nothing If Trim(bdm_chk) = "N" Then bdm_menuname = bdm_menuname & "(중지)" If count = 0 Then If bdm_depth = 2 Then Response.write "" & vbcrlf else Response.write "" & vbcrlf End if Else Response.write "
    " & bdm_menuname & "" & vbcrlf Call getBuseoMenuTree( bdm_idx ) Response.write "
    " & vbcrlf End if next End if End sub '********************************************************************* ' 클린콜 쪽 함수 function get_name(m_id) if m_id <> "" then m_id = replace(m_id,",","") sql = "select m_name from member where m_id = '"&m_id&"'" set rs_view = DbCon.Execute(sql) if rs_view.eof then get_name = m_id else get_name = rs_view(0) end if Set rs_view = nothing end if end Function function res_true(idx,rq_idx,rr_wid) SQL="select rr_choice from research_result2 where idx="&idx&" and rq_idx="&rq_idx&" and rr_wid='"&rr_wid&"'" Set Rsx = Dbcon.Execute(SQL) If not Rsx.eof then res_true = Rsx(0) End if Set Rsx = Nothing end Function '********************************************************************* Function remoteIP() Dim clientIP ' 1. X-Forwarded-For 헤더 확인 (프록시 환경에서 가장 우선) clientIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If clientIP <> "" Then ' 여러 프록시를 거친 경우 쉼표로 구분되므로 첫 번째 IP 추출 If InStr(clientIP, ",") > 0 Then clientIP = Trim(Split(clientIP, ",")(0)) End If remoteIP = clientIP Exit Function End If ' 2. X-Real-IP 헤더 확인 (Nginx 등에서 사용) clientIP = Request.ServerVariables("HTTP_X_REAL_IP") If clientIP <> "" Then remoteIP = clientIP Exit Function End If ' 3. CF-Connecting-IP 헤더 확인 (Cloudflare 사용시) clientIP = Request.ServerVariables("HTTP_CF_CONNECTING_IP") If clientIP <> "" Then remoteIP = clientIP Exit Function End If ' 4. HTTP_CLIENT_IP 확인 clientIP = Request.ServerVariables("HTTP_CLIENT_IP") If clientIP <> "" Then remoteIP = clientIP Exit Function End If ' 5. 기본 REMOTE_ADDR 사용 clientIP = Request.ServerVariables("REMOTE_ADDR") remoteIP = clientIP End Function %>