Thanks. I reworked my implmentation to allow the form to work. The uploader is now on its own page....
Anyway, Now I have lost the print out for showing the upload status and completion via the ajax handler.
Any suggestions? Here is the code now (I am not showing the ajaz-mutiple file function because is conflicst)
- <html>
- <head>
-
- <link href="demo.css" rel="stylesheet" type="text/css" />
- </head>
-
- <body>
-
- <?php require_once "phpuploader/include_phpuploader.php" ?>
- <?php session_start(); ?>
-
- <h1>Selecting multiple files for upload</h1>
- <h2><p>You Can select multiple files and upload multiple files at once.</p>
- <h2><p align =center"><a href="mailto:post.admin@fellowshipchurch.com?Subject=Upload%20Support" style='color:white; size=15' col ><br>Email support.</a></p>
- <form id="form1" method="POST">
-
- <?php
- ob_start();
- include 'index.php';
- ob_end_clean();
- $dir=$_SESSION['phpuploader_dir'];
-
- $uploader=new PhpUploader();
- $uploader->MaxSizeKB=2150400;
- $uploader->Name="myuploader";
- $uploader->MultipleFilesUpload=true;
-
- if ($dir=="../../")
- {
- $uploader->InsertText="<br><br>CLICK TO UPLOAD FILE(S)<br>* Max 2 GB *<br><br>Goes to the 'Uploaded Files' Folder.<br><br>";
- $path="/FTP2/WebDisk/Uploaded_Files/test/";
- }
- else
- {
- $uploader->InsertText="<br><br>CLICK TO UPLOAD FILE(S)<br>* Max 2 GB *<br><br>Goes to the currently open Folder.<br><br>";
- $path=$dir;
- }
- $uploader->AllowedFileExtensions="*.jpg,*.png,*.gif,*.bmp,*psd,*.tiff,*.tga,*.ind,*.ils,*.eps,*.txt,*.ptf,*.zip,*.rar,*.mp3,*.wav,*.bwf,*.aif,*.m4a,*.omf,*.mov,*.m4v,*.mp4,*m4r,*,sd2,*.caf,*.alac,*.pdf";
- $uploader->Render();
-
- ?>
- </form>
- <?php
- $fileguidlist=@$_POST["myuploader"];
- if($fileguidlist)
- {
- $guidlist=explode("/",$fileguidlist);
- foreach($guidlist as $fileguid)
- {
-
-
- $mvcfile=$uploader->GetUploadedFile($fileguid);
- if($mvcfile)
- {
-
- $currentfilename=$mvcfile->FileName;
- $time=date('H:i:s').'_';
- if(file_exists($path.$currentfilename))
- {
-
- $mvcfile->CopyTo($path.$time.$currentfilename);
- }
- else
- {
- $mvcfile->CopyTo($path.$currentfilename);
- }
-
- }
- }
-
- }
- ?>
- <ol id="filelist" align="left">
- </ol>
-
-
-
-
- </div>