25 lines
557 B
PHP
25 lines
557 B
PHP
|
...
|
||
|
|
||
|
$ldapservers = new LDAPServers;
|
||
|
%set %%i = 0
|
||
|
%for %%phpldapadmin in %%phpldapadmin_host
|
||
|
$i=%%i;
|
||
|
$ldapservers->SetValue($i,'server','name','%%phpldapadmin_name');
|
||
|
|
||
|
%if %%phpldapadmin.phpldapadmin_tls == 'oui':
|
||
|
$ldapservers->SetValue($i,'server','host','ldaps://%%phpldapadmin');
|
||
|
%else
|
||
|
$ldapservers->SetValue($i,'server','host','ldap://%%phpldapadmin');
|
||
|
%end if
|
||
|
|
||
|
%if %%phpldapadmin.phpldapadmin_tls == 'oui':
|
||
|
$ldapservers->SetValue($i,'server','tls',true);
|
||
|
%else
|
||
|
$ldapservers->SetValue($i,'server','tls',false);
|
||
|
%end if
|
||
|
|
||
|
%set %%i = %%i + 1
|
||
|
%end for
|
||
|
|
||
|
...
|