2015-08-25 16:54:13 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gestion des domaines
|
|
|
|
*
|
|
|
|
* Copyright (c) 2009 Evolix - Tous droits reserves
|
|
|
|
*
|
2019-03-27 14:07:47 +01:00
|
|
|
* vim: expandtab softtabstop=4 tabstop=4 shiftwidth=4 showtabline=2
|
2015-08-25 16:54:13 +02:00
|
|
|
*
|
|
|
|
* @author Gregory Colpart <reg@evolix.fr>
|
|
|
|
* @author Thomas Martin <tmartin@evolix.fr>
|
|
|
|
* @author Sebastien Palma <spalma@evolix.fr>
|
|
|
|
* @version 1.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
2019-03-27 14:07:47 +01:00
|
|
|
<h2>Liste des comptes web</h2>
|
2015-08-25 16:54:13 +02:00
|
|
|
|
|
|
|
<?php if(count($vhost_list) > 0) { ?>
|
|
|
|
<table id="tab-list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<?php if(is_superadmin()) {
|
2019-05-16 10:57:05 +02:00
|
|
|
print '<th>Virtual Host</th>';
|
2015-08-25 16:54:13 +02:00
|
|
|
} ?>
|
2019-05-16 10:57:05 +02:00
|
|
|
<th>Servername</th>
|
2017-08-22 18:32:33 +02:00
|
|
|
<?php if(is_superadmin()) {
|
|
|
|
print '<th>Alias</th>';
|
|
|
|
}
|
|
|
|
if($conf['quota']) {
|
|
|
|
print '<th> Utilisé </th>';
|
|
|
|
print '<th> Soft </th>';
|
|
|
|
print '<th> Hard </th>';
|
|
|
|
print '<th> Occupation </th>';
|
|
|
|
}
|
|
|
|
if (array_key_exists('php_versions', $conf) && count($conf['php_versions']) > 1) {
|
|
|
|
print '<th> PHP </th>';
|
|
|
|
}
|
|
|
|
?>
|
2019-03-18 11:58:38 +01:00
|
|
|
<th> Actif ? </th>
|
2019-03-26 10:41:17 +01:00
|
|
|
|
|
|
|
<?php if(is_superadmin()) {
|
2019-03-27 14:07:47 +01:00
|
|
|
print '<th>Administration</th>';
|
2019-03-26 10:41:17 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
2015-08-25 16:54:13 +02:00
|
|
|
<!--<th>Opérations</th>-->
|
|
|
|
<?php if($conf['cluster']) { ?>
|
|
|
|
<th>Bdd</th>
|
2015-08-31 15:17:10 +02:00
|
|
|
<th>Mail</th>
|
2015-08-25 16:54:13 +02:00
|
|
|
<th>Replication</th>
|
|
|
|
<th>Master</th>
|
|
|
|
<th>Slave</th>
|
2017-08-22 18:32:33 +02:00
|
|
|
<?php } ?>
|
|
|
|
</tr>
|
2015-08-25 16:54:13 +02:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($vhost_list as $vhost_info) {
|
|
|
|
print '<tr>';
|
|
|
|
if(is_superadmin()) {
|
|
|
|
printf('<td>%s</td>', $vhost_info['owner']);
|
|
|
|
}
|
2019-05-16 10:57:05 +02:00
|
|
|
printf('<td>%s</td>',
|
2015-08-25 16:54:13 +02:00
|
|
|
$vhost_info['server_name'], $vhost_info['server_name']);
|
2019-03-27 14:07:47 +01:00
|
|
|
|
2015-08-25 16:54:13 +02:00
|
|
|
if ($conf['cluster']) {
|
2017-08-20 05:05:04 +02:00
|
|
|
if (empty($vhost_info['bdd']))
|
|
|
|
printf('<td bgcolor="#696969"/>');
|
|
|
|
else
|
|
|
|
printf('<td>%s</td>', $vhost_info['bdd']);
|
2015-08-25 16:54:13 +02:00
|
|
|
|
2017-08-20 05:05:04 +02:00
|
|
|
if (empty($vhost_info['mail']))
|
|
|
|
printf('<td bgcolor="#696969" />');
|
|
|
|
else if ($vhost_info['mail'] == 'gmail')
|
|
|
|
printf('<td><img src="/img/gmail.gif" alt="Gmail" /></td>');
|
|
|
|
else printf('<td><img src="/img/evolix.gif" alt="Evolix" /></td>');
|
2015-08-25 16:54:13 +02:00
|
|
|
|
2017-08-20 05:05:04 +02:00
|
|
|
if (empty($vhost_info['replication']))
|
|
|
|
printf('<td bgcolor="#696969"/>');
|
|
|
|
else
|
|
|
|
printf('<td>%s</td>', $vhost_info['replication']);
|
|
|
|
printf('<td>%s</td>', $vhost_info['master']);
|
|
|
|
if (empty($vhost_info['slave']))
|
|
|
|
printf('<td bgcolor="#696969"/>');
|
|
|
|
else
|
|
|
|
printf('<td>%s</td>', $vhost_info['slave']);
|
2017-08-22 18:32:33 +02:00
|
|
|
}
|
|
|
|
|
2019-05-16 10:57:05 +02:00
|
|
|
printf('<td>%s</td>', preg_replace('/,/','<br />',$vhost_info['server_alias']));
|
2017-08-22 18:32:33 +02:00
|
|
|
|
|
|
|
if ($conf['quota']) {
|
|
|
|
printf('<td>%s</td>', $vhost_info['size']);
|
|
|
|
printf('<td>%s</td>', $vhost_info['quota_soft']);
|
|
|
|
printf('<td>%s</td>', $vhost_info['quota_hard']);
|
|
|
|
printf('<td>%s</td>', $vhost_info['occupation']);
|
2017-08-20 05:05:04 +02:00
|
|
|
}
|
2019-04-01 18:10:53 +02:00
|
|
|
|
2017-08-22 18:32:33 +02:00
|
|
|
if (array_key_exists('php_versions', $conf) && count($conf['php_versions']) > 1) {
|
|
|
|
printf('<td>%s</td>', preg_replace("/^(\d)(\d)$/", '\1.\2', $vhost_info['php_version']));
|
2017-08-20 05:05:04 +02:00
|
|
|
}
|
2019-03-18 11:58:38 +01:00
|
|
|
printf('<td>%s</td>', ($vhost_info['is_enabled'] ? 'Activé' : 'Désactivé' ));
|
2019-03-27 14:07:47 +01:00
|
|
|
|
2015-08-31 15:17:10 +02:00
|
|
|
if (is_superadmin()) {
|
2019-03-27 14:07:47 +01:00
|
|
|
printf('<td>');
|
2019-05-17 11:53:21 +02:00
|
|
|
if (!in_array($vhost_info['owner'], $_SESSION['non_standard'])) {
|
2019-06-05 17:20:34 +02:00
|
|
|
printf('<a href="/webadmin/%s/alias/">Alias</a> - ', $vhost_info['owner']);
|
|
|
|
printf('<a href="/webadmin/%s/domain/">Servername</a> - ', $vhost_info['owner']);
|
2019-05-17 11:53:21 +02:00
|
|
|
if(is_multiphp()) {
|
2019-06-05 17:20:34 +02:00
|
|
|
printf('<a href="/webadmin/%s/php/">PHP</a> - ', $vhost_info['owner']);
|
2019-05-17 11:53:21 +02:00
|
|
|
} else {
|
2019-06-05 17:20:34 +02:00
|
|
|
printf('<a href="/webadmin/%s/itk/">ITK</a> - ', $vhost_info['owner']);
|
2019-05-17 11:53:21 +02:00
|
|
|
}
|
2019-06-07 11:46:29 +02:00
|
|
|
printf('<a href="/webadmin/%s/letsencrypt/">Let\'s Encrypt</a> - ', $vhost_info['owner']);
|
2019-05-17 11:53:21 +02:00
|
|
|
printf('<a href="/webadmin/delete/%s">Supprimer</a>', $vhost_info['owner']);
|
2019-03-29 15:56:35 +01:00
|
|
|
} else {
|
2019-05-17 11:53:21 +02:00
|
|
|
print '<span class="form-mandatory-ok">VirtualHost non standard</span>';
|
2019-03-29 15:56:35 +01:00
|
|
|
}
|
2019-03-27 14:07:47 +01:00
|
|
|
printf('</td>');
|
|
|
|
|
2015-08-31 15:17:10 +02:00
|
|
|
}
|
2015-08-25 16:54:13 +02:00
|
|
|
|
|
|
|
print '</tr>';
|
2015-08-31 15:17:10 +02:00
|
|
|
|
2015-08-25 16:54:13 +02:00
|
|
|
} ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2019-02-28 15:45:25 +01:00
|
|
|
<br>
|
|
|
|
Nombre total de comptes : <?= count($vhost_list); ?>
|
2015-08-25 16:54:13 +02:00
|
|
|
<?php
|
|
|
|
} else {
|
|
|
|
print '<p>Aucun domaine existant !</p>';
|
|
|
|
}
|
|
|
|
?>
|