field = Factory::getApplication()->input->get('field'); $this->fce = 'phocaSelectFileName_'.$this->field; $this->t = PhocaGalleryUtils::setVars('i'); $this->r = new PhocaGalleryRenderAdminView(); $this->folderstate = $this->get('FolderState'); $this->images = $this->get('Images'); $this->folders = $this->get('Folders'); $this->session = Factory::getSession(); $params = ComponentHelper::getParams('com_phocagallery'); $this->t['enablethumbcreation'] = $params->get('enable_thumb_creation', 1 ); $this->t['enablethumbcreationstatus'] = PhocaGalleryRenderAdmin::renderThumbnailCreationStatus((int)$this->t['enablethumbcreation']); $this->t['multipleuploadchunk'] = $params->get( 'multiple_upload_chunk', 0 ); $this->t['large_image_width'] = $params->get( 'large_image_width', 640 ); $this->t['large_image_height'] = $params->get( 'large_image_height', 480 ); $this->t['javaboxwidth'] = $params->get( 'java_box_width', 480 ); $this->t['javaboxheight'] = $params->get( 'java_box_height', 480 ); $this->t['uploadmaxsize'] = $params->get( 'upload_maxsize', 3145728 ); $this->t['uploadmaxsizeread'] = PhocaGalleryFile::getFileSizeReadable($this->t['uploadmaxsize']); $this->t['uploadmaxreswidth'] = $params->get( 'upload_maxres_width', 3072 ); $this->t['uploadmaxresheight'] = $params->get( 'upload_maxres_height', 2304 ); $this->t['enablejava'] = $params->get( 'enable_java', -1 ); $this->t['enablemultiple'] = $params->get( 'enable_multiple', 0 ); $this->t['multipleuploadmethod'] = $params->get( 'multiple_upload_method', 4 ); $this->t['multipleresizewidth'] = $params->get( 'multiple_resize_width', -1 ); $this->t['multipleresizeheight'] = $params->get( 'multiple_resize_height', -1 ); if((int)$this->t['enablemultiple'] >= 0) { PhocaGalleryFileUploadMultiple::renderMultipleUploadLibraries(); } $this->r = new PhocaGalleryRenderAdminView(); $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']++; } // MULTIPLE UPLOAD if($this->t['enablejava'] >= 0) { $this->t['currenttab']['javaupload'] = $this->t['displaytabs']; $this->t['displaytabs']++; } // - - - - - - - - - - - // Upload // - - - - - - - - - - - $sU = new PhocaGalleryFileUploadSingle(); $sU->returnUrl = 'index.php?option=com_phocagallery&view=phocagalleryi&tab=upload&tmpl=component&field='.$this->field.'&folder='. $this->currentFolder; $sU->tab = 'upload'; $this->t['su_output'] = $sU->getSingleUploadHTML(); $this->t['su_url'] = Uri::base().'index.php?option=com_phocagallery&task=phocagalleryu.upload&' .$this->session->getName().'='.$this->session->getId().'&' . Session::getFormToken().'=1&viewback=phocagalleryi&field='.$this->field.'&' .'folder='. $this->currentFolder.'&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_PHOCAGALLERY_COUNT_UPLOADED_IMG'). ': ' . $muUploaded; } if ($muFailed > 0) { $muFailedMsg = Text::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG'). ': ' . $muFailed; } if ($muFailed > 0 && $muUploaded > 0) { $this->t['mu_response_msg'] = '