function users_table($ou = null, $domain = null) { $ldap = new clladp(); $cyrus = new cyrus(); $cyrus->LoadMailBox(); $array_mailboxes = $_SESSION["array_mailboxes"]; if ($ou == null) { $ou = $_GET["ou"]; } else { $_GET["ou"] = $ou; } if ($domain == null) { $domain = $_GET["domain"]; } $_GET["domain"] = $domain; $hash = $ldap->HashGetUsersAccounts($ou, $_GET["domain"]); if (is_array($hash)) { $html = "\n\t\t<center>\n\t\t<table>\n\t\t<tr class='rowT'>\n\t\t\t<td nowrap width=1% colspan=2> </td>\n\t\t\t<td nowrap width=1%>{firstname}</td>\n\t\t\t<td nowrap width=1%>{lastname}</td>\t\t\t\n\t\t\t<td nowrap width=1%>{email}</td>\n\t\t\t<td nowrap width=1%> </td>\n\t\t\t\n\t\t</tr>"; while (list($num, $ligne) = each($hash)) { if ($ligne["cn"] != null) { if ($_SESSION["LOCK_IMAP"] == true) { $mailbox = "<img src='img/mailbox_bad_status.gif'>"; } else { if ($array_mailboxes[$ligne["uid"]] == "yes") { $mailbox = "<img src='img/mailbox.gif'>"; } else { $mailbox = " "; } } $html = $html . "<tr class='rowA' OnMouseOver=\"javascript:this.className = 'rowB';\" OnMouseOut=\"javascript:this.className = 'rowA';\">\n\t\t\t<td width=1%><img src='img/nomail.gif' style='border:0px;cursor:pointer' OnClick=\"javascript:editmailbox('{$ligne["dn"]}','{$ou}','{$domain}','0');\" onMouseOver=\"javascript:AffBulle('{edit_user}');\" OnMouseOut=\"javascript:HideBulle();\"></td>\n\t\t\t<td width=1%>{$mailbox}</td>\n\t\t\t<td> {$ligne["first_name"]} </td>\n\t\t\t<td> {$ligne["last_name"]} </td>\n\t\t\t<td> {$ligne["mail"]} </td>\n\t\t\t<td> <a href=\"#\" OnClick=\"javascript:del_user('{$ligne["dn"]}','{$ou}','{$domain}');\"><img src='img/x.gif' onMouseOver=\"javascript:AffBulle('{delete_thisuser}');\" OnMouseOut=\"javascript:HideBulle();\"></a> </td>\n\t\t\t</tr>"; } } $html = $html . "</table></center>"; } if ($html != null) { $tpl = new templates(); return $tpl->_parse_body($html); } }