function users_mailbox($dn) { $ou = $_GET["ou"]; $domain = $_GET["domain"]; $ldap = new clladp(); $hash = $ldap->GetDNValues($dn); $uid = $hash[0]["uid"][0]; $firstname = $hash[0]["givenname"][0]; $lastname = $hash[0]["sn"][0]; $cyrus = new cyrus(); if ($_SESSION["LOCK_IMAP"] == false) { if ($cyrus->connection_off == false) { if (!$cyrus->mailbox_uid($uid)) { $body = "<input type='button' value='{create_mailbox}' OnClick=\"javascript:users_create_mailbox('{$dn}','{$uid}');\">"; } else { $view_quota = users_quota($uid); $body = "<table style='width:70%'>\n\t\t\t\t\t<tr class='rowA'>\n\t\t\t\t\t<td>{mailbox_name}</td>\n\t\t\t\t\t<td><strong>user/{$uid}</strong></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr class='rowB'>\n\t\t\t\t\t<td>{set_quota}</td>\n\t\t\t\t\t<td><input type='text' id='quota' value='' style='width:50%'> Kb <input type='button' value='{set_quota} »' OnClick=\"javascript:user_set_quota('{$dn}');\" style='margin-bottom:0px'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t{$view_quota}\t\t\n\t\t\t\t\t</table>"; } } else { $body = "<strong>{imap_connection_broken}</strong>"; } } else { $body = "<strong>{imap_connection_locked}</strong>\n\t\t<center>\n\t\t<div style='margin:20px'><input type='button' value='{unlock_imap_session}' OnClick=\"javascript:imap_unlock_session()\"></div></center>"; } $tabq = user_page_tabs($dn); $html = "<fieldset style='width:90%'>\n\t\t<legend>{$firstname} {$lastname} {mailbox}</legend>\n\t\t{$tabq}\n\t\t<input type='hidden' id='dn_path' value='{$dn_path}'>\n\t\t<input type='hidden' id=ou value='{$ou}'>\n\t\t<input type='hidden' id=domain value='{$domain}'>\n\t\t<table>\n\t\t<tr>\n\t\t<td valign='top' width=1%>\n\t\t<img src='img/user-maibox.png'>\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t<center><p>{$body}</p></center>\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t</fieldset>\n\t\t</legend>\n\t\t"; $tpl = new templates(); echo DIV_SHADOW($tpl->_parse_body($html), 'windows'); }