Changeset 867
- Timestamp:
- Mar 31, 2015 3:11:14 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/www/deploy/20150304/application/modules/ajax/controllers/download.php
r865 r867 20 20 $treeArray = json_decode($data, TRUE); 21 21 22 23 echo "<pre>"; 24 print_r($treeArray); 25 echo "</pre>"; 26 die(); 22 foreach ($treeArray as $index=>$tree) 23 { 24 $treeArray[$index]['name']=$this->convert_vi_to_en($treeArray[$index]['name']); 25 $treeArray[$index]['fileurl']=$this->encodePath($treeArray[$index]['fileurl']); 26 foreach ($tree['childFiles'] as $index2=>$file) 27 { 28 $treeArray[$index]['childFiles'][$index2]['name']=$this->convert_vi_to_en($treeArray[$index]['childFiles'][$index2]['name']); 29 $treeArray[$index]['childFiles'][$index2]['fileurl']=$this->encodePath($treeArray[$index]['childFiles'][$index2]['fileurl']); 30 } 31 foreach ($tree['childDirs'] as $index2=>$file) 32 { 33 $treeArray[$index]['childDirs'][$index2]['name']=$this->convert_vi_to_en($treeArray[$index]['childDirs'][$index2]['name']); 34 $treeArray[$index]['childDirs'][$index2]['fileurl']=$this->encodePath($treeArray[$index]['childDirs'][$index2]['fileurl']); 35 } 36 37 } 38 27 39 if ((count($treeArray) == 1) && ($treeArray[0]['type'] == 'file')) { 28 40 … … 66 78 if ($file['parentID'] == $tree['id']) { 67 79 $path = $folder . "/" . $tree['name'] . "/" . $file['name']; 68 $file['fileurl'] = $this->encodePath($file['fileurl']);80 69 81 $filecontent = file_get_contents($file['fileurl']); 70 82 file_put_contents($path, $filecontent);
Note: See TracChangeset
for help on using the changeset viewer.