Exemple #1
0
    $results = $ldap->getEntries($ldap->search($dn, $filter, $att));
    //(ldap)$results     [$i]     [$k]           [0]
    // arrayname        index   attribute   attributeposition (0)
    //print_r($results);
    //echo "<br />";  echo "<br />";
    //INJECT values
    for ($i = 0; $i < $results["count"]; $i++) {
        foreach ($person_array as $k => $v) {
            $ignore_array = ['userPassword', 'confirmuserPassword', 'dn'];
            //ignore these values inthe array for special handling or no handling
            if (!in_array($k, $ignore_array)) {
                $person_array[$k]['values'][] = $results[$i][$k][0];
                //we must input values as array as that is how builders expect them.
            }
            $person_array['dn']['value'] = $results[$i]['dn'];
            //we can override the 'values' array and set directly ONE value
        }
    }
    //print_r($person_array);
}
$controls = new \cmu\html\form\FormClient($person_array, $_POST);
$controls->buildDisplay();
echo $controls->returnDisplay();
?>



    </form>

    </body>
</html>
Exemple #2
0
 function returnDisplay()
 {
     $controls = new \cmu\html\form\FormClient($this->returnTotalArray(), $this->request);
     $controls->buildDisplay();
     return $controls->returnDisplay();
 }