nerovnaka velkost paramListov'; return; }; for ($i=0;$i$options[$i]\n"; } else { echo "\n"; }; }; }; /* //navrhnute pre tlac tabuliek function printRecordArray($nazov, $data, $showCount=true){ if(is_array($value)) { echo ''.$nazov.'\n'; for($k=0; $k < $data[count]; $k++) { if ($k>0) echo ''; echo "".$data[$k].""; }; } else { //not array echo ''.$nazov.'\n'; echo "".$data.""; }; }; function getRecordAttribList($record,$atributy){ while(list($key,$value) = each($record[$i])) { if(is_array($value)) { switch ($key){ case "cn": $_cn=$value; break; case "sn": $_sn=$value; break; case "givenName": $_givenName=$value; break; case "mail": $_mail=$value; break; case "ou": $_ou=$value; break; case "du": $_du=$value; break; case "usercertificate": $_userCertif=$value; break; default: echo "unknown attribute $key=$value
\n"; break; }; } //if value=array } //while $retval[]=$givenName." ".$sn; $retval[]=$mail; }; */ //vstupom je zoznam atributov tvaru "a1,a2,a3,a4", vystupom je array vysledkov function getRecordAttribList($record,$atributy){ $attr=explode(",",$atributy); for ($i=0; $i\n"; if (count($record[$a])<3){ //magic number 3. single value ma cislo 2, je tam hodnota a skalar s cislom, //od troch zacinaju multivalue atributy (skalar s cislom a DVE dalsie hodnoty) $retval[]=$record[$a][0]; } else { $retval[]=$record[$a]; //cele pole, kvoli multivalue hodnotam }; }; return($retval); }; //vstupom je 2d pole a index, vystupom je vektor - rez vstupnym polom na zadanom indexe function getArraySlice($src,$index){ for ($i=0;$i '); }; function iconDef2($name, $yes, $text="", $nosize=0){ $retval = ' $newParent = "ou=users,dc=acme,dc=com";
ldap_set_option($ds,LDAP_OPT_PROTOCOL_VERSION,3); $result = ldap_rename($ds, $TheDN, $newRDN, $newParent, TRUE); } */ //vrati 0/1 podla toho ci je nastaveny konkretny bit (flag) pre danu polozku v $scheme function getSchemaFlag($i,$flag){ global $schema; return(0!=($schema[$i][2] & $flag)); //ta 0!= je tam kvoli prechodu z bitovej hodnoty (1,2,4,8, ...) na jednoduche 0/1 }; ?>