t = PhocaDownloadUtils::setVars('manager'); $this->r = new PhocaDownloadRenderAdminView(); $this->field = Factory::getApplication()->input->get('field'); $this->fce = 'phocaSelectFileName_'.$this->field; $this->returnUrl = base64_encode(Uri::getInstance()->toString()); $this->folderstate = $this->get('FolderState'); $this->files = $this->get('Files'); $this->folders = $this->get('Folders'); $this->session = Factory::getSession(); $this->manager = Factory::getApplication()->input->get( 'manager', '', 'file' ); if ($this->manager == 'filemultiple') { $this->form = $this->get('Form'); } $params = ComponentHelper::getParams($this->t['o']); $this->t['multipleuploadchunk'] = $params->get( 'multiple_upload_chunk', 0 ); $this->t['uploadmaxsize'] = $params->get( 'upload_maxsize', 3145728 ); $this->t['uploadmaxsizeread'] = PhocaDownloadFile::getFileSizeReadable($this->t['uploadmaxsize']); $this->t['enablemultiple'] = $params->get( 'enable_multiple_upload_admin', 1 ); $this->t['multipleuploadmethod'] = $params->get( 'multiple_upload_method', 4 ); $this->currentFolder = ''; if (isset($this->folderstate->folder) && $this->folderstate->folder != '') { $this->currentFolder = $this->folderstate->folder; } // - - - - - - - - - - //TABS // - - - - - - - - - - $this->t['tab'] = Factory::getApplication()->input->get('tab', '', '', 'string'); $this->t['displaytabs'] = 0; // UPLOAD $this->t['currenttab']['upload'] = $this->t['displaytabs']; $this->t['displaytabs']++; // MULTIPLE UPLOAD if((int)$this->t['enablemultiple'] >= 0) { $this->t['currenttab']['multipleupload'] = $this->t['displaytabs']; $this->t['displaytabs']++; } $group = PhocaDownloadSettings::getManagerGroup($this->manager); // - - - - - - - - - - - // Upload // - - - - - - - - - - - $sU = new PhocaDownloadFileUploadSingle(); $sU->returnUrl = 'index.php?option=com_phocadownload&view=phocadownloadmanager&tab=upload'.str_replace('&', '&', $group['c']).'&manager='.PhocaDownloadUtils::filterValue($this->manager, 'alphanumeric').'&field='.PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2').'&folder='.PhocaDownloadUtils::filterValue($this->currentFolder, 'folderpath'); $sU->tab = 'upload'; $this->t['su_output'] = $sU->getSingleUploadHTML(); $this->t['su_url'] = Uri::base().'index.php?option=com_phocadownload&task=phocadownloadupload.upload&' .$this->session->getName().'='.$this->session->getId().'&' . Session::getFormToken().'=1&viewback=phocadownloadmanager&manager='.PhocaDownloadUtils::filterValue($this->manager, 'alphanumeric').'&field='.PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2').'&' .'folder='. PhocaDownloadUtils::filterValue($this->currentFolder, 'folderpath').'&tab=upload'; // - - - - - - - - - - - // Multiple Upload // - - - - - - - - - - - // Get infos from multiple upload $muFailed = Factory::getApplication()->input->get( 'mufailed', '0', '', 'int' ); $muUploaded = Factory::getApplication()->input->get( 'muuploaded', '0', '', 'int' ); $this->t['mu_response_msg'] = $muUploadedMsg = ''; if ($muUploaded > 0) { $muUploadedMsg = Text::_('COM_PHOCADOWNLOAD_COUNT_UPLOADED_FILE'). ': ' . $muUploaded; } if ($muFailed > 0) { $muFailedMsg = Text::_('COM_PHOCADOWNLOAD_COUNT_NOT_UPLOADED_FILE'). ': ' . $muFailed; } if ($muFailed > 0 && $muUploaded > 0) { $this->t['mu_response_msg'] = '