<% Timeout(1) Server.ScriptTimeout = 1000 set con = server.createobject("ADODB.Connection") con.open Application("CString") if Request.Form("Posted") = "Y" then i_OpenPage = "" if Request("PageID") = "NULL" then strSQL = "UPDATE CMS_Menu SET PageID = NULL, Frame = NULL WHERE MenuID = "& Request("id") con.execute(strSQL) elseif Request("PageID") = "URL" then s_Redirect = Request("Redirect") s_Frame = Request("Frame") if s_Frame = Empty then s_Frame = Replace(Request("Frame_New"), "'", "''") end if strSQL = "SELECT * FROM CMS_Page ORDER BY PageID" Set rsLink = Server.CreateObject("ADODB.Recordset") rsLink.Open strSQL, con, 1, 3 rsLink.AddNew rsLink("Hide") = 1 rsLink("Hits") = 0 rsLink("Heading") = "External Link" rsLink("UploadDate") = Date() rsLink("Redirect") = s_Redirect rsLink.Update rsLink.ReQuery rsLink.MoveLast i_PageID = rsLink("PageID") rsLink.Close() set rsLink = Nothing strSQL = "UPDATE CMS_Menu SET PageID = "& i_PageID &", Frame = '"& s_Frame &"' WHERE MenuID = "& Request("id") con.execute(strSQL) elseif Request("PageID") <> Empty and InStr(Request("PageID"), "_") > 0 then s_Frame = Request("Frame") if s_Frame = Empty then s_Frame = Replace(Request("Frame_New"), "'", "''") end if arr_Page = split(Request("PageID"), "_") strSQL = "UPDATE CMS_Menu SET PageID = "& arr_Page(0) &", Frame = '"& s_Frame &"' WHERE MenuID = "& Request("id") con.execute(strSQL) end if strSQL = "DELETE FROM CMS_Page WHERE Hide = 1 AND FileContent IS NULL AND PageID NOT IN (SELECT DISTINCT PageID FROM CMS_Menu WHERE PageID IS NOT NULL)" con.execute(strSQL) con.Close set con = Nothing %> <% Response.End end if %> Link <% if Request("id") <> Empty and IsNumeric(Request("id")) then strSQL = "SELECT MenuID, MenuName, MainMenuID, PageID, Frame FROM CMS_Menu WHERE MenuID = "& Request("id") set rsMenu = con.execute(strSQL) if not rsMenu.EOF then rsMenu.MoveFirst() i_MenuID = rsMenu("MenuID") s_MenuName = rsMenu("MenuName") i_MainMenuID = rsMenu("MainMenuID") i_MenuPageID = rsMenu("PageID") s_Frame = rsMenu("Frame") if IsNull(i_MenuPageID) then i_MenuPageID = 0 end if if IsNull(s_Frame) then s_Frame = "" end if %> ">
<%if IsNull(i_MainMenuID) then%> Link menu option (<%=s_MenuName%>) <%else%> Link menu option (<%=GetMenuLine(i_MainMenuID) &""& s_MenuName%>) <%end if%>

Select link to:

;">

Open in frame:

<% s_OtherFrame = "" s_Visibility = "hidden; display: none" if s_Frame <> "_self" and s_Frame <> "_top" and s_Frame <> "_parent" and s_Frame <> "_blank" and s_Frame <> "" and Left(s_Frame, 7) <> "mailto:" then s_OtherFrame = s_Frame s_Visibility = "visible" end if %>

Please specify:


<% end if set rsMenu = Nothing end if %>
<% con.Close() set con = Nothing %>