function LoadMembersNotAffected() { $ou = $_GET["LoadMembersNotAffected"]; $ldap = new clladp(); $hash_users = $ldap->hash_get_users_Only_ou($ou); if (!is_array($hash_users)) { return null; } $html = "\n\t\n\t<table style='width:400px;margin-left:10px'>"; while (list($num, $ligne) = each($hash_users)) { $arr = $ldap->UserDatas($num); $mail = $arr["mail"]; $domain = $arr["domainName"]; $html = $html . "\n\t\t<tr>\n\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t<td><a href=\"javascript:LoadUsersDatas('{$ligne}');\">{$ligne}</a></td>\n\t\t<td>{$mail}</td>\n\t\t<td>{$domain}</td>\n\t\t<td>" . imgtootltip('x.gif', '{delete}', "javascript:DeleteMember('{$ligne}','0')") . "</td>\n\t\t</tr>"; } $html = $html . "</table>"; $tpl = new templates(); return $tpl->_ENGINE_parse_body($html); }
function MEMBERS_NOT_AFFECTED($ou) { $ldap = new clladp(); $hash_users = $ldap->hash_get_users_Only_ou($ou); if (!is_array($hash_users)) { return null; } return count($hash_users); $html = "\n\t\n\t<table style='width:400px;margin-left:10px'>"; while (list($num, $ligne) = each($hash_users)) { $arr = $ldap->UserDatas($ligne); $mail = $arr["mail"]; $domain = $arr["domainName"]; $ligneEn = urlencode($ligne); $html = $html . "\n\t\t<tr>\n\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t<td><a href='domains.edit.user.php?userid={$ligne}&tab=3'>{$ligne}</a></td>\n\t\t<td>{$mail}</td>\n\t\t<td>{$domain}</td>\n\t\t<td>" . imgtootltip('x.gif', '{delete}', "javascript:DeleteMember('{$ligne}','0')") . "</td>\n\t\t</tr>"; } $html = $html . "</table>"; $tpl = new templates(); return $tpl->_ENGINE_parse_body($html); }
function BuildLevel2($ou) { $ldap = new clladp(); $privileges = new usersMenus($_GET["PRIVS"]); $HashDomains = $ldap->hash_get_domains_ou($ou); $hash_group = $ldap->hash_groups($ou); $hash_transport = $ldap->hash_load_transport(); $hash_users = $ldap->hash_get_users_Only_ou($ou); writelogs("BuildLevel2 ->{$ou} users number=" . count($hash_users), __FUNCTION__, basename(__FILE__)); if ($privileges->AllowChangeDomains == true) { if (is_array($HashDomains)) { while (list($num, $ligne) = each($HashDomains)) { $items = $items . "{\n"; $items = $items . "\t\t\t'id' : 'domain:{$ou},{$num}',\n"; $items = $items . "\t\t\t'txt' : '{$ligne}',\n"; if (isset($hash_transport[$ligne])) { $items = $items . "\t\t\t'img' : 'alias-18.gif',\n"; } else { $items = $items . "\t\t\t'img' : 'globe.gif',\n"; } $items = $items . "\t\t\t'editable' : false,\n"; $items = $items . "\t\t\t'draggable' : false\n"; $items = $items . "\t\t\t},"; } } } if (is_array($hash_users)) { if (count($hash_users) > 50) { $count = count($hash_users); $items = $items . "{\n"; $items = $items . "\t\t\t'id' : 'users:{$ou}',\n"; $items = $items . "\t\t\t'txt' : '{$count} users',\n"; $items = $items . "\t\t'openlink' : 'ldapTree.php',\n"; $items = $items . "\t\t'draggable' : true,\n"; $items = $items . "\t\t\t'img' : 'family-20.gif'\n"; $items = $items . "\t\t\t},"; } } if (is_array($hash_group)) { while (list($num, $ligne) = each($hash_group)) { $num = str_replace("'", "`", $num); if (strlen($num) > 20) { $num = substr($num, 0, 17) . "..."; } $items = $items . "{\n"; $items = $items . "\t\t\t'id' : 'group:{$ligne["gid"]}',\n"; $items = $items . "\t\t\t'txt' : '{$num}',\n"; $items = $items . "\t\t\t'img' : 'tree-groups',\n"; $items = $items . "\t\t\t'editable' : true,\n"; $items = $items . "\t\t\t'draggable' : false,\n"; $items = $items . "\t\t'onopenpopulate' : myOpenPopulate,\n"; $items = $items . "\t\t'openlink' : 'ldapTree.php',\n"; $items = $items . "\t\t'canhavechildren' : true\n"; $items = $items . "\t\t\t},"; } } if (is_array($hash_users)) { if (count($hash_users) < 50) { while (list($num, $ligne) = each($hash_users)) { $userdatas = $ldap->UserDatas($ligne); $ligne = str_replace("'", "\\'", $ligne); $name = $userdatas["displayName"]; $name = str_replace("'", "`", $name); $items = $items . "{\n"; $items = $items . "\t\t\t'id' : 'user:{$ligne}',\n"; $items = $items . "\t\t\t'txt' : '{$name}',\n"; $items = $items . "\t\t'openlink' : 'ldapTree.php',\n"; $items = $items . "\t\t'draggable' : true,\n"; $items = $items . "\t\t\t'img' : 'outicon_1002.gif'\n"; $items = $items . "\t\t\t},"; } } } if ($items[strlen($items) - 1] == ',') { $items = substr($items, 0, strlen($items) - 1); } return $items; }