File size: 8.67Kb
<?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 (empty($_POST['submit'])) {
if (isset($_GET['plid'])) {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.attr&elid=' . urlencode($_GET['file']) . '&plid=' . urlencode($_GET['plid'] . '/' . $_GET['elid']) . '&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
else if (isset($_GET['elid'])) {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.attr&elid=' . urlencode($_GET['file']) . '&plid=' . urlencode($_GET['elid']) . '&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
else {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.attr&elid=' . urlencode($_GET['file']) . '&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
$parse_xml = simplexml_load_string($content);
$pu = 0;
if (isset($parse_xml->pur)) {
$pu = $pu + 4;
}
if (isset($parse_xml->puw)) {
$pu = $pu + 2;
}
if (isset($parse_xml->pux)) {
$pu = $pu + 1;
}
$pg = 0;
if (isset($parse_xml->pgr)) {
$pg = $pg + 4;
}
if (isset($parse_xml->pgw)) {
$pg = $pg + 2;
}
if (isset($parse_xml->pgx)) {
$pg = $pg + 1;
}
$po = 0;
if (isset($parse_xml->por)) {
$po = $po + 4;
}
if (isset($parse_xml->pow)) {
$po = $po + 2;
}
if (isset($parse_xml->pox)) {
$po = $po + 1;
}
echo '<img src="images/t-edit.png" alt="." />Атрибуты объекта ' . htmlentities($_GET['file'], ENT_QUOTES, 'UTF-8') . '<br />' . "\n";
echo '<br />' . "\n";
echo '<form action="?func=file.attr&file=' . urlencode($_GET['file']);
if (isset($_GET['elid'])) {
echo '&elid=' . urlencode($_GET['elid']);
}
if (isset($_GET['plid'])) {
echo '&plid=' . urlencode($_GET['plid']);
}
echo '" method="post">' . "\n";
echo 'Имя:<br />' . "\n";
echo '<input name="name" value="' . htmlentities($_GET['file'], ENT_QUOTES, 'UTF-8') . '" /><br />' . "\n";
if (isset($parse_xml->dest)) {
echo 'Ссылается на:<br />' . "\n";
echo '<input name="dest" value="' . htmlentities((string) $parse_xml->dest, ENT_QUOTES, 'UTF-8') . '" /><br />' . "\n";
}
echo 'Права доступа:<br />' . "\n";
echo '<input name="mode" value="' . $pu . $pg . $po . '" /><br />' . "\n";
echo '<input name="submit" type="submit" value="Изменить" />' . "\n";
echo '</form>' . "\n";
echo '<hr />' . "\n";
echo '<img src="images/t-back.png" alt=".." /><a href="?func=file';
if (isset($_GET['elid'])) {
echo '&elid=' . urlencode($_GET['elid']);
}
if (isset($_GET['plid'])) {
echo '&plid=' . urlencode($_GET['plid']);
}
echo '">Вернуться</a><br />' . "\n";
}
else {
$mode = (string) $_POST['mode'];
$pur = '';
$puw = '';
$pux = '';
if ($mode[0] == '7') {
$pur = 'on';
$puw = 'on';
$pux = 'on';
}
else if ($mode[0] == '6') {
$pur = 'on';
$puw = 'on';
}
else if ($mode[0] == '5') {
$pur = 'on';
$pux = 'on';
}
else if ($mode[0] == '4') {
$pur = 'on';
}
else if ($mode[0] == '3') {
$puw = 'on';
$pux = 'on';
}
else if ($mode[0] == '2') {
$puw = 'on';
}
else if ($mode[0] == '1') {
$pux = 'on';
}
$pgr = '';
$pgw = '';
$pgx = '';
if ($mode[1] == '7') {
$pgr = 'on';
$pgw = 'on';
$pgx = 'on';
}
else if ($mode[1] == '6') {
$pgr = 'on';
$pgw = 'on';
}
else if ($mode[1] == '5') {
$pgr = 'on';
$pgx = 'on';
}
else if ($mode[1] == '4') {
$pgr = 'on';
}
else if ($mode[1] == '3') {
$pgw = 'on';
$pgx = 'on';
}
else if ($mode[1] == '2') {
$pgw = 'on';
}
else if ($mode[1] == '1') {
$pgx = 'on';
}
$por = '';
$pow = '';
$pox = '';
if ($mode[2] == '7') {
$por = 'on';
$pow = 'on';
$pox = 'on';
}
else if ($mode[2] == '6') {
$por = 'on';
$pow = 'on';
}
else if ($mode[2] == '5') {
$por = 'on';
$pox = 'on';
}
else if ($mode[2] == '4') {
$por = 'on';
}
else if ($mode[2] == '3') {
$pow = 'on';
$pox = 'on';
}
else if ($mode[2] == '2') {
$pow = 'on';
}
else if ($mode[2] == '1') {
$pox = 'on';
}
if (isset($_GET['plid'])) {
if (isset($_POST['dest'])) {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.attr&elid=' . urlencode($_GET['file']) . '&name=' . urlencode($_POST['name']) . '&dest=' . urlencode($_POST['dest']) . '&pur=' . $pur . '&puw=' . $puw . '&pux=' . $pux . '&pgr=' . $pgr . '&pgw=' . $pgw . '&pgx=' . $pgx . '&por=' . $por . '&pow=' . $pow . '&pox=' . $pox . '&plid=' . urlencode($_GET['plid'] . '/' . $_GET['elid']) . '&sok=ok&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
else {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.attr&elid=' . urlencode($_GET['file']) . '&name=' . urlencode($_POST['name']) . '&pur=' . $pur . '&puw=' . $puw . '&pux=' . $pux . '&pgr=' . $pgr . '&pgw=' . $pgw . '&pgx=' . $pgx . '&por=' . $por . '&pow=' . $pow . '&pox=' . $pox . '&plid=' . urlencode($_GET['plid'] . '/' . $_GET['elid']) . '&sok=ok&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
}
else if (isset($_GET['elid'])) {
if (isset($_POST['dest'])) {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.attr&elid=' . urlencode($_GET['file']) . '&name=' . urlencode($_POST['name']) . '&dest=' . urlencode($_POST['dest']) . '&pur=' . $pur . '&puw=' . $puw . '&pux=' . $pux . '&pgr=' . $pgr . '&pgw=' . $pgw . '&pgx=' . $pgx . '&por=' . $por . '&pow=' . $pow . '&pox=' . $pox . '&plid=' . urlencode($_GET['elid']) . '&sok=ok&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
else {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.attr&elid=' . urlencode($_GET['file']) . '&name=' . urlencode($_POST['name']) . '&pur=' . $pur . '&puw=' . $puw . '&pux=' . $pux . '&pgr=' . $pgr . '&pgw=' . $pgw . '&pgx=' . $pgx . '&por=' . $por . '&pow=' . $pow . '&pox=' . $pox . '&plid=' . urlencode($_GET['elid']) . '&sok=ok&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
}
else if (isset($_POST['dest'])) {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.attr&elid=' . urlencode($_GET['file']) . '&name=' . urlencode($_POST['name']) . '&dest=' . urlencode($_POST['dest']) . '&pur=' . $pur . '&puw=' . $puw . '&pux=' . $pux . '&pgr=' . $pgr . '&pgw=' . $pgw . '&pgx=' . $pgx . '&por=' . $por . '&pow=' . $pow . '&pox=' . $pox . '&sok=ok&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
else {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.attr&elid=' . urlencode($_GET['file']) . '&name=' . urlencode($_POST['name']) . '&pur=' . $pur . '&puw=' . $puw . '&pux=' . $pux . '&pgr=' . $pgr . '&pgw=' . $pgw . '&pgx=' . $pgx . '&por=' . $por . '&pow=' . $pow . '&pox=' . $pox . '&sok=ok&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
}
$parse_xml = simplexml_load_string($content);
if (isset($parse_xml->ok)) {
echo '<div style="text-align:center">' . "\n";
echo 'Атрибуты объекта успешно изменены!<br />' . "\n";
echo '<a href="?func=file';
if (isset($_GET['elid'])) {
echo '&elid=' . urlencode($_GET['elid']);
}
if (isset($_GET['plid'])) {
echo '&plid=' . urlencode($_GET['plid']);
}
echo '">Продолжить»</a>' . "\n";
echo '</div>' . "\n";
}
else {
echo '<div style="text-align:center">' . "\n";
echo 'Ошибка при изменении атрибутов объекта!<br />' . "\n";
echo '<a href="?func=file';
if (isset($_GET['elid'])) {
echo '&elid=' . urlencode($_GET['elid']);
}
if (isset($_GET['plid'])) {
echo '&plid=' . urlencode($_GET['plid']);
}
echo '">Продолжить»</a>' . "\n";
echo '</div>' . "\n";
}
}
echo '</div>';
?>