<!---This variable specifies relative path to the folder, where the gallery with uploaded files is located.
Do not forget about the slash in the end of the folder name.--->
<cfset galleryPath="../Gallery/" />

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Aurigma Image Uploader Demos &mdash; Concurrent Upload Demo &mdash; Uploaded Files</title>
	<link href="../common.css" type="text/css" rel="stylesheet" />
</head>
<body>
	<form>
		<h1><a href="../index.cfm">Aurigma Image Uploader Demos</a> &rarr; <a href="index.cfm">Concurrent Upload Demo</a> &rarr; Uploaded Files</h1>

		<cfset descriptions=XMLParse("#ExpandPath(galleryPath)#Descriptions.xml") />

		<cfset descriptionsQuery=QueryNew("name, width, height, handlerUrl") />

		<cfset fileCount=#ArrayLen(descriptions.files.file)# />

		<cfset temp=QueryAddRow(descriptionsQuery, #fileCount#) />

		<cfloop index="i" from="1" to=#fileCount# >
			<cfset temp=QuerySetCell(descriptionsQuery, "name", 
					#descriptions.files.file[i].XmlAttributes.name#, #i#) />
			<cfset temp=QuerySetCell(descriptionsQuery, "width", 
					#descriptions.files.file[i].XmlAttributes.width#, #i#) />
			<cfset temp=QuerySetCell(descriptionsQuery, "height", 
					#descriptions.files.file[i].XmlAttributes.height#, #i#) />
			<cfset temp=QuerySetCell(descriptionsQuery, "handlerUrl", 
					#descriptions.files.file[i].XmlAttributes.handlerUrl#, #i#) />											
		</cfloop>

		<cfset i=0 />

		<table width="100%">
			<cfloop query="descriptionsQuery">
				<cfif i MOD 2 is 0>
					<tr>
				</cfif>
				<td width="25%" align="left" valign="top">
					<cfoutput>
						<a href="#GalleryPath##name#" target="_blank">
							<img border="0" src="#GalleryPath#Thumbnails/#name#.jpg" title="#HTMLEditFormat(name)#" alt="#HTMLEditFormat(name)#" />
						</a>
						<br />
						<b>Name:</b>
						#HTMLEditFormat(name)#
						<br />
						<b>Dimensions:</b> 
						#HTMLEditFormat(width)# x #HTMLEditFormat(height)#
						<br />	
						<b>Handler URL:</b> 
						#HTMLEditFormat(handlerUrl)#
					</cfoutput>
				</td>
				<cfif (i MOD 2 is 1) or (i is fileCount - 1)>
					</tr>
				</cfif>
				<cfset i=i+1 />
			</cfloop>
		</table>
	</form>		
</body>
</html>