$folder = $_POST['folder'] ? $_POST['folder'] : 'New Folder'; $fp->new_folder($dir, $folder); break; */ /* case 'new': $dir = $_POST['dir'] ? $_POST['dir'] : '/'; $folder = $_POST['folder'] ? $_POST['folder'] : 'New Folder'; $fp->new_folder($dir, $folder); break; */ default: $filter = \Request::get('filter'); $filters = ''; $filters = $fp->get_filters($filter); $dir = makeOSPath(\Request::postParam("dir", "/")); $dir_b64 = base64_encode($dir); ob_start(); ?> <div class="Lobby-FS-filepicker-picker-nav"> <table cellspacing="0" cellpadding="0"><tr> <td class="label"><label><?php _e('Folder'); ?> </label></td> <td> <input type="text" id="target_dir_path" value="<?php echo $dir_b64; ?> " /> <input type="hidden" id="target_dir" value="Lw==" />
if (empty($file)) { $file = convert2adress($data['title']) . '.zip'; } $ini = $myini->read("modules/{$data['id']}/config.ini"); $tpl = $gpc->get('tpl', int); $tempdir = "temp/"; $error = false; require_once 'classes/class.zip.php'; $archive = new PclZip($tempdir . $file); $v_list = $archive->create(makeOSPath(array("modules", $id)), PCLZIP_OPT_REMOVE_PATH, makeOSPath(array("modules", $id))); if ($v_list == 0) { $error = true; } else { if (isset($ini['template']) && count($ini['template']) > 0) { $archive = new PclZip($tempdir . $file); $v_list = $archive->add(makeOSPath(array('templates', $tpl, 'modules', $id)), PCLZIP_OPT_REMOVE_PATH, makeOSPath(array('templates', $tpl, 'modules', $id)), PCLZIP_OPT_ADD_PATH, makeOSPath(array("templates"))); if ($v_list == 0) { $error = true; break; } } } if ($error == true) { echo head(); unset($archive); $filesystem->unlink($tempdir . $file); error('admin.php?action=cms&job=package_export&id=' . $id, $archive->errorInfo(true)); } else { viscacha_header('Content-Type: application/zip'); viscacha_header('Content-Disposition: attachment; filename="' . $file . '"'); viscacha_header('Content-Length: ' . filesize($tempdir . $file));