Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
newvisionjeff  
#1 Posted : Wednesday, August 8, 2007 11:11:58 AM(UTC)
newvisionjeff

Rank: Advanced Member

Groups: Member
Joined: 4/19/2006(UTC)
Posts: 42

My site at http://www.newvisioncolo...om_wrapper&Itemid=36

is configured to create folders dynamically in upload.php

upload.php

Code:
<?php
//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.
//$author = $HTTP_POST_VARS ['Author'];
//$galleryPath = realpath("Gallery");
//mkdir($galleryPath . "/$author/", 0700);
//$galleryPath = realpath("Gallery" . "/" . $author);
//include("../uploader/gallery.php");


//$absGalleryPath = realpath($galleryPath) . "$author/";
//$absThumbnailsPath = realpath($galleryPath . "Thumbnails/") . "/";

$author = $_POST ['Author'];
$galleryPath = realpath("Gallery");
$Thumbnail= 'Thumbnail';
//include("../uploader/gallery.php");

mkdir($galleryPath . "/". $author , 0700);
$absGalleryPath = realpath("Gallery" . "/" . $author). "/";
//mkdir($absGalleryPath . "/". $Thumbnail , 0700);
//$absThumbnailsPath = realpath("$absGalleryPath" . "/" . "Thumbnail") . "/";



I also would like to know how to send my form results to a specified email address.

Any samples or pointers from anyone?


index.php

Code:
<!--BEGIN-->
<!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</title>

	<script src="../iuembed.js" type="text/javascript"></script>
	<script src="../../SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
	<script src="../../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
	<script src="../../SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>

	
    <link rel="stylesheet" type="text/css" href="../Watermark/style.css">

	<script type="text/javascript">
//<![CDATA[
function ImageUploader_BeforeUpload(){
	//Use author name as a watermark. To do it, initialize the watermark string of Thumbnail1.
	//
	//NOTE: The quote character (') in watermark text should be replaced by doubled quote character (''). 
	//Otherwise Image Uploader will not be able to parse the watermark string. 
	getImageUploader("ImageUploader1").setUploadThumbnail1Watermark("opacity=100;size=30;text='" + 
		document.getElementById("Author").value.split("'").join("''") + "'");
}
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText){
if (Status=="COMPLETE")
{
//Redirect to the gallery page with the value of Author field as a parameter
window.location = 'gallery.php?author=' + document.getElementById('Author').value; 
}



iu.addEventListener("Progress", "ImageUploader_Progress");

//]]>
	</script>

    <link href="../../SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
<!--
.style1 {font-size: 1.2em}
-->
    </style>
    <link href="../../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <link href="../../SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
<!--
.style3 {color: #990000}
-->
    </style>
</head>
<body>
	<p>&nbsp;</p>
<fieldset>
<legend><span class="style3">Please Read First!</span></legend>
<p>This demo application is still in testing stage and only works with Internet Explorer for Windows PCs.<br />
You can proceed with your upload but please follow the following rules...</p>
</fieldset>
<ol class="style3">
  <li>
    <fieldset>
    <strong>    Please put your Studio Name and your job number in the field below. If you do not we will not print your job.    </strong>
    </fieldset>
  </li>
  <li>
    <fieldset>
    <strong>    Select your Proof Size and Border Style. By DEFAULT we print Full-Bleed (edge to edge)    </strong>
    </fieldset>
  </li>
</ol>
<fieldset>
<p>Please call us if you feel you need help! (732)356-4490</p>
</fieldset>
<form id="Form1" name="Form1" action="../Watermark">
		Enter Your Order Name:
		  <span id="sprytextfield1">
          <input type="text" name="Author" id="Author" size="40" />
  <span class="textfieldRequiredMsg">A value is required.</span>  </span>  <br />
	      <br />
	      <label><span id="spryselect1">Choose Proof Size
          <select name="proof_size" id="proof_size">
            <option selected="selected">-Select Proof Size-</option>
            <option value="3.5x5">3.5x5</option>
            <option value="4x5">4x5</option>
            <option value="4x6">4x6</option>
            <option value="5x5">5x5</option>
          </select>
          <span class="selectInvalidMsg">Please select a valid item.</span>          <br />
          <br />
          <span class="selectRequiredMsg">Please select an item.</span></span></label>
  <span id="spryselect2">
	      <label>Choose Border Style
          <select name="border_style" id="border_style">
            <option>-Select Border-</option>
            <option value="Full Bleed">Full Bleed</option>
            <option value="A">A</option>
            <option value="B">B</option>
            <option value="C">C</option>
            <option value="D">D</option>
          </select>
          </label>
<span class="selectInvalidMsg">Please select a valid item.</span>  <br />
          <br />
  <span class="selectRequiredMsg">Please select an item.</span></span>
	      <div id="CollapsiblePanel1" class="CollapsiblePanel">
            <div class="CollapsiblePanelTab style1" tabindex="0">Proof Style Samples (Click to Open or Close)</div>
<div class="CollapsiblePanelContent">
  <p class="CollapsiblePanelTab">&nbsp;</p>
  <p class="CollapsiblePanelTab"><img src="../Untitled-1.png" alt="samples" width="648" height="257" /></p>
</div>
  </div>
</form>

<br />
		<br />

    	<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.
var iu = new ImageUploaderWriter("ImageUploader1", 650, 500);

//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "../ImageUploader4.cab";
iu.activeXControlVersion = "4,5,4,0";

//For Java applet only path to directory with JAR files should be specified (without file name).
//iu.javaAppletCodeBase = "../";
//iu.javaAppletCached = true;
//iu.javaAppletVersion = "2.5.4.0";

iu.showNonemptyResponse = "off";

//Configure appearance and behaviour.
iu.addParam("PaneLayout", "OnePane");
iu.addParam("FolderView", "Details");
iu.addParam("UploadView", "Details");
iu.addParam("FolderPaneHeight", "220");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("EnableRotate", "false");
iu.addParam("ShowDescriptions", "false");
iu.addParam("ShowUploadListButtons", "true");
iu.addParam("BackgroundColor", "#ffffff");
iu.addParam("LicenseKey", "5982-6335-7358-6463;6384-6750-7704-8144");

//Configure upload settings.
iu.addParam("TimeOut", "3600000"); // This equals 1 hour
iu.addParam("FilesPerOnePackageCount", "1");
iu.addParam("AutoRecoverMaxTriesCount", "5");
iu.addParam("AutoRecoverTimeOut", "10000");
iu.addParam("MaxConnectionCount", "5");

//Configure Image Uploader to rotate photos automatically 
//according to the orientation stored in EXIF metadata.
iu.addParam("AllowAutoRotate", "true");

//Append the form with total file size to the upload.
iu.addParam("AdditionalFormName", "Form1");

//Configure file mask to upload JPEG images only.
iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.tif;*.tiff");


//Set image size restrictions.
iu.addParam("MinImageWidth", "1000");
iu.addParam("MinImageHeight", "1000");

//Exclude the source file from upload because only 
//resized versions of the photo will be sent.
iu.addParam("UploadSourceFile", "false");

//Configure settings of the optimized image. Optimized image
//is resized to 1200x1200 with JPEG quality = 100 and EXIF 
//metadata is preserved.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "1100");
iu.addParam("UploadThumbnail1Height", "1100");
iu.addParam("UploadThumbnail1JpegQuality", "100");
iu.addParam("UploadThumbnail1CopyExif", "true");

//Configure thumbnail settings.
iu.addParam("UploadThumbnail2FitMode", "Fit");
iu.addParam("UploadThumbnail2Width", "120");
iu.addParam("UploadThumbnail2Height", "120");
iu.addParam("UploadThumbnail2JpegQuality", "60");

//Configure URL files are uploaded to.
iu.addParam("Action", "upload.php");

//Configure URL where to redirect after upload.
//iu.addParam("RedirectUrl", "gallery.php");
//iu.addParam("RedirectUrl","gallery.php?author");


//Add event handler.
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");


//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
iu.writeHtml();
//]]>
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["change"], hint:"Enter your order name"});
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {validateOn:["blur", "change"], invalidValue:"-1"});
var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {validateOn:["change", "blur"], invalidValue:"-1"});
</script>
</body>
</html>
<!--END-->

Edited by user Monday, December 17, 2007 7:24:44 PM(UTC)  | Reason: Not specified

Jeff MacDougall
New Vision Color Lab
www.newvisioncolorlab.com
www.modebook.com
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.