Ok, i've used the AddField method now, but it isn't working, the images are still uploaded to the static Gallery folder when i have a subfolder selected from the dropdown menu. This is the code i have right now:
<!--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 - Basic Demo</title>
<script type="text/javascript" src="../iuembed.js"></script>
</head>
<body>
<p>
<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.
var iu = new ImageUploaderWriter("ImageUploader1", 770, 500);
//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "../ImageUploader5.cab";
iu.activeXControlVersion = "5,7,24,0";
//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletJarFileName = "ImageUploader5.jar";
iu.javaAppletCodeBase = "../";
iu.javaAppletCached = true;
iu.javaAppletVersion = "5.7.24.0";
iu.showNonemptyResponse = "off";
//Configure appearance.
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowRotate", "true");
iu.addParam("BackgroundColor", "#ccccff");
//Configure License Keys
iu.addParam("LicenseKey", "71050-4E10B-00000-026F4-59F7B;72050-4E10B-00000-03E16-7B80A");
//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "120");
iu.addParam("UploadThumbnail1Height", "120");
iu.addParam("UploadThumbnail1JpegQuality", "100");
//Configure URL files are uploaded to.
iu.addParam("Action", "upload.php?data1=Select_PhotoAlbum");
function fullPageupload()
{
getImageUploader("ImageUploader1").AddField("Select_PhotoAlbum", "<?php echo $album ?>");
}//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl", "gallery.php");
//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
iu.writeHtml();
//]]>
</script><br><br>
<?php
echo "Album: <select size='1' name='map'>";
$basedir = "../Gallery/"; // read the directory
$n_ext = array('');
if ($handle = @opendir($basedir))
{
$i = 1;
while (false !== ($file = @readdir($handle))) {
if (($file !== ".") and ($file !== "..")) {
$bestand = $basedir ."/". $file ;
$ext = pathinfo($bestand);
if($ext['extension'] == $exten)
{
$mappen[$file] = $file;
$i++;
}
}}
@closedir($handle);
}
sort($mappen);
foreach($mappen as $key => $album){
echo "<option value='select_PhotoAlbum'>". $album ."</option>";
}
echo "</select>";
?>
</body>
</html>
<!--END-->
Can some one help me to fix this?
Edited by user Tuesday, January 13, 2009 7:49:36 PM(UTC)
| Reason: Not specified