2009-09-06 03:20:22 +02:00
|
|
|
<?php
|
|
|
|
|
2017-12-13 17:50:40 +01:00
|
|
|
// Load config and autoload class
|
|
|
|
require_once("lib/config.php");
|
2009-09-06 03:20:22 +02:00
|
|
|
|
2017-12-11 18:20:13 +01:00
|
|
|
// Force authentication on this page
|
|
|
|
require_once("lib/auth.php");
|
|
|
|
|
2017-12-13 17:50:40 +01:00
|
|
|
include('inc/haut.php');
|
|
|
|
include('inc/debut.php');
|
2017-12-11 18:52:52 +01:00
|
|
|
|
2017-12-14 01:07:01 +01:00
|
|
|
|
|
|
|
if (!empty($_POST['domain'])) {
|
2017-12-17 21:44:10 +01:00
|
|
|
$domain = htmlentities(strip_tags($_POST['domain']),ENT_NOQUOTES);
|
2017-12-14 01:07:01 +01:00
|
|
|
|
|
|
|
print '<div class="container"><form name="del "method="post" action="superadmin.php">';
|
|
|
|
print '<div class="alert alert-warning" role="alert">Voulez vous vraiment supprimer le domaine '.$domain.' ?</div>';
|
|
|
|
print '<div class="alert alert-warning" role="alert"><button type="submit" name="delete" value="'.$domain.'">Confirmer</button> / <a href="superadmin.php">Annuler</a></div>';
|
|
|
|
print '</form></div>';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($_POST['delete'])) {
|
2017-12-17 21:44:10 +01:00
|
|
|
$domain = htmlentities(strip_tags($_POST['delete']),ENT_NOQUOTES);
|
2017-12-14 01:07:01 +01:00
|
|
|
print '<div class="container">';
|
|
|
|
print '<div class="alert alert-warning" role="alert">Suppression du domaine '.$domain.' ...</div>';
|
2017-12-15 11:42:04 +01:00
|
|
|
try {
|
2017-12-17 21:44:10 +01:00
|
|
|
$server->delDomain($domain);
|
2017-12-15 11:42:04 +01:00
|
|
|
print '<div class="alert alert-success" role="alert">Suppression effectué.</div>';
|
|
|
|
} catch (Exception $e_ad) {
|
|
|
|
print '<div class="alert alert-danger" role="alert">'.$e_ad->getMessage().'</div>';
|
|
|
|
}
|
2017-12-14 01:07:01 +01:00
|
|
|
print '</div>';
|
|
|
|
}
|
|
|
|
|
2017-12-13 17:50:40 +01:00
|
|
|
?>
|
2017-10-11 19:39:22 +02:00
|
|
|
|
2017-12-13 17:50:40 +01:00
|
|
|
<div class="container">
|
|
|
|
<h2>Liste des domaines administrables :</h2><hr>
|
2017-12-14 01:07:01 +01:00
|
|
|
<form name="del" method="post" action="superadmin.php">
|
2017-12-13 17:50:40 +01:00
|
|
|
<table class="table table-striped table-condensed">
|
2017-12-11 18:32:24 +01:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Nom du domaine</th>
|
2017-12-16 00:10:06 +01:00
|
|
|
<th width="100px">Actif</th>
|
2017-12-11 18:32:24 +01:00
|
|
|
<th>Nombre de comptes</th>
|
|
|
|
<th>dont comptes mail</th>
|
|
|
|
<th>Nombre d'alias mail</th>
|
|
|
|
<th>Taille / Quota</th>
|
|
|
|
<th width="50px">Suppr.</th>
|
|
|
|
</tr>
|
2017-10-11 19:39:22 +02:00
|
|
|
</thead>
|
2017-12-11 18:32:24 +01:00
|
|
|
<tbody>
|
2009-09-06 03:20:22 +02:00
|
|
|
<?php
|
|
|
|
// lignes avec les details sur les domaines
|
2017-12-13 17:50:40 +01:00
|
|
|
$domains = $server->getDomains();
|
|
|
|
foreach ($domains as $domain) {
|
|
|
|
print '<tr><td style="text-align:left;"><a href="admin.php?domain='.$domain->getName(). '">' .$domain->getName(). '</a></td>';
|
2017-12-15 15:38:41 +01:00
|
|
|
if ($domain->isActive()) {
|
2017-12-16 00:10:06 +01:00
|
|
|
print '<td><span class="glyphicon glyphicon-ok"></span></td>';
|
2017-12-15 15:38:41 +01:00
|
|
|
} else {
|
2017-12-16 00:10:06 +01:00
|
|
|
print '<td><span class="glyphicon glyphicon-remove"></span></td>';
|
2017-12-15 15:38:41 +01:00
|
|
|
}
|
2017-12-13 17:50:40 +01:00
|
|
|
print '<td><b>' .$domain->getNbAccounts(). '</b></td>';
|
|
|
|
print '<td><b>' .$domain->getNbMailAccounts(). '</b></td>';
|
|
|
|
//print '<td><b>' .$domain->getNbSmbAccounts(). '</b></td>';
|
|
|
|
print '<td><b>' .$domain->getNbMailAlias(). '</b></td>';
|
|
|
|
print '<td>' .$domain->getQuota(). '</td>';
|
2017-12-15 15:38:41 +01:00
|
|
|
print '<td><button type="submit" name="domain" value="'.$domain->getName().'"><span class="glyphicon glyphicon-trash"></span></button></td>';
|
|
|
|
print '</tr>';
|
2009-09-06 03:20:22 +02:00
|
|
|
}
|
2017-12-11 18:32:24 +01:00
|
|
|
?>
|
2017-12-13 17:50:40 +01:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-12-14 01:07:01 +01:00
|
|
|
</form>
|
2017-12-13 17:50:40 +01:00
|
|
|
</div>
|
2009-09-06 03:20:22 +02:00
|
|
|
|
2017-12-13 17:50:40 +01:00
|
|
|
<?php include('inc/fin.php'); ?>
|