* @version 1.0 */ // Force authentication on this page require_once("lib/auth.php"); // Autoload class from lib/class.*.php require_once("lib/autoload.php"); /** * Path */ define('EVOADMIN_BASE','./'); /** * Requires */ require_once EVOADMIN_BASE . 'lib/common.php'; include EVOADMIN_BASE . 'inc/haut.php'; // pas de domaine/variable domaine sur superadmin.php unset($_SESSION['domain']); global $conf; // array with all domains with rights on $domaines = array(); // If you are superadmin, you view all domains if (superadmin($login)) { // driver 'ldap' if ( $conf['domaines']['driver'] == 'ldap' ) { //TODO: foreach LDAP serveurs if ($conf['evoadmin']['cluster']) { $ldapconns = array(); foreach ($ldap_servers as $server) { array_push($ldapconns, Ldap::lda_connect(LDAP_ADMIN_DN,LDAP_ADMIN_PASS)); } } else { $ldapconn = Ldap::lda_connect(LDAP_ADMIN_DN,LDAP_ADMIN_PASS); } if ($ldapconn) { // compatibilite anciens schemas if ($conf['evoadmin']['version'] == 1) { $filter="(objectClass=ldapDomain)"; } else { $filter="(objectClass=postfixDomain)"; } $sr=ldap_search($ldapconn, LDAP_BASE, $filter); $info = ldap_get_entries($ldapconn, $sr); for ($i=0;$i<$info["count"];$i++) { // compatibilite anciens schemas if ($conf['evoadmin']['version'] == 1) { array_push($domaines,$info[$i]["domain"][0]); } else { array_push($domaines,$info[$i]["cn"][0]); } } ldap_unbind($ldapconn); } else { print "
Nom du domaine | Nombre de comptes | dont comptes mail | Nombre d'alias mail | Taille / Quota | Suppr. | ' .$domain. ' | '; // TODO : synchronization OpenLDAP<-Active Directory // print 'N/A | '; print '' .(getnumber($domain,'compte')+getnumber($domain,'alias')). ' | '; print '' .getnumber($domain,'mail'). ' | '; //print '' .getnumber($domain,'smb'). ' | '; print '' .getnumber($domain,'alias'). ' | '; print '' .getquota($domain,'group'). ' | '; print ''; // suppression possible que si utilisation de LDAP if ( $conf['domaines']['driver'] == 'ldap' ) { print ''; } else { print "Impossible"; } print ' | '; } ?>
---|