Last change
on this file since 31645 was
4875,
checked in by plg, 15 years ago
|
feature 1141 added: multiple select and progress bar with uploadify (jQuery
plugin).
Note: the HTML upload is disabled but I will provide a switch, either you use
Uploadify OR you use HTML multiple file boxes.
|
File size:
1.0 KB
|
Line | |
---|
1 | <?php |
---|
2 | define('PHPWG_ROOT_PATH','../../../'); |
---|
3 | define('IN_ADMIN', true); |
---|
4 | |
---|
5 | $_COOKIE['pwg_id'] = $_POST['session_id']; |
---|
6 | |
---|
7 | include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); |
---|
8 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
---|
9 | include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php'); |
---|
10 | |
---|
11 | define('UPLOAD_FORM_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/../'); |
---|
12 | include_once(UPLOAD_FORM_PATH.'include/functions_upload.inc.php'); |
---|
13 | |
---|
14 | check_pwg_token(); |
---|
15 | |
---|
16 | ob_start(); |
---|
17 | print_r($_FILES); |
---|
18 | print_r($_POST); |
---|
19 | print_r($user); |
---|
20 | $tmp = ob_get_contents(); |
---|
21 | ob_end_clean(); |
---|
22 | error_log($tmp, 3, "/tmp/php-".date('YmdHis').'-'.sprintf('%020u', rand()).".log"); |
---|
23 | |
---|
24 | $image_id = add_uploaded_file( |
---|
25 | $_FILES['Filedata']['tmp_name'], |
---|
26 | $_FILES['Filedata']['name'], |
---|
27 | null, |
---|
28 | 8 |
---|
29 | ); |
---|
30 | |
---|
31 | if (!isset($_SESSION['uploads'])) |
---|
32 | { |
---|
33 | $_SESSION['uploads'] = array(); |
---|
34 | } |
---|
35 | |
---|
36 | if (!isset($_SESSION['uploads'][ $_POST['upload_id'] ])) |
---|
37 | { |
---|
38 | $_SESSION['uploads'][ $_POST['upload_id'] ] = array(); |
---|
39 | } |
---|
40 | |
---|
41 | array_push( |
---|
42 | $_SESSION['uploads'][ $_POST['upload_id'] ], |
---|
43 | $image_id |
---|
44 | ); |
---|
45 | |
---|
46 | echo "1"; |
---|
47 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.