LDAPAccountManager/lam-web/developers/phpdoc/lists/tree/_lib---tree.inc.html

1201 lines
71 KiB
HTML

<html>
<head>
<title>Docs for page tree.inc</title>
<link rel="stylesheet" type="text/css" href="../../media/style.css">
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
<tr>
<td class="header_top">lists</td>
</tr>
<tr><td class="header_line"><img src="../../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
<tr>
<td class="header_menu">
[ <a href="../../classtrees_lists.html" class="menu">class tree: lists</a> ]
[ <a href="../../elementindex_lists.html" class="menu">index: lists</a> ]
[ <a href="../../elementindex.html" class="menu">all elements</a> ]
</td>
</tr>
<tr><td class="header_line"><img src="../../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="200" class="menu">
<div id="ric">
<p><a href="../../ric_README.html">README</a></p>
<p><a href="../../ric_INSTALL.html">INSTALL</a></p>
</div>
<b>Packages:</b><br />
<a href="../../li_configuration.html">configuration</a><br />
<a href="../../li_Help.html">Help</a><br />
<a href="../../li_LDAP.html">LDAP</a><br />
<a href="../../li_lib.html">lib</a><br />
<a href="../../li_lists.html">lists</a><br />
<a href="../../li_main.html">main</a><br />
<a href="../../li_modules.html">modules</a><br />
<a href="../../li_PDF.html">PDF</a><br />
<a href="../../li_profiles.html">profiles</a><br />
<a href="../../li_selfService.html">selfService</a><br />
<a href="../../li_tests.html">tests</a><br />
<a href="../../li_tools.html">tools</a><br />
<a href="../../li_types.html">types</a><br />
<br /><br />
<b>Files:</b><br />
<div class="package">
<a href="../../lists/_templates---lists---changePassword.php.html"> changePassword.php
</a><br>
<a href="../../lists/_templates---lists---deletelink.php.html"> deletelink.php
</a><br>
<a href="../../lists/_templates---lists---list.php.html"> list.php
</a><br>
<a href="../../lists/_lib---lists.inc.html"> lists.inc
</a><br>
<a href="../../lists/_templates---lists---userlink.php.html"> userlink.php
</a><br>
</div><br />
subpackage <b>tree</b><br> <div class="package">
<a href="../../lists/tree/_templates---tree---add_attr.php.html"> add_attr.php
</a><br>
<a href="../../lists/tree/_templates---tree---add_attr_form.php.html"> add_attr_form.php
</a><br>
<a href="../../lists/tree/_templates---tree---add_oclass.php.html"> add_oclass.php
</a><br>
<a href="../../lists/tree/_templates---tree---add_oclass_form.php.html"> add_oclass_form.php
</a><br>
<a href="../../lists/tree/_templates---tree---add_value.php.html"> add_value.php
</a><br>
<a href="../../lists/tree/_templates---tree---add_value_form.php.html"> add_value_form.php
</a><br>
<a href="../../lists/tree/_templates---tree---collapse.php.html"> collapse.php
</a><br>
<a href="../../lists/tree/_templates---tree---create.php.html"> create.php
</a><br>
<a href="../../lists/tree/_templates---tree---create_form.php.html"> create_form.php
</a><br>
<a href="../../lists/tree/_templates---tree---creation_template.php.html"> creation_template.php
</a><br>
<a href="../../lists/tree/_templates---tree---templates---creation---custom.php.html"> custom.php
</a><br>
<a href="../../lists/tree/_templates---tree---delete.php.html"> delete.php
</a><br>
<a href="../../lists/tree/_templates---tree---delete_attr.php.html"> delete_attr.php
</a><br>
<a href="../../lists/tree/_templates---tree---delete_form.php.html"> delete_form.php
</a><br>
<a href="../../lists/tree/_templates---tree---download_binary_attr.php.html"> download_binary_attr.php
</a><br>
<a href="../../lists/tree/_templates---tree---edit.php.html"> edit.php
</a><br>
<a href="../../lists/tree/_templates---tree---expand.php.html"> expand.php
</a><br>
<a href="../../lists/tree/_templates---tree---export.php.html"> export.php
</a><br>
<a href="../../lists/tree/_templates---tree---export_form.php.html"> export_form.php
</a><br>
<a href="../../lists/tree/_templates---tree---templates---creation---new_ou_template.php.html"> new_ou_template.php
</a><br>
<a href="../../lists/tree/_templates---tree---rdelete.php.html"> rdelete.php
</a><br>
<a href="../../lists/tree/_templates---tree---refresh.php.html"> refresh.php
</a><br>
<a href="../../lists/tree/_templates---tree---templates---templates.inc.html"> templates.inc
</a><br>
<a href="../../lists/tree/_lib---tree.inc.html"> tree.inc
</a><br>
<a href="../../lists/tree/_templates---tree---tree.php.html"> tree.php
</a><br>
<a href="../../lists/tree/_templates---tree---tree_view.php.html"> tree_view.php
</a><br>
<a href="../../lists/tree/_templates---tree---update.php.html"> update.php
</a><br>
<a href="../../lists/tree/_templates---tree---update_confirm.php.html"> update_confirm.php
</a><br>
</div><br />
<b>Classes:</b><br />
<div class="package">
<a href="../../lists/lamBooleanListOption.html">lamBooleanListOption</a><br />
<a href="../../lists/lamGroupList.html">lamGroupList</a><br />
<a href="../../lists/lamHostList.html">lamHostList</a><br />
<a href="../../lists/lamList.html">lamList</a><br />
<a href="../../lists/lamListOption.html">lamListOption</a><br />
<a href="../../lists/lamListTool.html">lamListTool</a><br />
<a href="../../lists/lamMailAliasList.html">lamMailAliasList</a><br />
<a href="../../lists/lamSelectListOption.html">lamSelectListOption</a><br />
<a href="../../lists/lamSmbDomainList.html">lamSmbDomainList</a><br />
<a href="../../lists/lamUserList.html">lamUserList</a><br />
</div>
</td>
<td>
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
<h1>Procedural File: tree.inc</h1>
Source Location: /lib/tree.inc<br /><br />
<br>
<br>
<h2>Page Details:</h2>
This function displays the LDAP tree for all the servers that you have<br /><br /><p>in config.php. We read the session variable 'tree' to know which dns are expanded or collapsed. No query string parameters are expected, however, you can use a '#' offset to scroll to a given dn. The syntax is tree.php#&lt;rawurlencoded dn&gt;, so if I wanted to scroll to dc=example,dc=com for server 3, the URL would be: tree.php#3_dc%3Dexample%2Cdc%3Dcom</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>author:</b>&nbsp;&nbsp;</td><td>David Smith</td>
</tr>
<tr>
<td><b>author:</b>&nbsp;&nbsp;</td><td>Roland Gruber</td>
</tr>
</table>
</div>
<br /><br />
<br /><br />
<br /><br />
<br />
<hr />
<a name="functionarrayLower"></a>
<h3>arrayLower <span class="smalllinenumber">[line 940]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void arrayLower(
$array)</code>
</td></tr></table>
</td></tr></table><br />
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>$array</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionarray_stripslashes"></a>
<h3>array_stripslashes <span class="smalllinenumber">[line 61]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void array_stripslashes(
&$array, Array $array)</code>
</td></tr></table>
</td></tr></table><br />
Strips all slashes from the specified array in place (pass by ref).<br /><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">Array&nbsp;&nbsp;</td>
<td><b>$array</b>&nbsp;&nbsp;</td>
<td>The array to strip slashes from, typically one of $_GET, $_POST, or $_COOKIE.</td>
</tr>
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>&$array</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionbuild_initial_tree_icons"></a>
<h3>build_initial_tree_icons <span class="smalllinenumber">[line 209]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void build_initial_tree_icons(
)</code>
</td></tr></table>
</td></tr></table><br />
Builds the initial array that stores the icon-lookup for each server's DN in the tree browser. The returned<br /><br /><p>array is then stored in the current session. The structure of the returned array is simple, and looks like this: <ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;dcobject.png&quot;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-id">o</span>=<span class="src-id">Corporation</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;o.png&quot;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
</ol> This function is not meant as a user-callable function, but rather a convenient, automated method for setting up the initial data structure for the tree viewer's icon cache.</p><br /> <br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functiondn_exists"></a>
<h3>dn_exists <span class="smalllinenumber">[line 228]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>bool dn_exists(
string $dn)</code>
</td></tr></table>
</td></tr></table><br />
Gets whether an entry exists based on its DN. If the entry exists, returns true. Otherwise returns false.<br /><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN of the entry of interest.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functiondraw_formatted_dn"></a>
<h3>draw_formatted_dn <span class="smalllinenumber">[line 676]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void draw_formatted_dn(
$dn)</code>
</td></tr></table>
</td></tr></table><br />
Gets a DN string using the user-configured tree_display_format string to format it.<br /><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functiondraw_jpeg_photos"></a>
<h3>draw_jpeg_photos <span class="smalllinenumber">[line 1151]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void draw_jpeg_photos(
string $dn, [string $attr_name = &#039;jpegPhoto&#039;], [bool $draw_delete_buttons = false], [bool $draw_bytes_and_size = true], [string $table_html_attrs = &#039;align=&amp;quot;left&amp;quot;&#039;], [ $img_html_attrs = &#039;&#039;])</code>
</td></tr></table>
</td></tr></table><br />
Draw the jpegPhoto image(s) for an entry wrapped in HTML. Many options are available to specify how the images are to be displayed.<br /><br /><p>Usage Examples: <ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../lists/tree/_lib---tree.inc.html#functiondraw_jpeg_photos">draw_jpeg_photos</a><span class="src-sym">(&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;cn=Bob,ou=People,dc=example,dc=com&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;jpegPhoto&quot;&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;border:&nbsp;1px;&nbsp;width:&nbsp;150px&quot;&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../lists/tree/_lib---tree.inc.html#functiondraw_jpeg_photos">draw_jpeg_photos</a><span class="src-sym">(&nbsp;</span><span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;cn=Fred,ou=People,dc=example,dc=com&quot;&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN of the entry that contains the jpeg attribute you want to draw.</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$attr_name</b>&nbsp;&nbsp;</td>
<td>The name of the attribute containing the jpeg data (usually 'jpegPhoto').</td>
</tr>
<tr>
<td class="type">bool&nbsp;&nbsp;</td>
<td><b>$draw_delete_buttons</b>&nbsp;&nbsp;</td>
<td>If true, draws a button beneath the image titled 'Delete' allowing the user to delete the jpeg attribute by calling JavaScript function deleteAttribute() provided in the default modification template.</td>
</tr>
<tr>
<td class="type">bool&nbsp;&nbsp;</td>
<td><b>$draw_bytes_and_size</b>&nbsp;&nbsp;</td>
<td>If true, draw text below the image indicating the byte size and dimensions.</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$table_html_attrs</b>&nbsp;&nbsp;</td>
<td>Specifies optional CSS style attributes for the table tag.</td>
</tr>
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>$img_html_attrs</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functiondraw_server_tree"></a>
<h3>draw_server_tree <span class="smalllinenumber">[line 73]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void draw_server_tree(
)</code>
</td></tr></table>
</td></tr></table><br />
Prints the HTML of the tree view.<br /><br /> <br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionget_container"></a>
<h3>get_container <span class="smalllinenumber">[line 1329]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string get_container(
string $dn)</code>
</td></tr></table>
</td></tr></table><br />
Given a DN string, this returns the parent container portion of the string.<br /><br /><p>For example. given 'cn=Manager,dc=example,dc=com', this function returns 'dc=example,dc=com'.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>The container</td>
</tr>
<tr>
<td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../../lists/tree/_lib---tree.inc.html#functionget_rdn">get_rdn()</a></td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN whose container string to return.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionget_container_contents"></a>
<h3>get_container_contents <span class="smalllinenumber">[line 274]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array get_container_contents(
string $dn, [int $size_limit = 0], [string $filter = &#039;(objectClass=*)&#039;])</code>
</td></tr></table>
</td></tr></table><br />
Gets a list of child entries for an entry. Given a DN, this function fetches the list of DNs of child entries one level beneath the parent. For example, for the following tree:<br /><br /><p><ol><li><div class="src-line">&nbsp;<span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-id">ou</span>=<span class="src-id">People</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Dave</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Fred</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Joe</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">ou</span>=<span class="src-id">More&nbsp;People</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Mark</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Bob</span></div></li>
</ol></p><p>Calling <ol><li><div class="src-line"><a href="../../lists/tree/_lib---tree.inc.html#functionget_container_contents">get_container_contents</a><span class="src-sym">(&nbsp;</span><span class="src-str">&quot;ou=people,dc=example,dc=com&quot;&nbsp;</span><span class="src-sym">)</span></div></li>
</ol> would return the following list:</p><p><ol><li><div class="src-line">&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Dave</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Fred</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Joe</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-id">ou</span>=<span class="src-id">More&nbsp;People</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>An array of DN strings listing the immediate children of the specified entry.</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN of the entry whose children to return.</td>
</tr>
<tr>
<td class="type">int&nbsp;&nbsp;</td>
<td><b>$size_limit</b>&nbsp;&nbsp;</td>
<td>(optional) The maximum number of entries to return. If unspecified, no limit is applied to the number of entries in the returned.</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$filter</b>&nbsp;&nbsp;</td>
<td>(optional) An LDAP filter to apply when fetching children, example: &quot;(objectClass=inetOrgPerson)&quot;</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionget_enc_type"></a>
<h3>get_enc_type <span class="smalllinenumber">[line 1121]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void get_enc_type(
$user_password)</code>
</td></tr></table>
</td></tr></table><br />
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>$user_password</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionget_entry_system_attrs"></a>
<h3>get_entry_system_attrs <span class="smalllinenumber">[line 912]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array get_entry_system_attrs(
string $dn, [int $deref = LDAP_DEREF_NEVER])</code>
</td></tr></table>
</td></tr></table><br />
Gets the operational attributes for an entry. Given a DN, this function fetches that entry's<br /><br /><p>operational (ie, system or internal) attributes. These attributes include &quot;createTimeStamp&quot;, &quot;creatorsName&quot;, and any other attribute that the LDAP server sets automatically. The returned associative array is of this form: <ol><li><div class="src-line">&nbsp;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-id">creatorsName</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;cn=Admin,dc=example,dc=com&quot;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-id">createTimeStamp</span><span class="src-sym">]</span>=&gt;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;10401040130&quot;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-id">hasSubordinates</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;FALSE&quot;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>An associative array whose keys are attribute names and whose values are arrays of values for the aforementioned attribute.</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN of the entry whose interal attributes are desired.</td>
</tr>
<tr>
<td class="type">int&nbsp;&nbsp;</td>
<td><b>$deref</b>&nbsp;&nbsp;</td>
<td>For aliases and referrals, this parameter specifies whether to follow references to the referenced DN or to fetch the attributes for the referencing DN. See http://php.net/ldap_search for the 4 valid options.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionget_icon"></a>
<h3>get_icon <span class="smalllinenumber">[line 311]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string get_icon(
string $dn)</code>
</td></tr></table>
</td></tr></table><br />
Given a DN and server ID, this function reads the DN's objectClasses and<br /><br /><p>determines which icon best represents the entry. The results of this query are cached in a session variable so it is not run every time the tree browser changes, just when exposing new DNs that were not displayed previously. That means we can afford a little bit of inefficiency here in favor of coolness. :)</p><p>This function returns a string like &quot;country.png&quot;. All icon files are assumed to be contained in the /../../graphics/ directory of phpLDAPadmin.</p><p>Developers are encouraged to add new icons to the images directory and modify this function as needed to suit their types of LDAP entries. If the modifications are general to an LDAP audience, the phpLDAPadmin team will gladly accept them as a patch.</p><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN of the entry whose icon you wish to fetch.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionget_object_attr"></a>
<h3>get_object_attr <span class="smalllinenumber">[line 455]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void get_object_attr(
string $dn, string $attr, bool $lower_case_attr_names)</code>
</td></tr></table>
</td></tr></table><br />
Much like get_object_attrs(), but only returns the values for one attribute of an object. Example calls:<br /><br /><p><ol><li><div class="src-line">&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(&nbsp;</span><a href="../../lists/tree/_lib---tree.inc.html#functionget_object_attr">get_object_attr</a><span class="src-sym">(&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;cn=Bob,ou=people,dc=example,dc=com&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;sn&quot;&nbsp;</span><span class="src-sym">)&nbsp;)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;prints:</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;Array</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;(</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[0]&nbsp;=&gt;&nbsp;&quot;Smith&quot;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;)</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(&nbsp;</span><a href="../../lists/tree/_lib---tree.inc.html#functionget_object_attr">get_object_attr</a><span class="src-sym">(&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;cn=Bob,ou=people,dc=example,dc=com&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;objectClass&quot;&nbsp;</span><span class="src-sym">)&nbsp;)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;prints:</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;Array</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;(</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[0]&nbsp;=&gt;&nbsp;&quot;top&quot;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[1]&nbsp;=&gt;&nbsp;&quot;person&quot;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;)</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../../lists/tree/_lib---tree.inc.html#functionget_object_attrs">get_object_attrs()</a></td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The distinguished name (DN) of the entry whose attributes/values to fetch.</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$attr</b>&nbsp;&nbsp;</td>
<td>The attribute whose value(s) to return (ie, &quot;objectClass&quot;, &quot;cn&quot;, &quot;userPassword&quot;)</td>
</tr>
<tr>
<td class="type">bool&nbsp;&nbsp;</td>
<td><b>$lower_case_attr_names</b>&nbsp;&nbsp;</td>
<td>(optional) If true, all keys of the returned associative array will be lower case. Otherwise, they will be cased as the LDAP server returns them.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionget_object_attrs"></a>
<h3>get_object_attrs <span class="smalllinenumber">[line 750]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array get_object_attrs(
string $dn, [bool $lower_case_attr_names = false], [int $deref = LDAP_DEREF_NEVER])</code>
</td></tr></table>
</td></tr></table><br />
Gets the attributes/values of an entry. Returns an associative array whose<br /><br /><p>keys are attribute value names and whose values are arrays of values for said attribute. Optionally, callers may specify true for the parameter $lower_case_attr_names to force all keys in the associate array (attribute names) to be lower case.</p><p>Sample return value of <ol><li><div class="src-line"><a href="../../lists/tree/_lib---tree.inc.html#functionget_object_attrs">get_object_attrs</a><span class="src-sym">(&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;cn=Bob,ou=pepole,dc=example,dc=com&quot;&nbsp;</span><span class="src-sym">)</span></div></li>
</ol></p><p><ol><li><div class="src-line">&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-id">objectClass</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-id">person</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-id">top</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-id">cn</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-id">Bob</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-id">sn</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-id">Jones</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-id">dn</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Bob</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">pepole</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../../lists/tree/_lib---tree.inc.html#functionget_object_attr">get_object_attr()</a></td>
</tr>
<tr>
<td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../../lists/tree/_lib---tree.inc.html#functionget_entry_system_attrs">get_entry_system_attrs()</a></td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The distinguished name (DN) of the entry whose attributes/values to fetch.</td>
</tr>
<tr>
<td class="type">bool&nbsp;&nbsp;</td>
<td><b>$lower_case_attr_names</b>&nbsp;&nbsp;</td>
<td>(optional) If true, all keys of the returned associative array will be lower case. Otherwise, they will be cased as the LDAP server returns them.</td>
</tr>
<tr>
<td class="type">int&nbsp;&nbsp;</td>
<td><b>$deref</b>&nbsp;&nbsp;</td>
<td>For aliases and referrals, this parameter specifies whether to follow references to the referenced DN or to fetch the attributes for the referencing DN. See http://php.net/ldap_search for the 4 valid options.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionget_rdn"></a>
<h3>get_rdn <span class="smalllinenumber">[line 489]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string get_rdn(
string $dn, [bool $include_attrs = 0])</code>
</td></tr></table>
</td></tr></table><br />
Given a DN string, this returns the 'RDN' portion of the string.<br /><br /><p>For example. given 'cn=Manager,dc=example,dc=com', this function returns 'cn=Manager' (it is really the exact opposite of get_container()).</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>The RDN</td>
</tr>
<tr>
<td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../../lists/tree/_lib---tree.inc.html#functionget_container">get_container()</a></td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN whose RDN to return.</td>
</tr>
<tr>
<td class="type">bool&nbsp;&nbsp;</td>
<td><b>$include_attrs</b>&nbsp;&nbsp;</td>
<td>If true, include attributes in the RDN string. See http://php.net/ldap_explode_dn for details</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functioninitialize_session_tree"></a>
<h3>initialize_session_tree <span class="smalllinenumber">[line 172]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void initialize_session_tree(
)</code>
</td></tr></table>
</td></tr></table><br />
Checks and fixes an initial session's tree cache if needed.<br /><br /><p>This function is not meant as a user-callable function, but rather a convenient, automated method for checking the initial data structure of the session.</p><br /> <br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionis_attr_binary"></a>
<h3>is_attr_binary <span class="smalllinenumber">[line 802]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>bool is_attr_binary(
string $attr_name)</code>
</td></tr></table>
</td></tr></table><br />
Given an attribute name and server ID number, this function returns whether the attrbiute may contain binary data. This is useful for developers who wish to display the contents of an arbitrary attribute but don't want to dump binary data on the page.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../../lists/tree/_lib---tree.inc.html#functionis_jpeg_photo">is_jpeg_photo()</a></td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$attr_name</b>&nbsp;&nbsp;</td>
<td>The name of the attribute to test.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionis_attr_boolean"></a>
<h3>is_attr_boolean <span class="smalllinenumber">[line 988]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>bool is_attr_boolean(
string $attr_name)</code>
</td></tr></table>
</td></tr></table><br />
Given an attribute name and server ID number, this function returns whether the attrbiute contains boolean data. This is useful for developers who wish to display the contents of a boolean attribute with a drop-down.<br /><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$attr_name</b>&nbsp;&nbsp;</td>
<td>The name of the attribute to test.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionis_dn_attr"></a>
<h3>is_dn_attr <span class="smalllinenumber">[line 1095]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>bool is_dn_attr(
string $attr_name)</code>
</td></tr></table>
</td></tr></table><br />
Returns true if the attribute specified is required to take as input a DN.<br /><br /><p>Some examples include 'distinguishedName', 'member' and 'uniqueMember'.</p><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$attr_name</b>&nbsp;&nbsp;</td>
<td>The name of the attribute of interest (case insensitive)</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionis_jpeg_photo"></a>
<h3>is_jpeg_photo <span class="smalllinenumber">[line 956]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>bool is_jpeg_photo(
string $attr_name)</code>
</td></tr></table>
</td></tr></table><br />
Used to determine if the specified attribute is indeed a jpegPhoto. If the specified attribute is one that houses jpeg data, true is returned. Otherwise this function returns false.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../../lists/tree/_lib---tree.inc.html#functiondraw_jpeg_photos">draw_jpeg_photos()</a></td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$attr_name</b>&nbsp;&nbsp;</td>
<td>The name of the attribute to test.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionis_mail_string"></a>
<h3>is_mail_string <span class="smalllinenumber">[line 1008]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>bool is_mail_string(
string $str)</code>
</td></tr></table>
</td></tr></table><br />
Get whether a string looks like an email address (user@example.com).<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>Returns true if the specified string looks like an email address or false otherwise.</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$str</b>&nbsp;&nbsp;</td>
<td>The string to analyze.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionis_multi_line_attr"></a>
<h3>is_multi_line_attr <span class="smalllinenumber">[line 1056]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>bool is_multi_line_attr(
string $attr_name, [string $val = null])</code>
</td></tr></table>
</td></tr></table><br />
Determines if an attribute's value can contain multiple lines. Attributes that fall in this multi-line category may be configured in config.php. Hence, this function accesses the global variable $multi_line_attributes;<br /><br /><p>Usage example: <ol><li><div class="src-line">&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><span class="src-id">is_muli_line_attr</span><span class="src-sym">(&nbsp;</span><span class="src-str">&quot;postalAddress&quot;&nbsp;</span><span class="src-sym">)&nbsp;)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;&lt;textarea&nbsp;name=\&quot;postalAddress\&quot;&gt;&lt;/textarea&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;&lt;input&nbsp;name=\&quot;postalAddress\&quot;&nbsp;type=\&quot;text\&quot;&gt;&quot;</span><span class="src-sym">;</span></div></li>
</ol></p><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$attr_name</b>&nbsp;&nbsp;</td>
<td>The name of the attribute of interestd (case insensivite)</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$val</b>&nbsp;&nbsp;</td>
<td>(optional) The current value of the attribute (speeds up the process by searching for carriage returns already in the attribute value)</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionis_url_string"></a>
<h3>is_url_string <span class="smalllinenumber">[line 1024]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>bool is_url_string(
string $str)</code>
</td></tr></table>
</td></tr></table><br />
Get whether a string looks like a web URL (http://www.example.com/)<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>Returns true if the specified string looks like a web URL or false otherwise.</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$str</b>&nbsp;&nbsp;</td>
<td>The string to analyze.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionpla_compare_dns"></a>
<h3>pla_compare_dns <span class="smalllinenumber">[line 591]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>int pla_compare_dns(
string $dn1, string $dn2)</code>
</td></tr></table>
</td></tr></table><br />
Compares 2 DNs. If they are equivelant, returns 0, otherwise, returns their sorting order (similar to strcmp()): Returns &lt; 0 if dn1 is less than dn2.<br /><br /><p>Returns &gt; 0 if dn1 is greater than dn2.</p><p>The comparison is performed starting with the top-most element of the DN. Thus, the following list: <ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">ou</span>=<span class="src-id">people</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Admin</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">People</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Joe</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">people</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Fred</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">people</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">org</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Dave</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">people</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">org</span></div></li>
</ol> Will be sorted thus using usort( $list, &quot;pla_compare_dns&quot; ): <ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">ou</span>=<span class="src-id">people</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Admin</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">People</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Joe</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">people</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Dave</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">people</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">org</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Fred</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">people</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">org</span></div></li>
</ol></p><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn1</b>&nbsp;&nbsp;</td>
<td>The first of two DNs to compare</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn2</b>&nbsp;&nbsp;</td>
<td>The second of two DNs to compare</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionpla_explode_dn"></a>
<h3>pla_explode_dn <span class="smalllinenumber">[line 521]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array pla_explode_dn(
string $dn, [ $with_attributes = 0], int $with_attriutes)</code>
</td></tr></table>
</td></tr></table><br />
Explode a DN into an array of its RDN parts. This function is UTF-8 safe and replaces the buggy PHP ldap_explode_dn() which does not properly handle UTF-8 DNs and also causes segmentation faults with some inputs.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>An array of RDN parts of this format: <ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-key">Array</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-id">uid</span>=<span class="src-id">ppratt</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-id">ou</span>=<span class="src-id">People</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-id">dc</span>=<span class="src-id">example</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">[</span><span class="src-num">3</span><span class="src-sym">]&nbsp;</span>=&gt;&nbsp;<span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
</ol></td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN to explode.</td>
</tr>
<tr>
<td class="type">int&nbsp;&nbsp;</td>
<td><b>$with_attriutes</b>&nbsp;&nbsp;</td>
<td>(optional) Whether to include attribute names (see http://php.net/ldap_explode_dn for details)</td>
</tr>
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>$with_attributes</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionpla_ldap_search"></a>
<h3>pla_ldap_search <span class="smalllinenumber">[line 1255]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void pla_ldap_search(
string $filter, [string $base_dn = null], [array $attrs = array()], [string $scope = &#039;sub&#039;], [bool $sort_results = true], [int $deref = LDAP_DEREF_ALWAYS])</code>
</td></tr></table>
</td></tr></table><br />
A handy ldap searching function very similar to PHP's ldap_search() with the following exceptions: Callers may specify a search scope and the return value is an array containing the search results rather than an LDAP result resource.<br /><br /><p>Example usage: <ol><li><div class="src-line">&nbsp;<span class="src-var">$samba_users&nbsp;</span>=&nbsp;<a href="http://www.php.net/ldap_search">ldap_search</a><span class="src-sym">(&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;(&amp;(objectClass=sambaAccount)(objectClass=posixAccount))&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;ou=People,dc=example,dc=com&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(&nbsp;</span><span class="src-str">&quot;uid&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;homeDirectory&quot;&nbsp;</span><span class="src-sym">)&nbsp;)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(&nbsp;</span><span class="src-var">$samba_users&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;prints&nbsp;(for&nbsp;example):</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;Array</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;(</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[uid=jsmith,ou=People,dc=example,dc=com]&nbsp;=&gt;&nbsp;Array</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dn]&nbsp;=&gt;&nbsp;&quot;uid=jsmith,ou=People,dc=example,dc=com&quot;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[uid]&nbsp;=&gt;&nbsp;&quot;jsmith&quot;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[homeDirectory]&nbsp;=&gt;&nbsp;&quot;\\server\jsmith&quot;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[uid=byoung,ou=People,dc=example,dc=com]&nbsp;=&gt;&nbsp;Array</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dn]&nbsp;=&gt;&nbsp;&quot;uid=byoung,ou=Samba,ou=People,dc=example,dc=com&quot;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[uid]&nbsp;=&gt;&nbsp;&quot;byoung&quot;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[homeDirectory]&nbsp;=&gt;&nbsp;&quot;\\server\byoung&quot;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;)</span></div></li>
</ol></p><p>WARNING: This function will use a lot of memory on large searches since the entire result set is stored in a single array. For large searches, you should consider sing the less memory intensive PHP LDAP API directly (ldap_search(), ldap_next_entry(), ldap_next_attribute(), etc).</p><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$filter</b>&nbsp;&nbsp;</td>
<td>The LDAP filter to use when searching (example: &quot;(objectClass=*)&quot;) (see RFC 2254)</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$base_dn</b>&nbsp;&nbsp;</td>
<td>The DN of the base of search.</td>
</tr>
<tr>
<td class="type">array&nbsp;&nbsp;</td>
<td><b>$attrs</b>&nbsp;&nbsp;</td>
<td>An array of attributes to include in the search result (example: array( &quot;objectClass&quot;, &quot;uid&quot;, &quot;sn&quot; )).</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$scope</b>&nbsp;&nbsp;</td>
<td>The LDAP search scope. Must be one of &quot;base&quot;, &quot;one&quot;, or &quot;sub&quot;. Standard LDAP search scope.</td>
</tr>
<tr>
<td class="type">bool&nbsp;&nbsp;</td>
<td><b>$sort_results</b>&nbsp;&nbsp;</td>
<td>Specify false to not sort results by DN or true to have the returned array sorted by DN (uses ksort)</td>
</tr>
<tr>
<td class="type">int&nbsp;&nbsp;</td>
<td><b>$deref</b>&nbsp;&nbsp;</td>
<td>When handling aliases or referrals, this specifies whether to follow referrals. Must be one of LDAP_DEREF_ALWAYS, LDAP_DEREF_NEVER, LDAP_DEREF_SEARCHING, or LDAP_DEREF_FINDING. See the PHP LDAP API for details.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionpla_reverse_dn"></a>
<h3>pla_reverse_dn <span class="smalllinenumber">[line 657]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string pla_reverse_dn(
string $dn)</code>
</td></tr></table>
</td></tr></table><br />
Reverses a DN such that the top-level RDN is first and the bottom-level RDN is last<br /><br /><p>For example: <ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-id">cn</span>=<span class="src-id">Brigham</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">People</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">com</span></div></li>
</ol> Becomes: <ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-id">dc</span>=<span class="src-id">com</span><span class="src-sym">,</span><span class="src-id">dc</span>=<span class="src-id">example</span><span class="src-sym">,</span><span class="src-id">ou</span>=<span class="src-id">People</span><span class="src-sym">,</span><span class="src-id">cn</span>=<span class="src-id">Brigham</span></div></li>
</ol> This makes it possible to sort lists of DNs such that they are grouped by container.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>The reversed DN</td>
</tr>
<tr>
<td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../../lists/tree/_lib---tree.inc.html#functionpla_compare_dns">pla_compare_dns()</a></td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN to reverse</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionpretty_print_dn"></a>
<h3>pretty_print_dn <span class="smalllinenumber">[line 546]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string pretty_print_dn(
string $dn)</code>
</td></tr></table>
</td></tr></table><br />
Returns an HTML-beautified version of a DN.<br /><br /><p>Internally, this function makes use of pla_explode_dn() to break the the DN into its components. It then glues them back together with &quot;pretty&quot; HTML. The returned HTML is NOT to be used as a real DN, but simply displayed.</p><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$dn</b>&nbsp;&nbsp;</td>
<td>The DN to pretty-print.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionreal_attr_name"></a>
<h3>real_attr_name <span class="smalllinenumber">[line 875]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string real_attr_name(
string $attr_name)</code>
</td></tr></table>
</td></tr></table><br />
Prunes off anything after the &quot;;&quot; in an attr name. This is useful for attributes that may have &quot;;binary&quot; appended to their names. With real_attr_name(), you can more easily fetch these attributes' schema with their &quot;real&quot; attribute name.<br /><br /> <br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$attr_name</b>&nbsp;&nbsp;</td>
<td>The name of the attribute to examine.</td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<hr />
<a name="functionsortAttrs"></a>
<h3>sortAttrs <span class="smalllinenumber">[line 1034]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void sortAttrs(
$a, $b)</code>
</td></tr></table>
</td></tr></table><br />
<br /><br />
<h4>Parameters</h4>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>$a</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
<tr>
<td class="type">&nbsp;&nbsp;</td>
<td><b>$b</b>&nbsp;&nbsp;</td>
<td></td>
</tr>
</table>
<div class="top">[ <a href="#top">Top</a> ]</div><br /><br />
</div>
<div class="credit">
<hr />
Documentation generated on Sun, 06 Jan 2008 18:59:32 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.0</a>
</div>
</td></tr></table>
</td>
</tr>
</table>
</body>
</html>