File size: 2.6Kb
<?php
$content = api_query('https://' . $server . '/manager/ispmgr?func=wwwdomain&out=xml&auth=' . urlencode($_SESSION['auth']));
$parse_xml = simplexml_load_string($content);
echo '<img src="images/t-new.png" alt="." /><a href="?func=wwwdomain.edit">Создать новый WWW домен</a>' . "\n";
echo '<hr />' . "\n";
foreach($parse_xml->elem as $var) {
echo '<b>Домен:</b> ' . htmlentities((string)$var->name, ENT_QUOTES, 'UTF-8') . '<br />' . "\n";
echo '<b>Параметры:</b> ';
if (isset($var->active)) {
echo '<img src="images/p-on.png" alt="on" />';
} else {
echo '<img src="images/p-off.png" alt="off" />';
}
if (isset($var->php)) {
echo '<img src="images/p-php.png" alt="php" />';
}
if (isset($var->cgi)) {
echo '<img src="images/p-cgi.png" alt="cgi" />';
}
if (isset($var->ssi)) {
echo '<img src="images/p-ssi.png" alt="ssi" />';
}
if (isset($var->ror)) {
echo '<img src="images/p-ror.png" alt="ror" />';
}
if (isset($var->ssl)) {
echo '<img src="images/p-ssl.png" alt="ssl" />';
}
echo '<br />' . "\n";
echo '<b>IP-адрес:</b> ' . htmlentities((string)$var->ip, ENT_QUOTES, 'UTF-8') . '<br />' . "\n";
echo '<b>Директория:</b> ' . htmlentities((string)$var->docroot, ENT_QUOTES, 'UTF-8') . '<br />' . "\n";
echo '» <a href="http://' . htmlentities((string)$var->name, ENT_QUOTES, 'UTF-8') . '/webstat/">Статистика посещений</a><br />' . "\n";
echo '» <a href="?func=wwwredirect&elid=' . urlencode((string)$var->name) . '">Редиректы</a><br />' . "\n";
echo '» <a href="?func=errpage&elid=' . urlencode((string)$var->name) . '">Страницы ошибок</a><br />' . "\n";
echo '» <a href="?func=wwwaddtypes&elid=' . urlencode((string)$var->name) . '">MIME типы</a><br />' . "\n";
echo '» <a href="?func=wwwdomain.edit&elid=' . urlencode((string)$var->name) . '">Изменить</a><br />' . "\n";
if (isset($var->active)) {
echo '» <a href="?func=wwwdomain.disable&elid=' . urlencode((string)$var->name) . '">Выключить</a><br />' . "\n";
} else {
echo '» <a href="?func=wwwdomain.enable&elid=' . urlencode((string)$var->name) . '">Включить</a><br />' . "\n";
}
echo '» <a href="?func=wwwdomain.delete&elid=' . urlencode((string)$var->name) . '">Удалить</a>' . "\n";
echo '<hr />' . "\n";
}
echo '<img src="images/sb-menu.png" alt="." /><a href="?func=menu">Вернуться в меню</a>' . "\n";
?>