<% '----------------------------------------------------------- '-- TITLE: EDIT FUNCTIONS '-- AUTHOR: MALCOLM ELSWORTH [malcolm@electricputty.co.uk] '-- LAST MODIFIED: 29-04-06 '-- (C) ELECTRIC PUTTY LIMITED '----------------------------------------------------------- '----------------------------------------------------------- '-- FUNCTION TO WRITE ia INFORMATION FORM '----------------------------------------------------------- function writeEditorTabs() '-- Page Status tab if pageObj.p_type = "Page" then if editType = "status" then response.write("

Page status

") else response.write("

Page status

") end if end if '-- Page info tab if editType = "ia" then response.write("

" & pageObj.p_type & " settings

") else response.write("

" & pageObj.p_type & " settings

") end if if pageObj.p_type = "Template" then thisAlt = "Template structure" else thisAlt = "Page content" end if if editType = "content" then response.write("

" & thisAlt & "

") else '-- Only pages in draft mode get the content tab if pageObj.p_status = 1 or pageObj.p_status = 4 then response.write("

" & thisAlt & "

") end if end if if pageObj.p_type = "Page" then if editType = "meta" then response.write("

Meta data

") else response.write("

Meta data

") end if end if response.write("

 

" & VbCrLf) end function '----------------------------------------------------------- '-- FUNCTION AND SUB ROUTINES TO WRITE PAGE STATUS SCREEN '----------------------------------------------------------- dim thisStatusAction function writeStatusInformation() if len(errorMsg) > 0 then response.write("

" & errorMsg & "

") elseif len(confirmMsg) > 0 then response.write("

" & confirmMsg & "

") else response.write("

 

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

Page status:

" & returnStatusName(pageObj.p_status) & "

" & VbCrLf) response.write("

 

" & VbCrLf) select case pageObj.p_status 'If this page is a draft case 1 writeSubmissionForm() '-- If this page is pending approval case 2 writeApprovalForm() '-- If this page is live case 3 response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) '-- If you have publishing right then you also have archiving rights if this_page_permissions(4) = 1 then response.write("" & VbCrLf) end if response.write("" & VbCrLf) response.write("

 

" & VbCrLf) '-- If this page is live with a newer version in draft case 4 writeSubmissionForm() '-- If this page is live with a newer version pending approval case 5 writeApprovalForm() case 6 '-- If you have publishing right then you can also bring a page back from archive if this_page_permissions(4) = 1 then response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

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

 

" & VbCrLf) response.write("
" & VbCrLf) end function sub writeSubmissionForm() if pageObj.p_status = 1 then thisStatusAction = "submitForApproval" else thisStatusAction = "submitNewForApproval" end if '-- If you don't have publishing right you can submit for approval if this_page_permissions(4) = 0 then response.write("
" & VbCrLf) response.write("

Notes to editor:

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

 

" & VbCrLf) response.write("
" & VbCrLf) response.write("" & VbCrLf) response.write("
" & VbCrLf) response.write("" & VbCrLf) if thisStatusAction = "submitNewForApproval" then response.write("" & VbCrLf) end if response.write("" & VbCrLf) response.write("
") response.write("
" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("
") response.write("

 

" & VbCrLf) else writeApprovalForm() end if end sub sub writeApprovalForm() if pageObj.p_status = 2 or pageObj.p_status = 1 then thisStatusAction = "publish" else thisStatusAction = "publishNew" end if if this_page_permissions(4) = 1 then response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) if pageObj.p_status > 3 then response.write("" & VbCrLf) end if if pageObj.p_status = 2 or pageObj.p_status = 5 then response.write("" & VbCrLf) end if response.write("" & VbCrLf) response.write("

 

" & VbCrLf) end if end sub '----------------------------------------------------------- '-- FUNCTION TO WRITE ia INFORMATION FORM '----------------------------------------------------------- function writeIAInformation() if len(errorMsg) > 0 then response.write("

" & errorMsg & "

") elseif 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) '----------------------------------------------------------- '-- DOCUMENT TITLE '----------------------------------------------------------- response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) '----------------------------------------------------------- '-- SHOW ON NAV '-- '-- You can only change the show on nav value of a template '----------------------------------------------------------- if pageObj.p_type = "Template" or session("securitylevel") > 3 then response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) else response.write("" & VbCrLf) end if '----------------------------------------------------------- '-- SELECT PAGE LAYOUT (VISUAL TEMPLATE) '----------------------------------------------------------- if pageObj.p_type = "Template" or session("securitylevel") >= 3 then response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) else response.write("" & VbCrLf) end if '----------------------------------------------------------- '-- SELECT PARENT '-- '-- You can only move a page in English mode '----------------------------------------------------------- if session("languageID") = 1 AND this_page_permissions(3) = 1 AND pageObj.p_type = "Page" then response.write("
" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("") response.write("" & VbCrLf) response.write("

 

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

 

" & VbCrLf) response.write("
" & VbCrLf) end function '----------------------------------------------------------- '-- FUNCTION TO WRITE CONTENT INFORMATION PAGE '----------------------------------------------------------- function writeContentInformation() response.write("
") 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) 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) end function '----------------------------------------------------------- '-- FUNCTION TO WRITE META INFORMATION PAGE '----------------------------------------------------------- function writeMetaInformation() Dim thisDocID Dim metaDescription Dim metaKeyWords if len(errorMsg) > 0 then response.write("

" & errorMsg & "

") elseif len(confirmMsg) > 0 then response.write("

" & confirmMsg & "

") else response.write("

 

") end if response.write("
" & VbCrLf) response.write("") 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) response.write("" & VbCrLf) response.write("

 

" & VbCrLf) response.write("

 

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

 

" & VbCrLf) response.write("
" & VbCrLf) response.write("" & VbCrLf) end function %>