예제 #1
0
<?elseif ($tabStep == 2 && $dataSource == "ldap"):?>

	<tr class="adm-detail-required-field">
		<td width="50%"><?php 
echo GetMessage("USER_IMPORT_LDAP_SERVER");
?>
:</td>
		<td width="50%">
			<select name="ldapServer" onChange="OnLdapSelect(this.selectedIndex - 1);">
				<option value="0"><?php 
echo GetMessage("USER_IMPORT_SELECT_FROM_LIST");
?>
</option>
			<?
			$arAllFields = CLDAPUtil::GetSynFields(); // all user fields that are currently set up in the system

			$arFieldMaps = array();
			$indSelected = -1;
			$i=-1;
			$dbLdap = CLdapServer::GetList(array("NAME" => "ASC"), array("ACTIVE" => "Y"));
			while ($arLdap = $dbLdap->GetNext()):
				$i++;
				$map = $arLdap["FIELD_MAP"];
				foreach ($map as $user_f=>$ldap_f)
				{
					if (!array_key_exists($user_f,$arAllFields))
					{
						unset($map[$user_f]);
					}
				}
예제 #2
0
} elseif ($tabStep == 2 && $dataSource == "ldap") {
    ?>

	<tr class="adm-detail-required-field">
		<td width="50%"><?php 
    echo GetMessage("USER_IMPORT_LDAP_SERVER");
    ?>
:</td>
		<td width="50%">
			<select name="ldapServer" onChange="OnLdapSelect(this.selectedIndex - 1);">
				<option value="0"><?php 
    echo GetMessage("USER_IMPORT_SELECT_FROM_LIST");
    ?>
</option>
			<?php 
    $arAllFields = CLDAPUtil::GetSynFields();
    // all user fields that are currently set up in the system
    $arFieldMaps = array();
    $indSelected = -1;
    $i = -1;
    $dbLdap = CLdapServer::GetList(array("NAME" => "ASC"), array("ACTIVE" => "Y"));
    while ($arLdap = $dbLdap->GetNext()) {
        $i++;
        $map = $arLdap["FIELD_MAP"];
        foreach ($map as $user_f => $ldap_f) {
            if (!array_key_exists($user_f, $arAllFields)) {
                unset($map[$user_f]);
            }
        }
        $arFieldMaps[] = $map;
        ?>