function _traverseFolderDowload($folderGuid, $sGuid, $level) { $tblFolder = new Pandamp_Modules_Dms_Folder_Model_Folder(); $rowSet = $tblFolder->fetchChildren($folderGuid); $row = $tblFolder->find($folderGuid)->current(); $tblCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog(); $rows = $tblCatalog->downloadCatalog($row->guid); if (count($rows)) { foreach ($rows as $rowset) { $tblCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog(); $rowsetCatalog = $tblCatalog->find($rowset->itemGuid); if (count($rowsetCatalog)) { $rowCatalog = $rowsetCatalog->current(); $rowsetCatAtt = $rowCatalog->findDependentRowsetCatalogAttribute(); $contentType = $rowsetCatAtt->findByAttributeGuid('docMimeType')->value; $filename = $systemname = $rowsetCatAtt->findByAttributeGuid('docSystemName')->value; $oriName = $rowsetCatAtt->findByAttributeGuid('docOriginalName')->value; $parentGuid = $rowset->relatedGuid; $sDir1 = ROOT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . $systemname; $sDir2 = ROOT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . $parentGuid . DIRECTORY_SEPARATOR . $systemname; //$c = ROOT_DIR.'/data/download/file'; echo $parentGuid . '<br>'; // if(file_exists($sDir1)) // { //header("Content-type: $contentType"); //header("Content-Disposition: attachment; filename=$oriName"); //@readfile($sDir2); // exec('xcopy '.$sDir1.' d:\\www\holmp\data\download\file /e/i'); // } // if(file_exists($sDir2)) // { // exec('xcopy '.$sDir2.' d:\\www\holmp\data\download\file /e/i'); // } } } } }