Beispiel #1
0
         }
     }
     if (!$uploader) {
         $uploader = new uploader(uploader::createResource('project'));
     }
     if (!$_POST['IDResource'] && $draft_id) {
         $attachedfiles_tmpdraft_files = drafts::getAttachedFiles($draft_id, 4);
         if ($attachedfiles_tmpdraft_files) {
             $attachedfiles_draft_files = array();
             foreach ($attachedfiles_tmpdraft_files as $attachedfiles_draft_file) {
                 $attachedfiles_draft_files[] = $attachedfiles_draft_file;
             }
             $uploader->setFiles($attachedfiles_draft_files, uploader::STATUS_ADDED);
         }
     } else {
         $attachedfiles_tmpprj_files = $tmpPrj->getAttach();
         if ($attachedfiles_tmpprj_files) {
             $attachedfiles_prj_files = array();
             foreach ($attachedfiles_tmpprj_files as $attachedfiles_prj_file) {
                 $attachedfiles_prj_files[] = $attachedfiles_prj_file['file_id'];
             }
             $set = $uploader->setFiles($attachedfiles_prj_files, $draft_id ? uploader::STATUS_ADDED : uploader::STATUS_CREATE);
         }
     }
     $attachedfiles_files = $uploader->getFiles();
     $content = "new/tpl.step_1.php";
     break;
     //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 case 0:
 default: