function main_page() { $mailbox = new MailBoxes(); $mailbox->Cyrus_load(); $mailbox_infos = $mailbox->MailBoxes_get_infos($_GET["edit_mailbox"]); $server = $mailbox->global_config["_GLOBAL"]["mailboxes_server"]; $_field_date = "\n\t\t<tr>\n\t<td><strong>{mailbox_created}</strong></td>\n\t<td>{$mailbox_infos->created}</td>\n\t</tr>"; $_field_maildir = "\n\t\t<tr>\n\t<td><strong>{mailbox_path}</strong></td>\n\t<td>{$mailbox_infos->maildir}</td>\n\t</tr>\n\t"; if ($mailbox->Cyrus_Exists($_GET["edit_mailbox"])) { $tblq = explode('/', $mailbox->Cyrus_hash[$_GET["edit_mailbox"]]["QUOTA"]); if ($tblq[0] > 0) { $max_quota = $tblq[0] / 1000; } else { $max_quota = 0; } if ($tblq[1] > 0) { $used_quota = round($tblq[1] / 1000); } else { $used_quota = 0; } $field_quota = "<tr>\n\t<td><strong>{quota} {used}: {$used_quota} mb</strong>\n\t</td>\n\t<td><input type='text' id='max_quota' value='{$max_quota}' style='width:30px'> (mb) <i><span style='font-size:9px'>({quota_0})</span><i></td>\n\t</tr>"; } $rowspan = 4; if ($server == 'cyrus') { $_field_date = null; $_field_maildir = null; $rowspan = 4; $button_set_quotas = "\n <input type='button' value='{bt_set_quota}' OnClick=\"javascript:set_quota('{$_GET["edit_mailbox"]}');\">"; } $html = "\n\t<input type='hidden' id='no_password' value='{ERR_NO_PASS}'>\n\t<input type='hidden' id='password_no_match' value='{ERR_NO_PASS_MATCH}'>\t\n\t<input type='hidden' id='ERR_SET_QUOTA_SUCCESS' value='{ERR_SET_QUOTA_SUCCESS}'>\n\t<FIELDSET style='width:550px'><LEGEND>\n\t{mailbox_title} {$_GET["edit_mailbox"]}</LEGEND>\n\t<table>\n\t<td style='padding:4px' width=1% valign='top'><img src='img/user-maibox.png'></td>\n\t<td valing='top'>\n\t\t<table>\n\t\t<tr>\n\t\t{$field_date}\t\n\t\t{$_field_maildir}\n\t\t<tr>\n\t\t<td><strong>{mailbox_username}</strong></td>\n\t\t<td>{$_GET["edit_mailbox"]}</td>\n\t\t</tr>\t\n\t\t{$field_quota}\n\t\t<tr>\n\t\t<td><strong>{mailbox_password}</strong></td>\n\t\t<td><input type=password id='password' value=''></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td><strong>{mailbox_confirm_password}</strong></td>\n\t\t<td><input type=password id='password2' value=''></td>\n\t\t</tr>\t\n\t\t\n\t\t</table>\n\t\t<br>\n\t\t<table>\n\t\t<td>\n\t\t<table style='border:0px;width:100px;text-align:center;clear:all' align='center'>\n\t\t\t<tr>\n\t\t\t\t<td style='padding:0px;margin:0px;clear:both'>\n\t\t\t\t\t<input type='button' value='{bt_mailbox_edit}' OnClick=\"javascript:edit_mailbox_settings('{$_GET["edit_mailbox"]}');\"></td>\n\t\t\t\t\t<td style='padding:0px;margin:0px;clear:both'{$button_set_quotas}</td>\n\t\t\t\t</tr>\n\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t</FIELDSET>\n\t\n\t"; $tpl = new Templates(); echo DIV_SHADOW($tpl->_parse_body($html), 'windows'); }
function maillog() { include_once dirname(__FILE__) . "/ressources/class.status.logs.inc"; $user = new usersMenus(); $tpl = new Templates(); if ($user->AsPostfixAdministrator == false) { echo DIV_SHADOW($tpl->_ENGINE_parse_body('{no privileges}')); exit; } $sock = new sockets(); if ($_GET["maillog_filter"] != null) { switch ($_GET["maillog_filter"]) { case 'articaweb': $datas = file_get_contents(dirname(__FILE__) . '/ressources/logs/artica-web.log'); break; case 'procmail': $datas = $sock->getfile('procmail_logs'); break; default: $datas = $sock->getfile('maillog:' . $_GET["maillog_filter"]); break; } } else { $tbl = unserialize(base64_decode($sock->getFrameWork('cmd.php?postfix-tail=yes'))); } $datas = htmlentities($datas); $tbl = explode("\n", $datas); $tbl = array_reverse($tbl, TRUE); $html = "<table style='width:100%'>"; while (list($num, $val) = each($tbl)) { if (trim($val) != null) { if ($class == "rowA") { $class = "rowB"; } else { $class = "rowA"; } $html = $html . "<tr>\n\t\t<td width=1% style='border-bottom:1px dotted #CCCCCC' align='center'><img src='" . statusLogs($val) . "'></td>\n\t\t<td width=99%' style='border-bottom:1px dotted #CCCCCC;font-size:10px;'>{$val}</td>\n\t\t</tr>\n\t\t"; } } $html = $html . "</table>"; return $html; }
function PostFixBounceTemplate() { $template = $_GET['PostFixBounceTemplate']; $mny = new usersMenus(); $tpl = new templates(); $main = new main_cf(); $pages = new HtmlPages(); if ($mny->AsPostfixAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges'); exit; } $html = "<H2 style='margin:2px'>{" . "{$template}}</H2>\n\t" . Field_hidden('bounce_template_type', $template) . "\n\t<form name='form_{$template}'>\n\t<input type='hidden' id='save_bounce_template' name='save_bounce_template' value='{$template}'>\n\t<textarea name='text' style='width:99%;height:190px;margin:5px'>{$main->bounce_templates[$template]}</textarea>\n\t<div style='text-align:right;padding-right:10px'><input type='button' value='{submit}»' OnClick=\"javascript:ParseForm('form_{$template}','tree.listener.postfix.php',true);\"></div>\n\t\t</form>\n\t<div class=caption>{bounce_messages_templates_infos}</div>\n\t\n\t"; echo DIV_SHADOW($html, 'windows'); }
function LoadKasperskySettings($domain = null) { if ($domain != null) { $_GET["LoadKasperskySettings"] = $domain; } $kav4mailservers = new kav4mailservers(); $hash = $kav4mailservers->loadAvSettingsDomain($_GET["LoadKasperskySettings"]); $CuredQuarantine = Field_yesno_checkbox("CuredQuarantine", $hash["CuredQuarantine"]); $InfectedQuarantine = Field_yesno_checkbox("InfectedQuarantine", $hash["InfectedQuarantine"]); $SuspiciousQuarantine = Field_yesno_checkbox("SuspiciousQuarantine", $hash["SuspiciousQuarantine"]); $CorruptedQuarantine = Field_yesno_checkbox("CorruptedQuarantine", $hash["CorruptedQuarantine"]); $WarningQuarantine = Field_yesno_checkbox("WarningQuarantine", $hash["WarningQuarantine"]); $FilteredQuarantine = Field_yesno_checkbox("FilteredQuarantine", $hash["FilteredQuarantine"]); $ErrorQuarantine = Field_yesno_checkbox("ErrorQuarantine", $hash["ErrorQuarantine"]); $ProtectedQuarantine = Field_yesno_checkbox("ProtectedQuarantine", $hash["ProtectedQuarantine"]); $CuredAdminNotify = Field_yesno_checkbox("CuredAdminNotify", $hash["CuredAdminNotify"]); $InfectedAdminNotify = Field_yesno_checkbox("InfectedAdminNotify", $hash["InfectedAdminNotify"]); $SuspiciousAdminNotify = Field_yesno_checkbox("SuspiciousAdminNotify", $hash["SuspiciousAdminNotify"]); $CorruptedAdminNotify = Field_yesno_checkbox("CorruptedAdminNotify", $hash["CorruptedAdminNotify"]); $WarningAdminNotify = Field_yesno_checkbox("WarningAdminNotify", $hash["WarningAdminNotify"]); $FilteredAdminNotify = Field_yesno_checkbox("FilteredAdminNotify", $hash["FilteredAdminNotify"]); $ErrorAdminNotify = Field_yesno_checkbox("ErrorAdminNotify", $hash["ErrorAdminNotify"]); $ProtectedAdminNotify = Field_yesno_checkbox("ProtectedAdminNotify", $hash["ProtectedAdminNotify"]); $arrayA = array("unchanged" => "Unchanged", "remove" => "Remove"); $arrayB = array("unchanged" => "Unchanged", "remove" => "Remove", "cured" => "Cured"); $CuredAdminAction = Field_array_Hash($arrayB, "CuredAdminAction", $hash["CuredAdminAction"]); $InfectedAdminAction = Field_array_Hash($arrayA, "InfectedAdminAction", $hash["InfectedAdminAction"]); $SuspiciousAdminAction = Field_array_Hash($arrayA, "SuspiciousAdminAction", $hash["SuspiciousAdminAction"]); $CorruptedAdminAction = Field_array_Hash($arrayA, "CorruptedAdminAction", $hash["CorruptedAdminAction"]); $WarningAdminAction = Field_array_Hash($arrayA, "WarningAdminAction", $hash["WarningAdminAction"]); $FilteredAdminAction = Field_array_Hash($arrayA, "FilteredAdminAction", $hash["FilteredAdminAction"]); $ErrorAdminAction = Field_array_Hash($arrayA, "ErrorAdminAction", $hash["ErrorAdminAction"]); $ProtectedAdminAction = Field_array_Hash($arrayA, "ProtectedAdminAction", $hash["ProtectedAdminAction"]); $CuredRecipientAction = Field_array_Hash($arrayB, "CuredRecipientAction", $hash["CuredRecipientAction"]); $InfectedRecipientAction = Field_array_Hash($arrayA, "InfectedRecipientAction", $hash["InfectedRecipientAction"]); $SuspiciousRecipientAction = Field_array_Hash($arrayA, "SuspiciousRecipientAction", $hash["SuspiciousRecipientAction"]); $CorruptedRecipientAction = Field_array_Hash($arrayA, "CorruptedRecipientAction", $hash["CorruptedRecipientAction"]); $WarningRecipientAction = Field_array_Hash($arrayA, "WarningRecipientAction", $hash["WarningRecipientAction"]); $FilteredRecipientAction = Field_array_Hash($arrayA, "FilteredRecipientAction", $hash["FilteredRecipientAction"]); $ErrorRecipientAction = Field_array_Hash($arrayA, "ErrorRecipientAction", $hash["ErrorRecipientAction"]); $ProtectedRecipientAction = Field_array_Hash($arrayA, "ProtectedRecipientAction", $hash["ProtectedRecipientAction"]); $CuredSenderNotify = Field_yesno_checkbox("CuredSenderNotify", $hash["CuredSenderNotify"]); $InfectedSenderNotify = Field_yesno_checkbox("InfectedSenderNotify", $hash["InfectedSenderNotify"]); $SuspiciousSenderNotify = Field_yesno_checkbox("SuspiciousSenderNotify", $hash["SuspiciousSenderNotify"]); $CorruptedSenderNotify = Field_yesno_checkbox("CorruptedSenderNotify", $hash["CorruptedSenderNotify"]); $WarningSenderNotify = Field_yesno_checkbox("WarningSenderNotify", $hash["WarningSenderNotify"]); $FilteredSenderNotify = Field_yesno_checkbox("FilteredSenderNotify", $hash["FilteredSenderNotify"]); $ErrorSenderNotify = Field_yesno_checkbox("ErrorSenderNotify", $hash["ErrorSenderNotify"]); $ProtectedSenderNotify = Field_yesno_checkbox("ProtectedSenderNotify", $hash["ProtectedSenderNotify"]); $CuredRecipientNotify = Field_yesno_checkbox("CuredRecipientNotify", $hash["CuredRecipientNotify"]); $InfectedRecipientNotify = Field_yesno_checkbox("InfectedRecipientNotify", $hash["InfectedRecipientNotify"]); $SuspiciousRecipientNotify = Field_yesno_checkbox("SuspiciousRecipientNotify", $hash["SuspiciousRecipientNotify"]); $CorruptedRecipientNotify = Field_yesno_checkbox("CorruptedRecipientNotify", $hash["CorruptedRecipientNotify"]); $WarningRecipientNotify = Field_yesno_checkbox("WarningRecipientNotify", $hash["WarningRecipientNotify"]); $FilteredRecipientNotify = Field_yesno_checkbox("FilteredRecipientNotify", $hash["FilteredRecipientNotify"]); $ErrorRecipientNotify = Field_yesno_checkbox("ErrorRecipientNotify", $hash["ErrorRecipientNotify"]); $ProtectedRecipientNotify = Field_yesno_checkbox("ProtectedRecipientNotify", $hash["ProtectedRecipientNotify"]); $CuredRecipientAttachReport = Field_yesno_checkbox("CuredRecipientAttachReport", $hash["CuredRecipientAttachReport"]); $InfectedRecipientAttachReport = Field_yesno_checkbox("InfectedRecipientAttachReport", $hash["InfectedRecipientAttachReport"]); $SuspiciousRecipientAttachReport = Field_yesno_checkbox("SuspiciousRecipientAttachReport", $hash["SuspiciousRecipientAttachReport"]); $CorruptedRecipientAttachReport = Field_yesno_checkbox("CorruptedRecipientAttachReport", $hash["CorruptedRecipientAttachReport"]); $WarningRecipientAttachReport = Field_yesno_checkbox("WarningRecipientAttachReport", $hash["WarningRecipientAttachReport"]); $FilteredRecipientAttachReport = Field_yesno_checkbox("FilteredRecipientAttachReport", $hash["FilteredRecipientAttachReport"]); $ErrorRecipientAttachReport = Field_yesno_checkbox("ErrorRecipientAttachReport", $hash["ErrorRecipientAttachReport"]); $ProtectedRecipientAttachReport = Field_yesno_checkbox("ProtectedRecipientAttachReport", $hash["ProtectedRecipientAttachReport"]); if ($hash["QuarantinePath"] != null) { $QuarantinePath = basename($hash["QuarantinePath"]); $QuarantinePath = "\n\t\t<tr class=rowA>\n\t\t\t<td align='right'>{QuarantinePath}</td>\n\t\t\t<td>{$QuarantinePath}</td>\n\t\t</tr>"; } $html = "\n\t<fieldset>\n\t\t<legend>{LoadKasperskySettings_general_title}</legend>\n\t\t<table>\n\t\t<tr class=rowA>\n\t\t<td align=right>{LoadKasperskySettings_adminaddr}:</td>\n\t\t<input type='text' id='AdminAddress' value='{$hash["AdminAddress"]}'></td>\n\t\t</tr>\n\t\t{$QuarantinePath}\n\t\t</table>\n\t</fieldset>\n\t<fieldset>\n\t\t<legend>{av_notify_rules}</legend>\n\n<form name='kasperskyactions'>\t\t\n<table>\n<tr class=rowT>\n\t<td rowspan=2>{objects}</td>\n\t<td rowspan=2>{Quarantine}</td>\n\t<td colspan=2>{Administrator_rules}</td>\n\t<td >{sender_rules}</td>\n\t<td colspan=3>{recipient_rules}</td>\n</tr>\n<tr class=rowT>\n\t<td >{notify}</td>\n\t<td>{actions}</td>\n\t<td >{notify}</td>\n\t<td >{notify}</td>\n\t<td>{attach_report}</td>\n\t<td>{actions}</td>\n\t\n</tr>\n<tr class=rowA align='right'>\n\t<td>{Infected}</td>\n\t<td id='center' width=1%>{$InfectedQuarantine}</td>\n\t<td id='center' width=1%>{$InfectedAdminNotify}</td>\n\t<td id='center' >{$InfectedAdminAction}</td>\n\t<td id='center' width=1%>{$InfectedSenderNotify}</td>\n\t<td id='center' width=1%>{$InfectedRecipientNotify}</td>\n\t<td id='center' width=1%>{$InfectedRecipientAttachReport}</td>\n\t<td id='center' >{$InfectedRecipientAction}</td>\n\t\n</tr>\n<tr class=rowB align='right'>\n\t<td>{Cured}</td>\n\t<td id='center' width=1%>{$CuredQuarantine}</td>\n\t<td id='center' width=1%>{$CuredAdminNotify}</td>\n\t<td id='center' >{$CuredAdminAction}</td>\n\t<td id='center' width=1%>{$CuredSenderNotify}</td>\n\t<td id='center' width=1%>{$CuredRecipientNotify}</td>\n\t<td id='center' width=1%>{$CuredRecipientAttachReport}</td>\n\t<td id='center' >{$CuredRecipientAction}</td>\n</tr> \t\t\t \t\t\t\t \n<tr class=rowA align='right'>\n\t<td>{Suspicious} </td>\n\t<td id='center' width=1%>{$SuspiciousQuarantine}</td>\n\t<td id='center' width=1%>{$SuspiciousAdminNotify}</td>\n\t<td id='center' >{$SuspiciousAdminAction}</td>\n\t<td id='center' width=1%>{$SuspiciousSenderNotify}</td>\n\t<td id='center' width=1%>{$SuspiciousRecipientNotify}</td>\n\t<td id='center' width=1%>{$SuspiciousRecipientAttachReport}</td>\n\t<td id='center' >{$SuspiciousRecipientAction}</td>\n</tr>\t\t\t \t\t\t\t \n<tr class=rowB align='right'>\n\t<td>{Corrupted}</td>\n\t<td id='center' width=1%>{$CorruptedQuarantine}</td>\t\n\t<td id='center' width=1%>{$CorruptedAdminNotify}</td>\t\t\n\t<td id='center'>{$CorruptedAdminAction}</td>\t\t\n\t<td id='center' width=1%>{$CorruptedSenderNotify}</td>\n\t<td id='center' width=1%>{$CorruptedRecipientNotify}</td>\n\t<td id='center' width=1%>{$CorruptedRecipientAttachReport}</td>\n\t<td id='center' >{$CorruptedRecipientAction}</td>\n</tr> \t\t\t \t\t\t\t \n\n<tr class=rowA align='right'>\n\t<td>{Warning}</td>\n\t<td class=center width=1%>{$WarningQuarantine}</td>\n\t<td class=center width=1%>{$WarningAdminNotify}</td>\t\n\t<td class=center>{$WarningAdminAction}</td>\n\t<td id='center' width=1%>{$WarningSenderNotify}</td>\n\t<td id='center' width=1%>{$WarningRecipientNotify}</td>\n\t<td id='center' width=1%>{$WarningRecipientAttachReport}</td>\n\t<td id='center' >{$WarningRecipientAction}</td>\n</tr> \t\t\t \t\t\t\t \n<tr class=rowB align='right'>\n\t<td>{Filtered}</td>\n\t<td id='center' width=1%>{$FilteredQuarantine}</td>\n\t<td id='center' width=1%>{$FilteredAdminNotify}</td>\n\t<td id='center' >{$FilteredAdminAction}</td>\n\t<td id='center' width=1%>{$FilteredSenderNotify}</td>\n\t<td id='center' width=1%>{$FilteredRecipientNotify}</td>\n\t<td id='center' width=1%>{$FilteredRecipientAttachReport}</td>\n\t<td id='center' >{$FilteredRecipientAction}</td>\n\t\n</tr> \t\t\t \t\t\t\t \n<tr class=rowA align='right'>\n\t<td>{Error}</td>\n\t<td id='center' width=1%>{$ErrorQuarantine}</td>\n\t<td id='center' width=1%>{$ErrorAdminNotify}</td>\n\t<td id='center' >{$ErrorAdminAction}</td>\n\t<td id='center' width=1%>{$ErrorSenderNotify}</td>\n\t<td id='center' width=1%>{$ErrorRecipientNotify}</td>\n\t<td id='center' width=1%>{$ErrorRecipientAttachReport}</td>\n\t<td id='center' >{$ErrorRecipientAction}</td>\n</tr> \t\t\t \t\t\t\t \n<tr class=rowB align='right'>\n\t<td>{Protected}</td>\n\t<td id='center' width=1%>{$ProtectedQuarantine}</td>\n\t<td id='center' width=1%>{$ProtectedAdminNotify}</td>\n\t<td id='center' >{$ProtectedAdminAction}</td>\n\t<td id='center' width=1%>{$ProtectedSenderNotify}</td>\n\t<td id='center' width=1%>{$ProtectedRecipientNotify}</td>\n\t<td id='center' width=1%>{$ProtectedRecipientAttachReport}</td>\n\t<td id='center' >{$ProtectedRecipientAction}</td>\n</tr>\n</form>\n<tr class=rowA align='right' >\n\t<td colspan=8><input type='button' value='{bt_edit_notify}' OnClick=\"javascript:EditKasperskySettings('{$_GET["LoadKasperskySettings"]}');\" style='float:right'></td></tr>\n</table>\n</fieldset>\n\t\t\t\n\t\t\n\t</fieldset>\n\t"; $tpl = new templates(); echo DIV_SHADOW($tpl->_parse_body($html), 'windows'); }
function users_aliases($dn) { $ou = $_GET["ou"]; $domain = $_GET["domain"]; $ldap = new clladp(); $hash = $ldap->GetDNValues($dn); $firstname = $hash[0]["givenname"][0]; $lastname = $hash[0]["sn"][0]; $tabq = user_page_tabs($dn); $html = "<fieldset style='width:90%'>\n\t\t<legend>{$firstname} {$lastname} {aliases}</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<input type='hidden' id='error_bad_mail_formated' value=\"{error_bad_mail_formated}\">\t\t\n\t\t<table>\n\t\t<tr>\n\t\t\t<td valign='top' width=1%>\n\t\t\t<img src='img/user-maibox.png'>\n\t\t\t</td>\n\t\t\t<td valign='top'>\n\t\t\t\t<center>\n\t\t\t\t<table style='width:80%'>"; if (is_array($hash[0]["mailalias"])) { while (list($num, $ligne) = each($hash[0]["mailalias"])) { if (is_numeric($num)) { if ($class == 'rowA') { $class = 'rowB'; } else { $class = 'rowA'; } $html = $html . "<tr class={$class}>\n\t\t\t\t\t\t<td width=1%><img src='img/emails.gif'></td>\n\t\t\t\t\t\t<td style='padding-left:5px'>{$ligne}</td>\n\t\t\t\t\t\t<td width=1%><a href=\"#\" OnClick=\"javascript:users_delete_aliases('{$dn}','{$num}');\"><img src='img/x-delete.gif' style='border='0'></a></td>\n\t\t\t\t\t</tr>"; } } } $html = $html . "\n\t\t\t<tr class='rowA'>\n\t\t\t\t<td> </td>\n\t\t\t\t<td>\n\t\t\t\t\t<input type='text' id='aliases' value='' style='width:70%' OnKeyPress=\"javascript:users_add_aliases('{$dn}',event);\"> \n\t\t\t\t\t<input type='button' value='{add} »' style='width:20%;margin-bottom:0px' OnClick=\"javascript:users_add_aliases('{$dn}')\"></td>\n\t\t\t\t<td width=1%> </td>\n\t\t\t</table>\n\t\t\t</center>\n\t\t\t</td>\n\t\t</tr>\n\t</table>"; $tpl = new templates(); echo DIV_SHADOW($tpl->_parse_body($html), 'windows'); }
function PageUserMailBoxForm($uid) { include_once dirname(__FILE__) . "/ressources/class.cyrus.inc"; $ldap = new clladp(); $hash = $ldap->UserDatas($uid); if ($hash["MailboxActive"] == 'TRUE') { $cyrus = new cyrus(); $res = $cyrus->get_quota_array($uid); if ($cyrus->connection_off == true or $cyrus->error == true) { return $tpl->_parse_body('{cyrus_connection_error}'); } $free = $cyrus->USER_STORAGE_LIMIT - $cyrus->USER_STORAGE_USAGE; $mailboxInfos = "<tr><td> </td><td style='font-size:9px' align='left'><i>{$cyrus->USER_STORAGE_LIMIT} bytes/{$cyrus->USER_STORAGE_USAGE} bytes ({$free} bytes {free})</i></td></tr>"; } if ($ldap->ldap_last_error != null) { return nl2br($ldap->ldap_last_error); } $html = "<fieldset><legend>{$hash["displayName"]}</legend>\n \t<form name='FFUserMailBox'>\n \t<input type='hidden' name='TreeUserMailBoxEdit' value='{$uid}'>\n \t<table style='width:100%'>\n \t\n \t<tr>\n\t \t\n \t\t<td align='right' width=1%>" . Field_TRUEFALSE_checkbox_img('MailboxActive', $hash["MailboxActive"]) . "</td>\n\t \t<td><strong>{MailboxActive}</strong>\n\t \t\n \t</tr>\n \t<tr>\n\t \t<td align='right' nowrap><strong>{mailbox account}:</strong></td>\n\t \t<td>{$uid}</td>\n \t</tr> \t\n \t<tr>\n\t \t<td align='right' nowrap><strong>{mailbox quota}:</strong></td>\n\t \t<td>" . Field_text('MailBoxMaxSize', $hash["MailBoxMaxSize"], 'width:30%') . " MB</td>\n \t</tr>\n \t\t{$mailboxInfos}\n \t<tr>\n \t\t<td colspan=2 align='right'><input type='button' value='{submit} »' OnClick=\"javascript:ParseForm('FFUserMailBox','domains.php',true);\"></td>\n \t</tr>\n \t<tr>\n \t\t<td colspan=2 align='right'><input type='button' value='« {cyrus_apply_config} »' OnClick=\"javascript:Cyrus_mailbox_apply_settings('{$uid}');\"></td></td>\n \t</tr> \t\n \t</table>\n \t</form>\n \t</fieldset>"; $tpl = new templates(); return DIV_SHADOW($tpl->_ENGINE_parse_body($html), 'windows'); }
function LicenseDomain_Add() { $kav4mailservers = new kav4mailservers(); if ($kav4mailservers->error == true) { return "{error_no_socks}"; } if (!is_array($kav4mailservers->LicenseDomains)) { $kav4mailservers->LicenseDomains[] = null; } while (list($num, $ligne) = each($kav4mailservers->LicenseDomains)) { $licenceDomains[$ligne] = $ligne; } $ldap = new clladp(); $hash_domains = $ldap->hash_get_all_domains(); if (!is_array($hash_domains)) { $body = "{ERROR_NO_DOMAINS_CREATED_FIRST}"; } else { while (list($num, $ligne) = each($hash_domains)) { if ($licenceDomains[$ligne] == null) { if ($ligne != null) { $hash[$ligne] = $ligne; } } } $hash[""] = "{input_select_list}"; $body = Field_array_Hash($hash, 'LicenseDomain', null); } $html = "<fieldset style='width:80%'><legend>{kav_add_protection_domain}</legend>\n\t<table>\n\t<tr class=rowA>\n\t\t<td align='right'>{kav_legend_protection_domain}:</td>\n\t\t<td>{$body}</td>\n\t</tr>\n\t<tr class=rowB>\n\t\t<td align='right' colspan=2><input type='button' OnClick=\"javascript:LicenseDomain_edit();\" value='{submit} »'></td>\n\t</tr>\t\n\t</table>\n\t</fieldset>"; $tpl = new templates(); echo DIV_SHADOW($tpl->_parse_body($html), 'windows'); }
function MailBoxStorage($email = null) { $user = $email; if (isset($_GET["MailBoxStorage"])) { $user = $_GET["MailBoxStorage"]; } $mailbox = new MailBoxes(); if ($mailbox->MailBoxes_isExists($user) == false) { $html = "<input type='hidden' id='user' value='{$user}'>\n\t\t<input type='hidden' id='add_pop3_imap_text' value=\"{add_pop3_imap_text}\">\n\t\t<table class='table_form'>\n\t<td colspan=2><H2>{$user} {mailboxstorage_title}</H2></td>\n\t</tr>\n\t<tr>\n\t\t<td class='table_form_legend'>{mailboxstorage_not_define}</td>\n\t\t<td class='table_form_data'><input type='button' value='{bt_add_mailbox}' OnClick=\"javascript:add_storage_mailbox('{$user}')\"></td>\n\t</tr>\t\n\t</table>"; echo DIV_SHADOW($html, 'windows'); exit; } $path = $mailbox->MailBoxes_get_path($user); $html = "\n\t<input type='hidden' id='user' value='{$user}'>\n\t<input type='hidden' id='edit_pop3_imap_text' value=\"{edit_pop3_imap_text}\">\n\t<table class='table_form'>\n\t<td colspan=2><H2>{$user} {mailboxstorage_title}</H2></td>\n\t</tr>\n\t<tr>\n\t\t<td class='table_form_legend'>{mailboxstorage_path}</td>\n\t\t<td class='table_form_data'>{$path}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class='table_form_legend'>{mailboxstorage_password}</td>\n\t\t<td class='table_form_data' ><input type='password' id='password' value='{$user}' ></td>\n\t</tr>\n\t\t<td class='table_form_button' colspan=2><input type='button' value='Submit »' OnClick=\"javascript:edit_storage_mailbox('{$user}');\"></td>\n\t</tr>\t\t\t\n\t\n\t\n\t</table>\n\t\n\t"; echo DIV_SHADOW($html, 'windows'); }
function ReadIniDatas() { $ldap = new clladp(); if (preg_match('#kav:([0-9]+)#', $_GET["TreeKasSelect"], $reg)) { $gidNumber = $reg[1]; } $HashGroup = $ldap->GroupDatas($gidNumber); $kav4mailservers = new kav4mailservers(1, $HashGroup["KasperkyAVScanningDatas"]); $hashKAV = $kav4mailservers->array_conf["smtpscan.group:{$gidNumber}"]; if (is_array($hashKAV)) { while (list($num, $ligne) = each($hashKAV)) { $ini = $ini . " {$num}={$ligne}<br>"; } } $ini = "[smtpscan.group:{$gidNumber}]<br>{$ini}"; $ini = wordwrap($ini, 85, "<br>", 1); $html = tabs() . "<table style='width:100%'>\n\t<td valign='top' width=1%>\n\t<img src='img/config-file-108px.gif' style='margin-top:5px;'>\n\t</td>\n\t<td>\n\t\t<fieldset>\n\t\t\t<legend>kav4mailserver.conf</legend>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><code>{$ini}</td></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</fieldset>\n\t\n\t</td>\n\t</tr>\n\t</table>\n\n\t"; $tpl = new templates(); $html = $tpl->_ENGINE_parse_body($html); echo DIV_SHADOW($html, 'windows'); }
function ProcmailAddRule() { $usr = new usersMenus(); $tpl = new Templates(); if ($usr->AsMailBoxAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges}'); exit; } $proc = new procmail(); $proc->header_database[null] = '{select}'; $if = Field_array_Hash($proc->condition_array, 'condition', null); $rule_id = $_GET["ProcmailAddRule"]; $proc = new procmail(); $hash = $proc->array_rule[$rule_id]; if ($_GET["ProcmailAddRule"] == -1) { $title = '{add_rule}'; } else { $title = "{edit_rule} {$_GET["ProcmailAddRule"]}"; $subtitle = "<div style='font-size:12px;border-bottom:1px solid #005447;width:100%;font-wieght:bolder;color:#005447;margin-bottom:5px;'><strong>{$hash["name"]}</strong></div>"; } $header_name = Field_array_Hash($proc->header_database, 'header_name', $hash["header_name"]); $html = "<fieldset><legend>{$title}</legend>\n<form name='proc_rule'>\n\t<input type='hidden' name='procmail_edit_rule' value='{$_GET["ProcmailAddRule"]}'>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t<td><input type='button' value='« {manage_procmail_rules} »' OnClick=\"javascript:TreeProcMailRules();\"></td>\n\t\t\t</tr>\n\t\t\t\n\t\t</table><br>\n\t\t{$subtitle}\n\t\t<table style='margin:3px;border:1px solid #CCCCCC;padding:5px;width:99%'>\n\t\t<tr>\n\t\t</tr>\n\t\t<tr><td colspan=3><strong>{rule_name}</strong>:" . Field_text('name', $hash["name"], 'width:70%') . "</td>\n\t\t</tr>\t\t\n\t\t<td><strong>{if_in}</strong></td>\n\t\t<td>{$header_name}</td>\n\t\t <td>{$if}</td>\n\t\t</tr>\n\t\t<tr><td colspan=3><strong>{pattern}</strong>:" . Field_text('string', $hash["string"], 'width:80%') . "<br><code>*,? {supported}</code></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td><strong>{then}:</strong></td>\n\t\t<td colspan=2>" . Field_array_Hash($proc->action_array, "action", $hash["action"]) . "</td>\n\t\t</table>\n\t\t</form>\n\t\t<div style='padding-right:10px;text-align:right' align='right'><input type='button' value='{submit} »' OnClick=\"javascript:ParseForm('proc_rule','procmail.functions.php',true);\"></div>\n\t\n\t\n\t</fieldset>"; echo DIV_SHADOW($tpl->_ENGINE_parse_body($html), 'windows'); }
function GroupEdit() { $gid = $_GET["GroupEdit"]; switch ($_GET["tab"]) { case 1: return GroupPrivileges($gid); break; case 2: return GroupUsers($gid); break; default: break; } $ldap = new clladp(); $hash = $ldap->GroupDatas($gid); if (!is_array($hash)) { return null; } $page = CurrentPageName(); $tabs = GroupTabs($gid); $html = "\n\t<table style='margin:0px;padding:0px;border:0px;margin-top:5px'>\n\t<td valign='top'>{$tabs}</td>\n\t<td valign='top'>\n\t<form name='ffm1'>\n\t<FIELDSET style='width:100%'>\n\t\t<LEGEND>{$hash["cn"]} {identity}</LEGEND>\n\t\t<input type='hidden' name='GroupSaveIdentity' value='{$gid}'>\n\t\t<table class='Grey'>\n\t\t\t<tr class='rowN'>\n\t\t\t\n\t\t\t<td align='right' nowrap><strong>{group name}:</td>\n\t\t\t<td><input type='text' name='cn' id='cn' value=\"{$hash["cn"]}\" style='width:100%'></td>\n\t\t\t</tr>\n\t\t\t<tr><td colspan=2> </td></tr>\n\t\t\t<tr class='rowN'>\n\t\t\t<td align='right' valign='top'><strong>{description}:</td>\n\t\t\t<td>\n\t\t\t\t<textarea ' name='description' style='width:100%;heigth:50px;border:1px dotted #CCCCCC;font-family:Courrier New' >{$hash["description"]}</textarea>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr><td colspan=2> </td></tr>\t\t\t\n\t\t\t<tr class='rowN'>\n\t\t\t<td colspan=2 align='right' style='padding-right:10px'><input type='button' value='{submit}' OnClick=\"javascript:ParseForm('ffm1','{$page}',true);\"></td>\n\t\t\t</tr>\t\t\t\t\t\t\n\t\t</table>\n\t\t</form>\n\t\t\t\n\t\t\n\t\t\n\t</FIELDSET>\n\t</td>\n\t\n\t"; $tpl = new templates(); echo DIV_SHADOW($tpl->_parse_body($html), 'windows'); }