source:
sandbox/expressoUTF8/filemanager/inc/after_upload.php
@
3610
Revision 3610, 1.0 KB checked in by alexandrecorreia, 13 years ago (diff) |
---|
Line | |
---|---|
1 | <?php |
2 | session_id($_COOKIE['jupload']); |
3 | session_start(); |
4 | $files = $_SESSION['juvar.files']; |
5 | unset($_SESSION['juvar.files']); |
6 | session_write_close(); |
7 | |
8 | include_once("../../header.session.inc.php"); |
9 | |
10 | $GLOBALS['phpgw_info']['flags'] = array |
11 | ( |
12 | 'currentapp' => 'filemanager', |
13 | 'noheader' => True, |
14 | 'nonavbar' => True, |
15 | 'nofooter' => True, |
16 | 'noappheader' => True, |
17 | 'enable_browser_class' => True |
18 | ); |
19 | |
20 | |
21 | include_once("../../header.inc.php"); |
22 | |
23 | $bo = CreateObject('filemanager.bofilemanager'); |
24 | |
25 | foreach ($files as $f) { |
26 | if ($bo->vfs->cp(array( |
27 | 'from'=> $f['fullName'], |
28 | 'to'=> $f['name'], |
29 | 'relatives' => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) |
30 | ))) |
31 | { |
32 | $bo->vfs->set_attributes(array( |
33 | 'string'=> $f['name'], |
34 | 'relatives' => array(RELATIVE_ALL), |
35 | 'attributes'=> array( |
36 | 'mime_type' => $f['mimetype'] |
37 | ) |
38 | )); |
39 | exec("rm -f ".escapeshellcmd(escapeshellarg($f['fullName']))); |
40 | } |
41 | } |
42 | |
43 | echo "<script type='text/javascript' src='../js/after_upload.js'></script>"; |
44 | |
45 | ?> |
Note: See TracBrowser
for help on using the repository browser.