home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Examples / publish / admin / addcontent2.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.2 KB  |  32 lines

  1. <!--- This block of code prepares two lists (stored as Session variables);
  2.     the first stores the TypeID's of the optional content types we're going
  3.     to add, and the second stores the corresponding TypeName's. --->
  4.  
  5. <CFPARAM NAME="Form.OptContentTypes" DEFAULT="">
  6.  
  7. <CFIF Form.OptContentTypes NEQ "">
  8.     <CFQUERY DATASOURCE="CFexamples" NAME="GetOptContentTypes">
  9.     SELECT * FROM PubClassDefinitions, PubContentTypes 
  10.     WHERE PubClassDefinitions.TypeID = PubContentTypes.TypeID
  11.         AND PubClassDefinitions.ClassID = #Session.AddContent.ClassID#
  12.         AND Required = FALSE
  13.         AND PubContentTypes.TypeID IN (#Form.OptContentTypes#)
  14.     ORDER BY ClassItemID
  15.     </CFQUERY>
  16.     
  17.     <CFSET Session.AddContent.OptContentTypes = Form.OptContentTypes>
  18.     <CFSET Session.AddContent.OptContentTypeNames = ValueList(GetOptContentTypes.TypeName)>
  19.     <CFSET Session.AddContent.OptContentTypeFile = ValueList(GetOptContentTypes.TypeFile)>
  20. </CFIF>
  21.  
  22. <CFIF Session.AddContent.ReqContentTypes NEQ "">
  23.  
  24.     <CFLOCATION URL="addcontent.req.cfm?CurrPos=1" ADDTOKEN="NO">
  25.  
  26. <CFELSEIF Session.AddContent.OptContentTypes NEQ "">
  27.  
  28.     <CFLOCATION URL="addcontent.opt.cfm?CurrPos=1" ADDTOKEN="NO">
  29.  
  30. <CFELSE>
  31.     Nothing to do...
  32. </CFIF>