Esempio n. 1
0
			'application/gzip', 
			'application/gzip-compressed', 
			'application/x-gzip-compressed', 
			'application/x-tar', 
			'application/x-tar-compressed', 
			'application/octet-stream'
			), 
			1000000);
		$uploader->setPrefix('tmp');
		icms_cp_header();
		echo '<code>';
		if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
			if (!$uploader->upload()) {
				icms_core_Message::error($uploader->getErrors());
			} else {
				$tar = new icms_file_TarFileHandler();
				$tar->openTar($uploader->getSavedDestination());
				@unlink($uploader->getSavedDestination());
				$themefound = FALSE;
				foreach ($tar->files as $id => $info) {
					$infoarr = explode('/', str_replace("\\", '/', $info['name']));
					if (!isset($tplset_name)) {
						$tplset_name = trim($infoarr[0]);
					} else {
						$tplset_name = trim($tplset_name);
						if ($tplset_name == '') {
							$tplset_name = trim($infoarr[0]);
						}
					}
					if ($tplset_name != '') {
						break;
Esempio n. 2
0
 public function __construct()
 {
     parent::__construct();
     $this->_deprecated = icms_core_Debug::setDeprecated('icms_file_TarFileHandler', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
 }