getProject($ebc_project) ) { //--Something went wrong.. JError::raiseWarning(100, JText::sprintf('Unable to load the project %s', $ebc_project)); ecrHTML::easyFormEnd(); return; } $task = JRequest::getVar('task'); //--Draw h1 header ecrHTML::header(JText::_('Component ZIPer'), $project); $this->assignRef( 'ebc_project', $ebc_project ); $zip_dir_path = JPATH_COMPONENT.DS.'builds'.DS.'zips'.DS.$ebc_project; if( ! is_dir($zip_dir_path) ) { //--no zip dir - no zip files.. $zip_dir_path = false; } $this->assignRef( 'zip_dir_path', $zip_dir_path ); $this->assignRef('project', $project); if( in_array($task, get_class_methods($this)) ) { //--Execute the task $this->$task($project); } parent::display($tpl); ecrHTML::easyFormEnd(); }// function private function ziper() { $this->setLayout('ziper'); }//function private function ziperzip() { //--Get buildopts from request $buildopts = JRequest::getVar('buildopts',array()); JLoader::import('helpers.ziper', JPATH_COMPONENT); $easyZiper = new EasyZIPer(); $this->assignRef('easyZiper', $easyZiper); $this->assignRef('buildopts', $buildopts); $this->setLayout('ziperzip'); }//function private function delete() { $this->ziper(); }// function /* * Drawing */ function drawArchive() { echo '

'.JText::_('Archive').'

'; $this->zip_dir_path = JPATH_COMPONENT.DS.'builds'.DS.'zips'.DS.$this->ebc_project; if( ! JFolder::exists($this->zip_dir_path) ) { ecrHTML::displayMessage(JText::_('Archive is empty')); $this->zip_dir_path = false; return; } $folders = JFolder::folders($this->zip_dir_path); $base_href = JURI::Root().'administrator/components/'.com_EASY_APP_ELKUKU_1.'/builds/zips/'.$this->ebc_project; rsort($folders); foreach ($folders as $folder) { echo '
'; echo JText::_('Version').': '.$folder; echo '
'; $base_path = $this->zip_dir_path.DS.$folder; $files = JFolder::files( $base_path.DS ); if( ! count( $files)) { echo ''.JText::_('No ZIP files found').''; continue; } ?>
>