<% If Request.ServerVariables("REMOTE_ADDR") = "175.212.21.90" Then ' Response.write session("UserKey") End If %> <% Menu_menuKey = SqlFilter(ReqsGet("menuKey")) If Not IsNumeric(Menu_menuKey) Then Menu_menuKey = "" If Menu_menuKey = "" Then ' 방문자 카운트 처리 시작 If Trim(siteCode) <> "" Then IP = Request.ServerVariables("REMOTE_ADDR") REFERER = Request.ServerVariables("HTTP_REFERER") AGENT = Request.ServerVariables("HTTP_USER_AGENT") CountSQL = "SELECT count(*) AS count FROM VisitInfo WHERE DATEDIFF(dd, VDATE, GETDATE()) = 0 AND IP = '"&IP&"' AND SITECODE = '"&SITECODE&"'" Set countRs = SqlRecordset(DBconn, CountSQL) If countRs("count") = 0 Then CountSQL2 = "INSERT INTO VisitInfo (IP,REFERER,AGENT,SITECODE) VALUES('"&IP&"','"&REFERER&"','"&AGENT&"','"&SITECODE&"') " DBconn.execute(CountSQL2) If DBconn.Errors.Count = 0 Then CountSQL3 = "SELECT * FROM Visit_Count WHERE SITECODE = '"&SITECODE&"'" Set visitRs = SqlRecordset(DBconn, CountSQL3) If visitRs.recordcount = 0 Then CountSQL3 = "INSERT INTO Visit_Count (SITECODE,TODAY,TOTAL) VALUES('"&SITECODE&"',1,1)" DBconn.Execute(CountSQL3) End If visitRs.close Set visitRs = Nothing SQL3 = "SELECT count(*) AS count FROM Visit_Count WHERE DATEDIFF(dd, VDATE, GETDATE()) = 0 AND SITECODE = '"&SITECODE&"'" Set visitRs = SqlRecordset(DBconn, SQL3) If visitRs("count") = 0 Then CountSQL4 = "UPDATE Visit_Count SET TODAY=1, TOTAL=TOTAL+1, VDATE='"&Date()&"' WHERE SITECODE = '"&SITECODE&"'" Else CountSQL4 = "UPDATE Visit_Count SET TODAY=TODAY+1, TOTAL=TOTAL+1, VDATE='"&Date()&"' WHERE SITECODE='"&SITECODE&"'" End If DBconn.Execute(CountSQL4) visitRs.close Set visitRs = Nothing End If End If countRs.close Set countRs = Nothing End If ' 방문자 카운트 처리 끝 If siteCode = "gpoe" Then %> <% ElseIf siteCode = "mobile" Then %> <% End If Else MenuSQL = "SELECT * FROM [MenuInfo] WHERE [siteCode]='"&siteCode&"' AND [menuKey]="&Menu_menuKey&" AND [menuType]<>0" Set MenuData = SqlRecordset(DBconn, MenuSQL) If Not MenuData.eof Then Menu_menuName = MenuData("menuName") Menu_menuName2 = MenuData("menuName2") Menu_menuType = MenuData("menuType") ContentFileLink = localUrl&"contents/content"&Menu_menuKey&"_"&siteCode&".html" If siteCode = "mobile" Then ContentFileLink = localUrl&"contents/mobile/content"&Menu_menuKey&"_"&siteCode&".html" Menu_boardID = MenuData("boardID") Menu_linkUrl = MenuData("linkUrl") Menu_linkTarget = MenuData("linkTarget") Menu_incFile = MenuData("incFile") Menu_parentKey = MenuData("parentKey") Menu_viewType = MenuData("viewType") Menu_ratingUse = MenuData("ratingUse") Menu_manageInfo = MenuData("manageInfo") Menu_status = MenuData("status") If Menu_status = 2 And Not SuperAdmin() Then ResAlerts "접근이 불가능한 메뉴입니다", "", "/" End If Else nextKeyValue = "" Menu_menuKey = MenuNextKey(Menu_menuKey, siteCode) If Trim(Menu_menuKey) <> "" Then MenuSQL2 = "SELECT * FROM [MenuInfo] WHERE [siteCode]='"&siteCode&"' AND [menuKey]="&Menu_menuKey&" AND [menuType]<>0" Set MenuData2 = SqlRecordset(DBconn, MenuSQL2) If Not MenuData2.eof Then Menu_menuName = MenuData2("menuName") Menu_menuName2 = MenuData2("menuName2") Menu_menuType = MenuData2("menuType") ContentFileLink = localUrl&"contents/content"&Menu_menuKey&"_"&siteCode&".html" If siteCode = "mobile" Then ContentFileLink = localUrl&"contents/mobile/content"&Menu_menuKey&"_"&siteCode&".html" Menu_boardID = MenuData2("boardID") Menu_linkUrl = MenuData2("linkUrl") Menu_linkTarget = MenuData2("linkTarget") Menu_incFile = MenuData2("incFile") Menu_parentKey = MenuData2("parentKey") Menu_viewType = MenuData2("viewType") Menu_ratingUse = MenuData2("ratingUse") Menu_manageInfo = MenuData2("manageInfo") Menu_status = MenuData2("status") If Menu_status = 2 And Not SuperAdmin() Then ResAlerts "접근이 불가능한 메뉴입니다", "", "/" End If Else response.redirect "http://www.gpoe.kr" End If MenuData2.close Set MenuData2 = Nothing Else response.write "
메뉴설정이 올바르지 않습니다
" response.end End If End If '검색엔진 노출 체크 ( 민원게시판 제외 ) robotChk = True If Trim(Menu_boardID) <> "" And Not IsNull(Menu_boardID) Then BoardSQL2 = "SELECT [programType], [private], [readAuth] FROM [ProgramInfo] WHERE [programID]='"&Menu_boardID&"'" Set BoardData2 = SqlRecordset(DBconn, BoardSQL2) If Not BoardData2.eof Then If BoardData2("programType") = "minwon" Or BoardData2("private") Or InStr(BoardData2("readAuth"), "|N|") = 0 Then robotChk = False End If End If BoardData2.close Set BoardData2 = Nothing End If If Menu_boardID = "gpoe_94" Then robotChk = False Menu_ParentKeyList = GetParentKeyList(DBconn, siteCode, Menu_menuKey, "") If Trim(Menu_menuName2) <> "" Then Menu_TitleText = Menu_menuName2&" - "&GetSiteName(siteCode) Else Menu_TitleText = Menu_menuName&" - "&GetSiteName(siteCode) End If If Menu_menuType = 3 Then Select Case ReqsGet("bmode") Case "add" Menu_TitleText = Menu_menuName&" 글쓰기 - "&GetSiteName(siteCode) Case "view" Menu_TitleText = Menu_menuName&" 내용보기 - "&GetSiteName(siteCode) Case "modify" Menu_TitleText = Menu_menuName&" 수정하기 - "&GetSiteName(siteCode) Case Else : Menu_TitleText = Menu_menuName&" 목록 - "&GetSiteName(siteCode) End Select End If grad = SqlFilter(ReqsGet("grad")) If grad = "" Or Not IsNumeric(grad) Then grad = 0 gradArr = Array("유치원", "초등학교", "중학교", "고등학교") If Menu_menuKey = 7 Then Menu_TitleText = gradArr(grad)&" "&Menu_TitleText End If Navi_ParentKeyList = Menu_ParentKeyList MenuData.close Set MenuData = Nothing Menu_naviText = NavigationFunc(DBconn, siteCode, Navi_ParentKeyList) If Trim(Menu_ParentKeyList) <> "" Then sectionArr = Split(Menu_ParentKeyList,"|") topKey = sectionArr(UBound(sectionArr)-1) SectionSQL = "SELECT [sortNo],[menuName] FROM [MenuInfo] WHERE [siteCode]='"&siteCode&"' AND [menuKey]="&topKey Set SectionData = SqlRecordset(DBconn, SectionSQL) If Not SectionData.eof Then sectionKey = SectionData("sortNo") sectionTitle = SectionData("menuName") End If SectionData.close Set SectionData = Nothing End If If IsNumeric(Menu_menuKey) Then SQL = "INSERT INTO [MenuLog] ([siteCode], [menu], [menuName], [menuName2], [ip]) VALUES(N'"&siteCode&"', "&Menu_menuKey&", N'"&Menu_menuName&"', N'"&Menu_TitleText&"', N'"&Request.ServerVariables("REMOTE_ADDR")&"')" DBconn.Execute(SQL) End If If siteCode = "gpoe" Then %> <% ElseIf siteCode = "mobile" Then %> <% End If End If %>