<%@  language="VBScript" %>
<%
Response.Expires = 60
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", "private"
Response.CacheControl = "no-cache"


'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.
Dim strGalleryPath
strGalleryPath = "../UploadedFiles/"
Dim strThumbnailsPath
strThumbnailsPath = strGalleryPath & "Thumbnails/"

Dim objDescriptions
Set objDescriptions = Server.CreateObject("Msxml2.DOMDocument")
objDescriptions.async = False
objDescriptions.load(Server.MapPath(strGalleryPath & "files.xml"))

Function EncodeFileName(value)
	EncodeFileName = Replace(Server.UrlEncode(value), "+", "%20")
End Function
%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Aurigma Image Uploader Flash 7 Demo Applications&nbsp;&mdash;&nbsp;Image Uploader
		Flash&nbsp;&mdash;&nbsp;Basic demo&nbsp;&mdash;&nbsp;Uploaded files </title>
	<link href="../Styles/style.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="../Libraries/fancybox/jquery.fancybox-1.3.1.css" />
	<script type="text/javascript" src="../Libraries/jquery/jquery-1.4.3.min.js"></script>
	<script src="../Libraries/fancybox/jquery.fancybox-1.3.1.pack.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
			$('a.fancybox').filter(function () {
				return /(\.|%2E)(jpg|gif|png)$/i.test($(this).attr('href'))
			}).fancybox({type: 'image'});
		});
	</script>
</head>
<body>
	<form id="form1" class="page">
	<div id="container">
		<div id="header">
			<div id="header-inner">
				<a class="logo" href="#" title="Aurigma">
					<img src="../Images/logo_dark.png" alt="Aurigma logo" /></a>
			</div>
		</div>
		<div id="center">
			<div class="aB">
				<div class="aB-B">
					<h1 class="header2">
						<a href="Default.asp">Basic demo</a><span class="delimiter">&nbsp;/&nbsp;</span>Uploaded
						files</h1>
					<div class="demo">
						<div class="inner">
							<div class="container">
								<div class="gallery">
									<ul class="gallery-image-list">
										<%
												Dim i
												For i = 0 To objDescriptions.documentElement.childNodes.length - 1
													Dim objXmlFile
													Set objXmlFile = objDescriptions.documentElement.childNodes(i)
													Dim name
													name = Server.HTMLEncode(objXmlFile.getAttribute("name"))
													Dim source
													source = strGalleryPath & EncodeFileName(objXmlFile.GetAttribute("source"))
													Dim thumbnail
													thumbnail = strThumbnailsPath & EncodeFileName(objXmlFile.getAttribute("thumbnail"))
										%>
										<li class="item"><a class="fancybox" target="_blank" rel="original" href="<%= source %>">
											<img class="preview" alt="<%= name %>" title="<%= name %>" src="<%= thumbnail %>" />
										</a></li>
										<%
												Next
										%>
									</ul>
								</div>
							</div>
						</div>
					</div>
					<ul class="tabs">
						<li class="selected"><span>Description </span></li>
					</ul>
					<div class="tab-containers">
						<div class="tab-container">
							<div class="tab-inner">
								<p>
									This demo application is quick start demo with minimum set of settings. The application
									demonstrates how to:
								</p>
								<ul>
									<li>Filter files in open file dialog.</li>
									<li>Restrict max file size.</li>
									<li>Upload the original file along with 120x120 thumbnail.</li>
									<li>Redirect to another page after successful upload.</li>
								</ul>
								<p>
									After the upload process completes Image Uploader Flash redirects you to a page
									containing links to the uploaded files.
								</p>
							</div>
						</div>
					</div>
				</div>
				<div class="aB-a">
					<div class="sidebar">
						<h2>
							<a href="#">Image Uploader Flash</a>
						</h2>
						<ul class="side-menu">
							<li class="selected"><a href="Default.asp">Basic demo</a>
								<div class="hint">
									This simple application is a quick start demo with minimum settings.
								</div>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div id="footer">
			&copy; 2011 Aurigma, Inc.</div>
	</div>
	</form>
</body>
</html>
