<%@LANGUAGE="VBSCRIPT"%> <% option explicit 'Upload Image Response.Expires = -1 Server.ScriptTimeout = 600 ' All communication must be in UTF-8, including the response back from the request Session.CodePage = 65001 %> <% Dim uploadsDirVar uploadsDirVar = "C:\Hosting\web\atexfun\upload" function OutputForm() %>
Name
Email Address
Phone
City
Photo 1 (JPEG images only)
Photo 2 (optional) (JPEG images only)
Comments
<% end function function SaveFiles Dim Upload, fileName, fileSize, ks, i, fileKey, FileUrl Set Upload = New FreeASPUpload Upload.Save(uploadsDirVar) ' If something fails inside the script, but the exception is handled If Err.Number<>0 then Exit function SaveFiles = "" FileUrl = "" ks = Upload.UploadedFiles.keys if (UBound(ks) <> -1) then SaveFiles = "Thanks for your submission!
You sent: " for each fileKey in Upload.UploadedFiles.keys SaveFiles = SaveFiles & Upload.UploadedFiles(fileKey).FileName & " " FileUrl = FileUrl & "" & Upload.UploadedFiles(fileKey).FileName & "
" next else SaveFiles = "No file selected for upload or the file name specified in the upload form does not correspond to a valid file in the system." end if 'send email dim body body = "Name: " & TRIM( Upload.Form("contactname")) & "
Email Address: " & TRIM( Upload.Form("email")) & "
Phone: " & TRIM( Upload.Form("phone")) & "
City: " & TRIM( Upload.Form("city")) & "
Photo: " & FileUrl & "
Comments: " & TRIM( Upload.Form("comments")) dim mailObj, cdoMessage, cdoConfig dim addrList set cdoMessage = Server.CreateObject("CDO.Message") set cdoConfig = Server.CreateObject("CDO.Configuration") cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" cdoConfig.Fields.Update set cdoMessage.Configuration = cdoConfig cdoMessage.From = "website@atexfun.com" cdoMessage.To = "csecard@atexfun.com" cdoMessage.Subject = "Gallery submission from " & TRIM( Upload.Form("contactname")) cdoMessage.HtmlBody = body cdoMessage.Send set cdoMessage = Nothing set cdoConfig = Nothing end function %> A-TEX Family Fun Center - Submit A Testimonial
Show Us Your Backyard Oasis!

Do you have an awesome backyard that you just have to show off?
Send us some photos of your oasis and we'll put it up on our Gallery page for the world to see.


<% if Request.ServerVariables("REQUEST_METHOD") <> "POST" then OutputForm() else OutputForm() response.write SaveFiles() response.write "

" end if %>