home *** CD-ROM | disk | FTP | other *** search
- <!--- This block of code prepares two lists (stored as Session variables);
- the first stores the TypeID's of the optional content types we're going
- to add, and the second stores the corresponding TypeName's. --->
-
- <CFPARAM NAME="Form.OptContentTypes" DEFAULT="">
-
- <CFIF Form.OptContentTypes NEQ "">
- <CFQUERY DATASOURCE="CFexamples" NAME="GetOptContentTypes">
- SELECT * FROM PubClassDefinitions, PubContentTypes
- WHERE PubClassDefinitions.TypeID = PubContentTypes.TypeID
- AND PubClassDefinitions.ClassID = #Session.AddContent.ClassID#
- AND Required = FALSE
- AND PubContentTypes.TypeID IN (#Form.OptContentTypes#)
- ORDER BY ClassItemID
- </CFQUERY>
-
- <CFSET Session.AddContent.OptContentTypes = Form.OptContentTypes>
- <CFSET Session.AddContent.OptContentTypeNames = ValueList(GetOptContentTypes.TypeName)>
- <CFSET Session.AddContent.OptContentTypeFile = ValueList(GetOptContentTypes.TypeFile)>
- </CFIF>
-
- <CFIF Session.AddContent.ReqContentTypes NEQ "">
-
- <CFLOCATION URL="addcontent.req.cfm?CurrPos=1" ADDTOKEN="NO">
-
- <CFELSEIF Session.AddContent.OptContentTypes NEQ "">
-
- <CFLOCATION URL="addcontent.opt.cfm?CurrPos=1" ADDTOKEN="NO">
-
- <CFELSE>
- Nothing to do...
- </CFIF>