Путь: /';
if (isset($_GET['plid'])) {
echo htmlentities($_GET['plid'], ENT_QUOTES, 'UTF-8');
}
if (isset($_GET['elid']) and isset($_GET['plid'])) {
echo '/';
}
if (isset($_GET['elid'])) {
echo htmlentities($_GET['elid'], ENT_QUOTES, 'UTF-8');
}
echo "\n" . '' . "\n";
if (isset($_GET['plid']) and isset($_GET['elid'])) {
$elid = strrchr($_GET['plid'], '/');
if ($elid !== false) {
$elid = substr($elid, 1);
}
$plid = array_reverse(explode('/', $_GET['plid']));
$count_plid = sizeof($plid);
if ($count_plid > 1) {
unset($plid[0]);
$plid = implode('/', array_reverse($plid));
} else {
$plid = $plid[0];
}
echo '
' . "\n";
} elseif (isset($_GET['elid'])) {
echo '' . "\n";
}
// --------------- Функция форматированого вывода размера объектов ------------ //
function formatsize($object_size)
{
if ($object_size >= 1048576000) {
$object_size = round(($object_size / 1073741824), 2) . 'Gb';
} elseif ($object_size >= 1024000) {
$object_size = round(($object_size / 1048576), 2) . 'Mb';
} elseif ($object_size >= 1000) {
$object_size = round(($object_size / 1024), 2) . 'Kb';
} else {
$object_size = round($object_size) . 'b';
}
return $object_size;
}
// --------------- Функция форматированого вывода размера объектов ------------ //
$list_dir = array();
$list_symlink = array();
$list_tar = array();
$list_gz = array();
$list_bz = array();
$list_zip = array();
$list_arj = array();
$list_rar = array();
$list_file = array();
$list_log = array();
/**
* @version ISP4
*/
foreach($parse_xml->elem as $var) {
$dname_attributes = $var->dname->attributes();
if ($dname_attributes['xprop'] == '0') {
$list_dir["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '0', (string)$var->attr);
} elseif ($dname_attributes['xprop'] == '99') {
$list_symlink["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '99', (string)$var->attr);
} elseif ($dname_attributes['xprop'] == '1') {
$list_tar["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '1', (string)$var->attr, (int)$var->size);
} elseif ($dname_attributes['xprop'] == '2') {
$list_gz["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '2', (string)$var->attr, (int)$var->size);
} elseif ($dname_attributes['xprop'] == '3') {
$list_bz["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '3', (string)$var->attr, (int)$var->size);
} elseif ($dname_attributes['xprop'] == '4') {
$list_zip["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '4', (string)$var->attr, (int)$var->size);
} elseif ($dname_attributes['xprop'] == '5') {
$list_arj["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '5', (string)$var->attr, (int)$var->size);
} elseif ($dname_attributes['xprop'] == '6') {
$list_rar["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '6', (string)$var->attr, (int)$var->size);
} elseif ($dname_attributes['xprop'] == '100') {
$list_file["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '100', (string)$var->attr, (int)$var->size);
} elseif ($dname_attributes['xprop'] == '101') {
$list_log["'.(string)$var->name.'"] = array((string)$var->name, (string)$var->dname, '101', (string)$var->attr, (int)$var->size);
}
}
foreach ($parse_xml->elem as $data) {
#exit(var_dump($data->type));
${'list_'.$data->type}[] = $data;
}
//print_r($list_dir);
ksort($list_dir);
ksort($list_symlink);
ksort($list_tar);
ksort($list_gz);
ksort($list_bz);
ksort($list_zip);
ksort($list_arj);
ksort($list_rar);
ksort($list_file);
ksort($list_log);
$list_all_num = array_merge($list_dir, $list_symlink, $list_tar, $list_gz, $list_bz, $list_zip, $list_arj, $list_rar, $list_file, $list_log);
var_dump($list_all_num);
if (isset($list_all_num)) {
$count_all_num = sizeof($list_all_num);
$s_max = ceil($count_all_num / $_SESSION['rows']);
if (isset($_GET['s'])) {
$s = (int)$_GET['s'];
if ($s > $s_max) {
$s = $s_max;
} elseif ($s < 1) {
$s = 1;
}
} else {
$s = 1;
}
$rows_max = $s * $_SESSION['rows']-1;
$rows_min = $rows_max - $_SESSION['rows'] + 1;
if ($rows_max > $count_all_num-1) {
$rows_max = $count_all_num-1;
}
echo '