You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
965 B
36 lines
965 B
<?php
|
|
|
|
require_once ($_SERVER["DOCUMENT_ROOT"]."/services/bdd/connexion.php");
|
|
|
|
function listeDomainesPostfix($pdo) {
|
|
try {
|
|
$req = $pdo->query('SELECT domaine FROM postfix_domaines ORDER BY defaut DESC');
|
|
$liste_domaines = array();
|
|
foreach ($req as $domaine_bdd => $domaine) {
|
|
array_push($liste_domaines,$domaine);
|
|
}
|
|
//return array_reverse($liste_domaines);
|
|
return $liste_domaines;
|
|
}
|
|
catch (\Exception $e) {
|
|
die ("Erreur de requête de selection des domaines pour \"$base\" : ".$e->getMessage());
|
|
}
|
|
}
|
|
|
|
function afficheDomaineDefautPostfix($pdo) {
|
|
try {
|
|
$req = $pdo->query('SELECT domaine FROM postfix_domaines WHERE defaut=1 LIMIT 1');
|
|
foreach ($req as $domaine_bdd => $domaine_defaut) {
|
|
//echo $domaine_defaut['domaine'];
|
|
}
|
|
//return array_reverse($liste_domaines);
|
|
return $domaine_defaut['domaine'];
|
|
}
|
|
catch (\Exception $e) {
|
|
die ("Erreur de requête de selection des domaines pour \"$base\" : ".$e->getMessage());
|
|
}
|
|
}
|
|
|
|
|
|
?>
|