diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
commit | e44a7e37b6c7b5961adaffc62b9042b8d442938e (patch) | |
tree | 95b67c356e93163467db2451f2b8cce84ed5d582 /includes/js/dojox/widget/FileInput/ReceiveFile.php | |
parent | a62b9742ee5e28bcec6872d88f50f25b820914f6 (diff) | |
download | semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.bz2 |
New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/widget/FileInput/ReceiveFile.php')
-rw-r--r-- | includes/js/dojox/widget/FileInput/ReceiveFile.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/includes/js/dojox/widget/FileInput/ReceiveFile.php b/includes/js/dojox/widget/FileInput/ReceiveFile.php new file mode 100644 index 0000000..aca541f --- /dev/null +++ b/includes/js/dojox/widget/FileInput/ReceiveFile.php @@ -0,0 +1,37 @@ +<?php + +// THIS IS AN EXAMPLE +// you will obviously need to do more server side work than I am doing here to check and move your upload. +// API is up for discussion, jump on http://dojotoolkit.org/forums + +// JSON.php is available in dojo svn checkout +require("../../../dojo/tests/resources/JSON.php"); +$json = new Services_JSON(); + +// fake delay +sleep(3); +$name = empty($_REQUEST['name'])? "default" : $_REQUEST['name']; +if(is_array($_FILES)){ + $ar = array( + // lets just pass lots of stuff back and see what we find. + // the _FILES aren't coming through in IE6 (maybe 7) + 'status' => "success", + 'name' => $name, + 'request' => $_REQUEST, + 'postvars' => $_POST, + 'details' => $_FILES, + // and some static subarray just to see + 'foo' => array('foo'=>"bar") + ); + +}else{ + $ar = array( + 'status' => "failed", + 'details' => "" + ); +} + +// yeah, seems you have to wrap iframeIO stuff in textareas? +$foo = $json->encode($ar); +?> +<textarea><?php print $foo; ?></textarea> |