Файл: isp-mobile.mhos.tk/func/file.extract.php
Строк: 52
<?php
if (isset($_GET['plid']) and isset($_GET['elid'])) {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.extract&elid=' . urlencode($_GET['file']) . '&plid=' . urlencode($_GET['plid'] . '/' . $_GET['elid']) . '&out=xml&authinfo=' . urlencode($_SESSION['username']) . ':' . urlencode($_SESSION['password']));
} elseif (isset($_GET['elid'])) {
$content = api_query('https://' . $server . '/manager/ispmgr?func=file.extract&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.extract&elid=' . urlencode($_GET['file']) . '&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&elid=' . urlencode($_GET['elid']);
if (isset($_GET['plid'])) {
echo '&plid=' . urlencode($_GET['plid']);
}
echo '">Продолжить»</a>' . "n";
echo '</div>' . "n";
}
?>