Просмотр файла ISP4Mobile/xrex/file.inside.php

Размер файла: 4.74Kb
<?php
### Decoded IonCube by pimnik98 
### Декодировал Пиминов Никита 
### vk.com/piminov_remont
### Заказать декодирование: https://bymas.ru/forum/viewtopic.php?topic_id=131647

echo '<div class="head">' . "\n" . '<div class="logo"> Панель управления</div>' . "\n" . '</div><div class="menu" style="text-align:right"><img src="images/lv-server.png" alt="." />' . $server . ' | ' . "\n";
echo '<img src="images/lv-5.png" alt="." />' . htmlentities($_SESSION['username'], ENT_QUOTES, 'UTF-8') . ' | ' . "\n";
echo '<img src="images/sb-logout.gif" alt="." /><a href="?func=exit">Выйти</a>' . "\n";
echo '<hr /></div><div class="menu">' . "\n";

if (isset($_GET['plid']) && isset($_GET['elid'])) {
	$content = api_query('https://' . $server . '/manager/ispmgr?func=file&elid=' . urlencode($_GET['elid']) . '&plid=' . urlencode($_GET['plid']) . '&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
else if (isset($_GET['elid'])) {
	$content = api_query('https://' . $server . '/manager/ispmgr?func=file&elid=' . urlencode($_GET['elid']) . '&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
else {
	$content = api_query('https://' . $server . '/manager/ispmgr?func=file&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}

$parse_xml = simplexml_load_string($content);

foreach ($parse_xml->elem as $var) {
	$dname = htmlentities((string) $var->dname, ENT_QUOTES, 'UTF-8');
	$user = htmlentities((string) $var->user, ENT_QUOTES, 'UTF-8');
	$group = htmlentities((string) $var->group, ENT_QUOTES, 'UTF-8');
	$attr = htmlentities((string) $var->attr, ENT_QUOTES, 'UTF-8');
	$size = (int) $var->size;
	$time = htmlentities((string) $var->time, ENT_QUOTES, 'UTF-8');
	break;
}

echo '<b>Объект:</b> ' . htmlentities($_GET['file'], ENT_QUOTES, 'UTF-8') . '<br />' . "\n";

if ($_GET['xprop'] == '99') {
	echo '<b>Ссылается на:</b> ' . $dname . '<br />' . "\n";
}

if ($attr != '') {
	echo '<b>CHMOD:</b> ' . $attr . '<br />' . "\n";
	echo '<b>Владелец:</b> ' . $user . '<br />' . "\n";
	echo '<b>Группа:</b> ' . $group . '<br />' . "\n";
}

if (($_GET['xprop'] != '99') && ($_GET['xprop'] != '0')) {
	function formatsize($object_size)
	{
		if (1048576000 <= $object_size) {
			$object_size = round($object_size / 1073741824, 2) . 'Gb';
		}
		else if (1024000 <= $object_size) {
			$object_size = round($object_size / 1048576, 2) . 'Mb';
		}
		else if (1000 <= $object_size) {
			$object_size = round($object_size / 1024, 2) . 'Kb';
		}
		else {
			$object_size = round($object_size) . 'b';
		}

		return $object_size;
	}
	echo '<b>Размер:</b> ' . formatsize($size) . '<br />' . "\n";
}

echo '<b>Дата изменения:</b> ' . $time . '<br />' . "\n";
if (($_GET['xprop'] == '1') || ($_GET['xprop'] == '2') || ($_GET['xprop'] == '3') || ($_GET['xprop'] == '4') || ($_GET['xprop'] == '5') || ($_GET['xprop'] == '6')) {
	echo '&#187; <a href="?func=file&amp;elid=' . urlencode($_GET['file']) . '&amp;';

	if (isset($_GET['elid']) && isset($_GET['plid'])) {
		echo '&amp;plid=' . urlencode($_GET['plid'] . '/' . $_GET['elid']);
	}
	else if (isset($_GET['elid'])) {
		echo '&amp;plid=' . urlencode($_GET['elid']);
	}

	echo '">Открыть архив</a><br />' . "\n";
	echo '&#187; <a href="?func=file.extract&amp;file=' . urlencode($_GET['file']);

	if (isset($_GET['elid'])) {
		echo '&amp;elid=' . urlencode($_GET['elid']);
	}

	if (isset($_GET['plid'])) {
		echo '&amp;plid=' . urlencode($_GET['plid']);
	}

	echo '">Распаковать</a><br />' . "\n";
}

echo '&#187; <a href="?func=file.attr&amp;file=' . urlencode($_GET['file']);

if (isset($_GET['elid'])) {
	echo '&amp;elid=' . urlencode($_GET['elid']);
}

if (isset($_GET['plid'])) {
	echo '&amp;plid=' . urlencode($_GET['plid']);
}

echo '">Изменить атрибуты</a><br />' . "\n";
if (($_GET['xprop'] == '100') || ($_GET['xprop'] == '101')) {
	echo '&#187; <a href="?func=file.edit&amp;file=' . urlencode($_GET['file']);

	if (isset($_GET['elid'])) {
		echo '&amp;elid=' . urlencode($_GET['elid']);
	}

	if (isset($_GET['plid'])) {
		echo '&amp;plid=' . urlencode($_GET['plid']);
	}

	echo '">Редактировать</a>' . "\n";
}

echo '<hr />' . "\n";
echo '<img src="images/t-back.png" alt=".." /><a href="?func=file';

if (isset($_GET['elid'])) {
	echo '&amp;elid=' . urlencode($_GET['elid']);
}

if (isset($_GET['plid'])) {
	echo '&amp;plid=' . urlencode($_GET['plid']);
}

echo '">Вернуться</a><br />' . "\n";
echo '<img src="images/sb-menu.png" alt="." /><a href="?func=menu">Вернуться в меню</a>' . "\n";
echo '</div>';

?>