<!--- this example shows the basic functionality
of the CFCOLLECTION tag (create, repair, optimize,
delete). --->

<HTML>
<HEAD>
	<TITLE>CFCOLLECTION</TITLE>
</HEAD>

<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY  bgcolor="#FFFFD5">

<H3>CFCOLLECTION</h3>
<P>The is a read-only example. Because accessing a collection is
a sensitive area, consider the security of your collection
prior to allowing any form of access to it. </P>
<!--
<!--- Check for server platform --->
<!--- You may need to change this value. --->
<CFIF Server.OS.Name EQ "Windows NT">
  <CFSET collPath = "C:\CFUSION\Verity\Collections\">
<CFELSE>
  <CFSET collpath = "/opt/coldfusion/verity/collections/">
</CFIF>

<!--- see if a collection name has been
specified ... --->
<CFIF IsDefined("form.CollectionName") AND
IsDefined("form.CollectionAction")>

	<CFIF form.CollectionName is not "">
		<CFOUTPUT>
		<CFSWITCH EXPRESSION=#FORM.CollectionAction#>
		  <CFCASE VALUE="Create">
		    <CFCOLLECTION ACTION="CREATE"
		     COLLECTION="#FORM.CollectionName#"
		     PATH="#collPath#">
		    <H3>Collection created. Use CFINDEX to populate it.</H3>
		  </CFCASE>
		  <CFCASE VALUE="Repair">
		    <CFCOLLECTION ACTION="REPAIR"
		     COLLECTION="#FORM.CollectionName#">
		    <H3>Collection repaired.</H3>
		  </CFCASE>
		  <CFCASE VALUE="Optimize">
		    <CFCOLLECTION ACTION="OPTIMIZE"
		     COLLECTION="#FORM.CollectionName#">
		    <H3>Collection optimized.</H3>
		  </CFCASE>
		  <CFCASE VALUE="Delete">
		    <CFCOLLECTION ACTION="DELETE"
		     COLLECTION="#FORM.CollectionName#">
		   <H3>Collection deleted.</H3>
		  </CFCASE>
		</CFSWITCH>
		</CFOUTPUT>
	<CFELSE>
	<H3>Please enter a name for your collection</H3>	
	</CFIF>
</CFIF>

<!--- Make the form to specify the collection name
and action --->

<FORM ACTION="cfcollection.cfm" METHOD="POST">
<SELECT NAME="CollectionAction">
	<OPTION value="Create">Create this collection
	<OPTION value="Optimize">Optimize this collection
	<OPTION value="Repair">Repair this collection
	<OPTION value="Delete">Delete this collection
</SELECT>

<P>Collection upon which to act (snippets)
<BR><INPUT TYPE="Text" NAME="CollectionName" VALUE="snippets">

<INPUT TYPE="Submit" NAME="" VALUE="alter or create my collection">
</FORM>
 -->
</BODY>
</HTML>