*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
';
if (! function_exists("ldap_connect"))
{
print ''.$butlabel.'';
}
else if (empty($conf->global->LDAP_SERVER_HOST))
{
print ''.$butlabel.'';
}
else if (empty($key) || empty($dn) || empty($objectclass))
{
$langs->load("errors");
print ''.$butlabel.'';
}
else
{
print ''.$butlabel.'';
}
print '
';
}
/**
* Show a LDAP array into an HTML output array.
*
* @param $result Array to show. This array is already encoded into charset_output
* @param $level
* @param $count
* @param $var
* @param $hide
* @param $subcount
* @return intr
*/
function show_ldap_content($result,$level,$count,$var,$hide=0,$subcount=0)
{
global $bc, $conf;
$count--;
if ($count == 0) return -1; // To stop loop
if (! is_array($result)) return -1;
foreach($result as $key => $val)
{
if ("$key" == "objectclass") continue;
if ("$key" == "count") continue;
if ("$key" == "dn") continue;
if ("$val" == "objectclass") continue;
$lastkey[$level]=$key;
if (is_array($val))
{
$hide=0;
if (! is_numeric($key))
{
$var=!$var;
print '