function kav4mailservers($domain = null) { if ($domain != null) { $_GET["domain"] = $domain; } $mailbox = new MailBoxes(); if ($mailbox->global_config["_GLOBAL"]["kav_mail"] = false) { writelogs("Kaspersky for Mail server is not enabled...", __FUNCTION__, __FILE__); return " "; } $kav4mailservers = new kav4mailservers(); if ($kav4mailservers->IsDomainLicenced($_GET["domain"]) == false) { $check = Field_checkbox('kav4mailservers_enabled', 1, 0); $checked = false; } else { $check = Field_checkbox('kav4mailservers_enabled', 1, 1); $checked = true; } if ($checked == true) { $rouage = "<a href=\"javascript:LoadKasperskySettings('{$_GET["domain"]}');\"><img src='img/rouage2.png' onMouseOver=\"javascript:AffBulle('{js_antivirus_settings}');\" OnMouseOut=\"javascript:HideBulle();\"></a>"; } $html = "<table style='width:250px'>\n\t<tr class=rowT>\n\t<td colspan=3>{antivirus_protection}</td>\n\t</tr>\n\t<tr class=rowA align='right'>\n\t<td>{antivirus_protection_enabled}</td>\n\t<td width=1%>{$check}</td>\n\t<td width='1%'>{$rouage}</td>\n\t</tr>\n\t<tr class rowB>\n\t<td align='right' colspan=2>\n\t<input type='button' value='{bt_edit_antivirus_protection}' OnClick=\"javascript:edit_antivirus_protection('{$_GET["domain"]}');\" style='float:right'>\n\t</td>\n\t<td> </td>\n\t</table>\n\t"; $tpl = new templates(); $html = $tpl->_parse_body($html); return $html; }
function List_domains($ou = null) { if ($ou == null) { return null; } $ldap = new clladp(); $hash = $ldap->hash_get_domains_ou($ou); $kav4mailservers = new kav4mailservers(); if (!is_array($hash)) { return null; } $html = "\n\t<fieldset>\n\t<legend>{ARRAY_TITLE}</legend>\n\t<table style='width:95%' align='center'>\n\t<tr class=rowT>\n\t\t\n\t\t<td colspan=2> </TD>\n\t\t<td nowrap>{ARRAY_TITLE_TRANSPORT}</TD>\n\t\t<td nowrap>{ARRAY_TITLE_USERS}</TD>\n\t\t<td nowrap>{ARRAY_TITLE_AV}</TD>\n\t\t<td> </TD>\n\t\n\t</TR>\n\t"; while (list($num, $ligne) = each($hash)) { if ($class = 'rowA') { $class = 'rowB'; } else { $class = "rowA"; } $users_numbers = 0; $users_numbers = $ldap->HashGetUsersAccounts($ou, $ligne); $redirect = $ldap->GetTransportTable($ligne); if ($redirect == null) { $redirect = "local/dns"; } if ($kav4mailservers->IsDomainLicenced($ligne) == true) { $kav = "<img src='img/status_ok.jpg'>"; } else { $kav = "<img src='img/status_permission.gif'>"; } $html = $html . "<tr class={$class}>\n\t\t<td align='center' valign='top' width=1%>\n\t\t\t<img src='img/upload.gif'>\n\t\t</td>\n\t\t<td valign='top' style='font-size:13px;letter-spacing:3px'>\n\t\t\t<a href='domains.edit.php?domain={$ligne}&ou={$ou}' style='font-size:13px;' onMouseOver=\"javascript:AffBulle('{js_expand_domain}');\" OnMouseOut=\"javascript:HideBulle();\" >{$ligne}</a>\n\t\t</td>\n\t\t<td width=1% align='center'>{$redirect}</td>\n\t\t<td width=1% align='center'>" . count($users_numbers) . "</td>\n\t\t<td width=1% align='center'>{$kav}</td>\n\t\t<td width=1% valign='top'><a href=\"javascript:DelDomain('{$ligne["domain"]}','');\"><img src='img/deluser.gif' onMouseOver=\"javascript:AffBulle('{js_del_domain}');\" OnMouseOut=\"javascript:HideBulle();\"></a></td>\t\t\n\t\t</tr>"; } $tpl = new Templates(); $html = $tpl->_parse_body($html); return $html . "</table></fieldset>"; }