Hi derekml,
You can find all source code of the demo in the php uploader demo package.
Demo package download url: http://www.cutesoft.net/downloads/folders/52443/download.aspx
I also attached the manual start upload example code below.
- <?php require_once "phpuploader/include_phpuploader.php" ?>
- <?php session_start(); ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- Form - Start uploading manually
- </title>
-
- <script type="text/javascript">
- function doStart()
- {
- var uploadobj = document.getElementById('myuploader');
- if (uploadobj.getqueuecount() > 0)
- {
- uploadobj.startupload();
- }
- else
- {
- alert("Please browse files for upload");
- }
- }
- </script>
-
- </head>
- <body>
-
- <form id="form1" method="POST">
- <?php
- $uploader=new PhpUploader();
- $uploader->Name="myuploader";
- $uploader->InsertText="Select multiple files (Max 1000M)";
- $uploader->AllowedFileExtensions="*.jpg,*.png,*.gif,*.txt,*.zip,*.rar";
- $uploader->MultipleFilesUpload=true;
- $uploader->ManualStartUpload=true;
- $uploader->Render();
- ?>
- <br /><br /><br />
- <button id="submitbutton" onclick="doStart();return false;">Start Uploading Files</button>
-
- </form>
-
- <br/><br/><br/>
- <?php
- $fileguidlist=@$_POST["myuploader"];
- $item = @$_POST["text1"];
- if($fileguidlist)
- {
- $guidlist=explode("/",$fileguidlist);
-
- echo("<div style='font-family:Fixedsys;'>");
- echo("Uploaded ");
- echo(count($guidlist));
- echo(" files:");
- echo("</div>");
- echo("<hr/>");
-
- foreach($guidlist as $fileguid)
- {
- $mvcfile=$uploader->GetUploadedFile($fileguid);
- if($mvcfile)
- {
- echo("<div style='font-family:Fixedsys;border-bottom:dashed 1px gray;padding:6px;'>");
- echo("FileName: ");
- echo($item.$mvcfile->FileName);
- echo("<br/>FileSize: ");
- echo($mvcfile->FileSize." b");
-
-
- echo("</div>");
-
-
-
-
-
-
-
- }
- }
- }
- ?>
-
- </div>
- </body>
- </html>
Regards,
Ken