File size: 8.42Kb
<?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";
error_reporting(0);
if (empty($_GET['elid'])) {
if (empty($_POST['submit'])) {
echo '<img src="images/t-new.png" alt="." />Создание WWW домена<br />' . "\n";
echo '<br />' . "\n";
echo '<form action="?func=wwwdomain.edit" method="post">' . "\n";
echo '* Доменное имя:<br />' . "\n";
echo '<input name="domain" /><br />' . "\n";
echo 'Псевдонимы:<br />' . "\n";
echo '<input name="alias" /><br />' . "\n";
echo 'Корневая папка:<br />' . "\n";
echo '<input name="docroot" value="auto" /><br />' . "\n";
echo '* E-Mail администратора:<br />' . "\n";
echo '<input name="admin" value="' . htmlentities((string) $parse_xml->admin, ENT_QUOTES, 'UTF-8') . '" /><br />' . "\n";
echo 'Кодировка:<br />' . "\n";
echo '<input name="charset" /><br />' . "\n";
echo 'Индексная страница:<br />' . "\n";
echo '<input name="index" /><br />' . "\n";
echo '* PHP:<br />' . "\n";
echo '<select name="php">' . "\n";
echo '<option value="phpnone">Нет поддержки PHP</option>' . "\n";
echo '<option value="phpmod">PHP как модуль Apache</option>' . "\n";
echo '</select><br />' . "\n";
echo '<input name="switchispmgr" type="checkbox" value="on" /> Отключить ISPmanager<br />' . "\n";
echo '<input name="submit" type="submit" value="Создать" />' . "\n";
echo '</form>' . "\n";
echo '<hr />' . "\n";
echo '* - Обязательные пункты<hr/>';
echo '<img src="images/t-back.png" alt=".." /><a href="?func=wwwdomain">Вернуться</a>' . "\n";
}
else {
$cgi = (isset($_POST['cgi']) ? 'on' : '');
$ssi = (isset($_POST['ssi']) ? 'on' : '');
$ssl = (isset($_POST['ssl']) ? 'on' : '');
$switchispmgr = (isset($_POST['switchispmgr']) ? 'on' : '');
$content = api_query('https://' . $server . '/manager/ispmgr?func=wwwdomain.edit&domain=' . urlencode($_POST['domain']) . '&alias=' . urlencode($_POST['alias']) . '&docroot=' . urlencode($_POST['docroot']) . '&ip=' . urlencode($_POST['ip']) . '&admin=' . urlencode($_POST['admin']) . '&charset=' . urlencode($_POST['charset']) . '&index=' . urlencode($_POST['index']) . '&php=' . urlencode($_POST['php']) . '&cgi=' . $cgi . '&ssi=' . $ssi . '&ssiext=' . urlencode($_POST['ssiext']) . '&ssl=' . $ssl . '&sslport=' . urlencode($_POST['sslport']) . '&switchispmgr=' . $switchispmgr . '&sok=ok&out=xml&auth=' . urlencode($_SESSION['auth']));
$parse_xml = simplexml_load_string($content);
if (isset($parse_xml->ok)) {
echo '<div style="text-align:center">' . "\n";
echo 'WWW домен успешно создан!<br />' . "\n";
echo 'Подождите несколько секунд, для перезагрузки сервера, и нажмите "продолжить".<br />' . "\n";
echo '<a href="?func=wwwdomain">Продолжить»</a>' . "\n";
echo '</div>' . "\n";
api_query('https://' . $server . '/manager/ispmgr?func=restart&auth=' . urlencode($_SESSION['auth']));
}
else {
echo '<div style="text-align:center">' . "\n";
echo 'Ошибка при создании WWW домена!<br />' . "\n";
echo '<a href="?func=wwwdomain">Продолжить»</a>' . "\n";
echo '</div>' . "\n";
}
}
}
else if (empty($_POST['submit'])) {
$content = api_query('https://' . $server . '/manager/ispmgr?func=wwwdomain.edit&elid=' . urlencode($_GET['elid']) . '&out=xml&auth=' . urlencode($_SESSION['auth']));
$parse_xml = simplexml_load_string($content);
echo '<img src="images/t-edit.png" alt="." />Изменение WWW домена<br />' . "\n";
echo '<br />' . "\n";
echo '<form action="?func=wwwdomain.edit&elid=' . urlencode($_GET['elid']) . '" method="post">' . "\n";
echo 'Доменное имя:<br />' . "\n";
echo '<input name="domain" value="' . htmlentities((string) $parse_xml->domain, ENT_QUOTES, 'UTF-8') . '" readonly="readonly" /><br />' . "\n";
echo 'Псевдонимы:<br />' . "\n";
echo '<input name="alias" value="' . htmlentities((string) $parse_xml->alias, ENT_QUOTES, 'UTF-8') . '" /><br />' . "\n";
echo 'IP-адрес:<br />' . "\n";
echo '<select name="ip">' . "\n";
$content = api_query('https://' . $server . '/manager/ispmgr?func=iplist&out=xml&auth=' . urlencode($_SESSION['auth']));
$parse_xml_ip = simplexml_load_string($content);
foreach ($parse_xml_ip->elem as $var) {
echo '<option value="' . htmlentities((string) $var->name, ENT_QUOTES, 'UTF-8') . '"';
if ((string) $parse_xml->ip == (string) $var->name) {
echo ' selected="selected"';
}
echo '>' . htmlentities((string) $var->name, ENT_QUOTES, 'UTF-8') . ' (' . htmlentities((string) $var->stat, ENT_QUOTES, 'UTF-8') . ')</option>' . "\n";
}
echo '</select><br />' . "\n";
echo 'E-Mail администратора:<br />' . "\n";
echo '<input name="admin" value="' . htmlentities((string) $parse_xml->admin, ENT_QUOTES, 'UTF-8') . '" /><br />' . "\n";
echo 'Кодировка:<br />' . "\n";
echo '<input name="charset" value="' . htmlentities((string) $parse_xml->charset, ENT_QUOTES, 'UTF-8') . '" /><br />' . "\n";
echo 'Индексная страница:<br />' . "\n";
echo '<input name="index" value="' . htmlentities((string) $parse_xml->index, ENT_QUOTES, 'UTF-8') . '" /><br />' . "\n";
echo 'PHP:<br />' . "\n";
echo '<select name="php">' . "\n";
echo '<option value="phpnone"';
if ((string) $parse_xml->php == 'phpnone') {
echo ' selected="selected"';
}
echo '>Нет поддержки PHP</option>' . "\n";
echo '<option value="phpmod"';
if ((string) $parse_xml->php == 'phpmod') {
echo ' selected="selected"';
}
echo '>PHP как модуль Apache</option>' . "\n";
echo '</select><br />' . "\n";
echo '<input name="switchispmgr" type="checkbox" value="on"';
if (isset($parse_xml->switchispmgr)) {
echo ' checked="checked"';
}
echo ' /> Отключить ISPmanager<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=wwwdomain">Вернуться</a>' . "\n";
}
else {
$cgi = (isset($_POST['cgi']) ? 'on' : '');
$ssi = (isset($_POST['ssi']) ? 'on' : '');
$ssl = (isset($_POST['ssl']) ? 'on' : '');
$switchispmgr = (isset($_POST['switchispmgr']) ? 'on' : '');
$content = api_query('https://' . $server . '/manager/ispmgr?func=wwwdomain.edit&elid=' . urlencode($_GET['elid']) . '&domain=' . urlencode($_GET['elid']) . '&alias=' . urlencode($_POST['alias']) . '&ip=' . urlencode($_POST['ip']) . '&admin=' . urlencode($_POST['admin']) . '&charset=' . urlencode($_POST['charset']) . '&index=' . urlencode($_POST['index']) . '&php=' . urlencode($_POST['php']) . '&cgi=' . $cgi . '&ssi=' . $ssi . '&ssiext=' . urlencode($_POST['ssiext']) . '&ssl=' . $ssl . '&sslport=' . urlencode($_POST['sslport']) . '&switchispmgr=' . $switchispmgr . '&sok=ok&out=xml&auth=' . urlencode($_SESSION['auth']));
$parse_xml = simplexml_load_string($content);
if (isset($parse_xml->ok)) {
echo '<div style="text-align:center">' . "\n";
echo 'Параметры WWW домена успешно изменены!<br />' . "\n";
echo 'Подождите несколько секунд, для перезагрузки сервера, и нажмите "продолжить".<br />' . "\n";
echo '<a href="?func=wwwdomain">Продолжить»</a>' . "\n";
echo '</div>' . "\n";
api_query('https://' . $server . '/manager/ispmgr?func=restart&auth=' . urlencode($_SESSION['auth']));
}
else {
echo '<div style="text-align:center">' . "\n";
echo 'Ошибка при изменении WWW домена!<br />' . "\n";
echo '<a href="?func=wwwdomain">Продолжить»</a>' . "\n";
echo '</div>' . "\n";
}
}
echo '</div>';
?>