<% '-- Version 1.2 '-- Modified 10-08-06 '-- Link form amended dim thisYear dim thisMonth dim thisDay dim dateCounter function writeContentForms(cArray) if isArray(cArray) then if ubound(cArray) > 0 then if len(confirmMsg) > 0 then response.write("

" & confirmMsg & "

") else response.write("

 

") end if response.write(VbCrLf) response.write("
" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) response.write("

 

" & VbCrLf) response.write("
" & VbCrLf) for i=0 to ubound(cArray) select case cArray(i,0) case 1 call writeHeadingForm(i,cArray(i,1),cArray(i,2),cArray(i,3),cArray(i,4),cArray(i,5),cArray(i,6)) case 2 call writeImageForm(i,cArray(i,1),cArray(i,2),cArray(i,3),cArray(i,4),cArray(i,5),cArray(i,6),cArray(i,7),cArray(i,8)) case 3 call writeTextForm(i,cArray(i,1),cArray(i,2),cArray(i,3),cArray(i,4)) case 4 call writeLinkForm(i,cArray(i,1),cArray(i,2),cArray(i,3),cArray(i,4),cArray(i,5)) case 5 call writeFileForm(i,cArray(i,1),cArray(i,2),cArray(i,3),cArray(i,4),cArray(i,5)) case 6 call writeDateForm(i,cArray(i,1),cArray(i,2),cArray(i,3),cArray(i,9),cArray(i,10)) case 7 call WritePluginForm(i,cArray(i,1),cArray(i,2),cArray(i,3),cArray(i,4),cArray(i,5),cArray(i,6)) case 8 call writeHRForm(i,cArray(i,1),cArray(i,2),cArray(i,3)) case 9 call writeAnchorListForm(i,cArray(i,1),cArray(i,2),cArray(i,3)) case 10 call writeDLForm(i,cArray(i,1),cArray(i,2),cArray(i,3),cArray(i,4),cArray(i,5),cArray(i,6)) end select next response.write("
" & VbCrLf) response.write("" & VbCrLf) if session("securitylevel") > 3 then response.write("" & VbCrLf) end if response.write("" & VbCrLf) response.write("

 

" & VbCrLf) response.write("
" & VbCrLf) end if end if end function function writeHeadingForm(arrayPos,content_id,content_sortorder,content_label,heading_text,heading_size,heading_anchor) response.write("
" & VbCrLf) call writeLabel(1,content_id,content_label) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) call writeContentControls(arrayPos,content_id,content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function writeHeadingSizeSelect(HeadingSize) for i = 2 to 6 response.write("" & VbCrLf) next end function function writeImageForm(arrayPos,content_id,content_sortorder,content_label,Image_id,Image_content_name,Image_Align,Image_Width,Image_Height) response.write("
" & VbCrLf) call writeLabel(2,content_id,content_label) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("
" & VbCrLf) if len(Image_id) > 0 then response.write("

") end if response.write("" & VbCrLf) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) call writeContentControls(arrayPos,content_id,content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function writeTextForm(arrayPos,content_id,content_sortorder,content_label,text_copy) response.write("
" & VbCrLf) call writeLabel(3,content_id,content_label) if len(text_copy) > 0 then '-- Reinstate all internal links text_copy = replace(text_copy,"href=""||INTERNAL||","href=""" & websiteURL) text_copy = replace(text_copy,vbCrLf,"") text_copy = replace(text_copy,"""","'") text_copy = replace(text_copy,"'","\'") text_copy = replace(text_copy,"/","\/") end if response.write(" " & VbCrLf) response.write(" " & VbCrLf) response.write(" " & VbCrLf) call writeContentControls(arrayPos,content_id,content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function writeLinkForm(arrayPos,content_id,content_sortorder,content_label,link_id,link_content_name) response.write("
" & VbCrLf) call writeLabel(4,content_id,content_label) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) call writeContentControls(arrayPos,content_id,content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function writeFileForm(arrayPos,content_id,content_sortorder,content_label,file_id,file_content_name) response.write("
" & VbCrLf) call writeLabel(5,content_id,content_label) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) call writeContentControls(arrayPos,content_id,content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function writeDateForm(arrayPos,content_id,content_sortorder,content_label,dateRange_start,dateRange_end) response.write("
" & VbCrLf) call writeLabel(6,content_id,content_label) response.write("" & VbCrLf) if len(dateRange_start) > 0 then thisYear = year(dateRange_start) thisMonth = month(dateRange_start) thisDay = day(dateRange_start) else thisYear = year(Date) thisMonth = month(Date) thisDay = day(Date) end if call writeDateDropdowns("startDay",content_id,thisDay,1,32,"endDay") call writeDateDropdowns("startMonth",content_id,thisMonth,1,13,"endMonth") call writeDateDropdowns("startYear",content_id,thisyear,2000,2021,"endYear") response.write("

 

" & VbCrLf) response.write("" & VbCrLf) if len(dateRange_end) > 0 then thisYear = year(dateRange_end) thisMonth = month(dateRange_end) thisDay = day(dateRange_end) else thisYear = year(Date) thisMonth = month(Date) thisDay = day(Date) end if call writeDateDropdowns("endDay",content_id,thisDay,1,32,"") call writeDateDropdowns("endMonth",content_id,thisMonth,1,13,"") call writeDateDropdowns("endYear",content_id,thisyear,2000,2021,"") call writeContentControls(arrayPos,content_id,content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function WritePluginForm(arrayPos,content_id,content_sortorder,content_label,plugin_id,plugin_content_name,plugin_instance_id) response.write("
" & VbCrLf) call writeLabel(7,content_id,content_label) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) call writeContentControls(arrayPos,content_id,content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function writeHRForm(arrayPos,content_id,content_sortorder,content_label) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf) call writeLabel(8,content_id,content_label) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) call writeContentControls(arrayPos,content_id,content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function writeAnchorListForm(arrayPos,content_id,content_sortorder,content_label) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf) call writeLabel(9,content_id,content_label) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) call writeContentControls(arrayPos,content_id,content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function writeDLForm(arrayPos,content_id,content_sortorder,content_label,dt_text,dd_text,fix_dt) '-- If there is no value, make it an empty string if len(dd_text) < 1 then dd_text = "" end if response.write("
" & VbCrLf) call writeLabel(10,content_id,content_label) '-- If this is a 'Page' hide the fix_dt value if pageObj.p_type = "Page" then response.write("" & VbCrLf) end if response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) '-- If this is a 'Template' display fix_dt as a checkbox if pageObj.p_type = "Template" then response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) end if 'if len(dd_text) > 0 then ' dd_text = replace(dd_text,"href=""||INTERNAL||","href=""" & websiteURL) ' dd_text = replace(dd_text,vbCrLf,"") ' dd_text = replace(dd_text,"""","'") ' dd_text = replace(dd_text,"'","\'") ' dd_text = replace(dd_text,"/","\/") 'end if response.write("" & VbCrLf) 'response.write(" " & VbCrLf) 'response.write(" " & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) call writeContentControls(arrayPos, content_id, content_sortorder) response.write("
" & VbCrLf) response.write("

 

" & VbCrLf & VbCrLf) end function function writeLabel(content_type,content_id,content_label) dim fieldName select case content_type case 1 fieldName = "headingLabel" & content_id case 2 fieldName = "imageLabel" & content_id case 3 fieldName = "textLabel" & content_id case 4 fieldName = "linkLabel" & content_id case 5 fieldName = "fileLabel" & content_id case 6 fieldName = "dateLabel" & content_id case 7 fieldName = "pluginLabel" & content_id case 8 fieldName = "HRLabel" & content_id case 9 fieldName = "AnchorList" & content_id case 10 fieldName = "DLLabel" & content_id end select if pageObj.p_type = "Page" then if len(content_label) > 0 then response.write("

" & content_label & "

") end if response.write("" & VbCrLf) else response.write("
" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) response.write("
" & VbCrLf) end if end function function writeDateDropdowns(datePart,content_ID,thisValue,startValue,maxValue,syncWith) dateCounter = startValue response.write("" & VbCrLf) end function function writeContentControls(arrayPos, content_id, content_sortorder) response.write("

") response.write("" & VbCrLf) if not content_sortorder = 1 then response.write("") end if if content_sortorder < pageObj.p_content_holder_count then response.write("") end if response.write("") response.write("" & VbCrLf) response.write("

" & VbCrLf) response.write("

 

" & VbCrLf) end function function returnValuesAsQuerystring(node,arrayPos) dim tmpString arrayPos = cint(arrayPos) 'response.write ("arrayPos: " & arrayPos & "
") 'response.write ("node: " & node & "
") 'response.end tmpString = node & "typeid=" & pageObj.p_content_objects(arrayPos,0) tmpString = tmpString & "&" & node & "contentid=" & pageObj.p_content_objects(arrayPos,1) tmpString = tmpString & "&" & node & "sortorder=" & pageObj.p_content_objects(arrayPos,2) returnValuesAsQuerystring = tmpString end function function returnValuesAsJSValues(arrayPos) dim tmpString arrayPos = cint(arrayPos) tmpString = "'" & pageObj.p_content_objects(arrayPos,0) & "','" & pageObj.p_content_objects(arrayPos,1) & "','" & pageObj.p_content_objects(arrayPos,2) & "'" returnValuesAsJSValues = tmpString end function %>