function ADD_PAGE()
{
    if (isset($_GET["EDIT_PAGE"])) {
        $ldap = new clladp();
        $hash = $ldap->UserDatas($_SESSION["uid"]);
        if (preg_match('#<header>(.+?)</header><pattern>(.+?)</pattern><regex>(.+?)</regex><action>(.+?)</action>#', $hash["RegexRules"][$_GET["EDIT_PAGE"]], $reg)) {
            $header_field = $reg[1];
            $action_value = $reg[4];
            $regex_value = $reg[3];
            $pattern_value = $reg[2];
            $button_name = '{edit}';
            $title = '{edit_a_rule}';
            $hidden = "<input type='hidden' id='edit' value='{$_GET["EDIT_PAGE"]}'>";
        }
    } else {
        $button_name = "{add}";
        $title = "{add_a_rule}";
    }
    $fields = Field_array_Hash(ARRAY_HEADERS_FIELD(), 'header_field', $header_field);
    $array_action = array("quarantine" => "{user_quarantine}", "delete" => "{user_delete}", "pass" => "{user_skip_antispam}");
    $action = Field_array_Hash($array_action, 'action', $action_value);
    $html = "\n\t<div style='padding:20px'>\n\t{$hidden}\n\t<H3>{$title}</H3>\n\t<p>&nbsp;</p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td align='right'><strong>{select_header_field}</strong>:</td>\n\t\t<td>{$fields}</td>\n\t<tr>\n\t\t<td align='right'><strong>{match_pattern}</strong></td>\n\t\t<td>" . Field_text('pattern', $pattern_value) . ":</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{use_regex}</strong>:</td>\n\t\t<td>" . Field_numeric_checkbox_img('regex', $regex_value, '{enable_disable}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{then}</strong>:</td>\n\t\t<td>{$action}</td>\n\t</tr>\t\t\t\n\t<tr>\n\t<td colspan=2 class='caption'>{star_explain} {only_regex_off}</td>\t\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><input type='button' value='{$button_name}&nbsp;&raquo;' OnClick=\"javascript:AddFilterRule();\"</td>\t\n\t</tr>\t\n\t\n\t\n\t\n\t</table>\n\t\n\t";
    //ArticaUserFilterRule
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
function INDEX()
{
    $ave = new kav4mailservers_single($_GET["ou"]);
    $html = "\n<table style='width:100%'>\n<tr>\n<td width=1%><img src='img/tank.jpg'></td>\n<td>\n<form name='ffm1' method=get>\n<input type='hidden' name='ou' value='{$_GET["ou"]}'>\n<div class='caption'>{aveserver_intro_global}</div>\n<table style='width:100%'>\n\n\t\t<tr><td colspan=2><h4>{when_found_virus}</H4></td></tr>\n\t\t<tr>\n\t\t\t<td align='right' nowrap><strong>{delete_mail}:</strong></td>\n\t\t\t<td>" . Field_numeric_checkbox_img('DeleteDetectedVirus', $ave->main_array["DeleteDetectedVirus"], '{enable_disable}') . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td align='right' nowrap><strong>{ArchiveMail}:</strong></td>\n\t\t\t<td>" . Field_numeric_checkbox_img('ArchiveMail', $ave->main_array["ArchiveMail"], '{enable_disable}') . "</td>\n\t\t</tr>\t\t\t\n\t\t<tr>\n\t\t\t<td align='right' nowrap><strong>{NotifyFrom}:</strong></td>\n\t\t\t<td>" . Field_numeric_checkbox_img('NotifyFrom', $ave->main_array["NotifyFrom"], '{enable_disable}') . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td align='right' nowrap><strong>{NotifyTo}:</strong></td>\n\t\t\t<td>" . Field_numeric_checkbox_img('NotifyTo', $ave->main_array["NotifyTo"], '{enable_disable}') . "</td>\n\t\t</tr>\n\t\t\t\n</table>\n\n\n</td>\n</tr>\n<tr>\n<td colspan=2>\n<table style='width:100%'>\n<tr><td colspan=2><h4>{NotifyMessage}</H4></td></tr>\t\n\t\t<tr>\n\t\t\t<td align='right' nowrap><strong>{NotifyFromAddress}:</strong></td>\n\t\t\t<td>" . Field_text('NotifyFromAddress', $ave->main_array["NotifyFromAddress"]) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right' nowrap><strong>{NotifyMessageSubject}:</strong></td>\n\t\t\t<td>" . Field_text('NotifyMessageSubject', $ave->main_array["NotifyMessageSubject"]) . "</td>\n\t\t</tr>\t\t\n\t\t<tr><td colspan=2>" . TinyMce('NotifyMessageTemplate', $ave->main_array["NotifyMessageTemplate"]) . "</td></tr>\t\t\t\t\t\n\t\t<tr><td colspan=2 align='right'><input type='submit' value='{apply}&nbsp;&raquo;'></td></tr>\n</table>\n</td>\n</tr>\n</table></form>";
    $tpl = new template_users('{antivirus_engine}', $html);
    echo $tpl->web_page;
}
Beispiel #3
0
function popup()
{
    $priv = new usersMenus();
    $ct = new user($_GET["popup"]);
    $sock = new sockets();
    $lvm = new lvm_org($ct->ou);
    $array = $lvm->disklist;
    $paths["/home/{$ct->uid}"] = "/home/{$ct->uid} ({system_disk})";
    if (is_array($array)) {
        while (list($num, $val) = each($array)) {
            $sock = new sockets();
            $results = $sock->getFrameWork("cmd.php?fstab-get-mount-point=yes&dev={$num}");
            $array2 = unserialize(base64_decode($results));
            while (list($num, $mounted) = each($array2)) {
                $paths[trim("{$mounted}/{$ct->uid}")] = dirname(trim($mounted . '/' . $ct->uid) . "({dedicated_storage})");
            }
        }
    }
    $loginShell_hidden = Field_hidden('loginShell', $us->loginShell) . Field_hidden('uidNumber', $us->uidNumber);
    $loginShell = "<tr>\n\t\t\t\t\t<td align='right' nowrap class=legend {$styleTDRight}>{loginShell}:</strong>\n\t\t\t\t\t<td {$styleTDLeft}>\n\t\t\t\t\t\t\t<table style='width:100%;margin-left:-4px;'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align=left width=1%>" . Field_text('loginShell', $us->loginShell, 'width:90px') . "</td>\n\t\t\t\t\t\t\t<td align=left>" . help_icon('{loginShellText}', true) . "</td>\n\t\t\t\t\t\t\t<td class=legend nowrap>{UidNumber}:</td>\n\t\t\t\t\t\t\t<td align=left width=1%>" . Field_text('uidNumber', $us->uidNumber, 'width:90px') . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
    $dotclear = "<tr>\n\t\t<td class=legend nowrap>{DotClearUserEnabled}:</td>\n\t\t<td align=left width=1%>" . Field_numeric_checkbox_img('DotClearUserEnabled', $us->DotClearUserEnabled) . "</td>\n\t\t<td align=left>" . help_icon('{DotClearUserEnabledText}', true) . "</td>\n\t</tr>";
    $form = Field_hidden('USER_SYSTEM_INFOS_UID', $ct->uid) . "\n\t<div style='text-align:right;margin-top:-5px;margin-bottom:9px;'><code>{home}:{$ct->homeDirectory}</code></div>\n\t<div id='ChangeUserPasswordID'>\n\t<table style='width:100%'>\n\t\n\t<tr>\n\t\t<td class=legend nowrap>{loginShell}:</td>\n\t\t<td align=left width=1%>" . Field_text('loginShell', $ct->loginShell, 'width:190px') . "</td>\n\t\t<td align=left>" . help_icon('{loginShellText}', true) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{homeDirectory}:</td>\n\t\t<td align=left width=1%>" . Field_array_Hash($paths, 'homeDirectory', $ct->homeDirectory) . "</td>\n\t\t<td align=left>" . help_icon('{homeDirectoryText}', true) . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend nowrap>{UidNumber}:</td>\n\t\t<td align=left width=1%>" . Field_text('UidNumber', $ct->uidNumber, 'width:90px') . "</td>\n\t\t<td align=left>" . help_icon('{UidNumberText}', true) . "</td>\n\t</tr>\n\t\t\n\t\t\n\t<tr><td colspan=3><hr></td></tr>\n\t<tr>\n\t\t<td colspan=3 align='right'>" . button("{edit}", "UserSystemInfosSave()") . "\n\t</tr>\n\t</table>\n\t</div>\n\t";
    $form = RoundedLightWhite($form);
    $safebox = Paragraphe("safe-box-64.png", "{coffrefort}", "{coffrefort_create_user}", "javascript:Loadjs('domains.edit.user.safebox.php?uid={$ct->uid}')");
    if (!$priv->CRYPTSETUP_INSTALLED) {
        $safebox = null;
    }
    $html = "<H1>{UserSystemInfos}</H1>\n\t<div style='margin-top:-35px;text-align:right;margin-bottom:30px;width:95%'>\n\t\t<i style='font-size:16px;font-weight:bold;padding-bottom:4px;color:white'>{$ct->DisplayName}</i>\n\t</div>\n\t<div id='UserSystemInfosSave'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t{$safebox}\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t{$form}\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t</div>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #4
0
function popup_addwbl()
{
    $page = CurrentPageName();
    $html = "<h1>{add_email}</H1>\n\t<p class=caption>{add_backlistwhitelist_email}</p>\n\t<p class=caption>{add_wbl_text}</p>\n\t<form name='ffm1blw'>\n\t<table style='width:100%;background-color:#FFFFFF;padding:5px;border:1px solid #CCCCCC'>\n\t<tr>\n\t\t<td class=legend>{email}:</td>\n\t\t<td>" . Field_text('blw_email', '', 'width:190px') . "</td>\n\t</tr>\n\t<tr>\n\t<td class=legend>{email_type}:</td>\n\t<td>" . Field_numeric_checkbox_img('blw_type', 0, '{email_type_help}') . "</TD>\n\t</tr>\n\t<tr>\n\t<td colspan=2 style='padding-top:4px;border-top:1px solid #CCCCCC' align='right'><input type='button' OnClick=\"javascript:ActionWbladdForm();\" value='{add}'></td>\n\t</tr>\n\t</table>\n\t</form>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #5
0
function INDEX()
{
    $priv = new usersMenus();
    if (isset($_GET["ou"])) {
        if ($priv->AllowChangeKas == false) {
            header('location:users.index.php');
            exit;
        }
        $ou = $_GET["ou"];
        $kas = new kas_user(null, $_GET["ou"]);
        $hidden = "<input type='hidden' name='ou' value='{$ou}'>";
        $title = "{$ou}: {org_antispam_rules}";
    } else {
        if ($priv->AllowChangeAntiSpamSettings == false) {
            header('location:users.index.php');
            exit;
        }
        $kas = new kas_user($_SESSION["uid"]);
        $title = "{antispam_user_rules}";
    }
    for ($i = 1; $i < 101; $i++) {
        $array[$i] = "{$i} %";
    }
    $second_rate = Field_array_Hash($array, "detection_rate1", $kas->mail_array["second_rate"]);
    $detection_rate = Field_array_Hash($array, "detection_rate", $kas->mail_array["detection_rate"]);
    $page = CurrentPageName();
    $html = "\n\n<form name='FFM1'>\n{$hidden}\n<table style='width:600px' align=center>\n<tr>\n\t<td width=1% valign='top'><img src='img/caterpillarkas.jpg'></td>\n\t<td valign='top'>\n\t\t<div class='caption'>{antispam_user_rules_text}</div>\n\t\t<div style='font-size:12px'>{spam_rules_intro}</div>\n\t\t\n\t</td>\n</tr>\n<td colspan=2>\n<strong>{prepend_text}:</strong>" . Field_text('prepend_text', $kas->mail_array["prepend_text"]) . "<hr>\n<table style='width:100%'>\n<tr>\n<td>\n<tr style='background-color:#27573F;color:white'>\n\t<td >{spam_detection_rate}</td>\n\t<td valign='top' nowrap><strong>{action_quarantine}</strong></td>\n\t<td valign='top' nowrap><strong>{action_prepend}</strong></td>\n\t<td valign='top' nowrap><strong>{action_killmail}</strong></td>\n</tr>\n<tr>\n\t<td class='bottom' align='right'>{$detection_rate}</td>\n\t<td valign='top' align='center' width=1% class=bottom>" . Field_numeric_checkbox_img('action_quarantine', $kas->mail_array["action_quarantine"], '{enable_disable}') . "&nbsp;</td>\n\t<td valign='top' align='center' width=1% class=bottom>" . Field_numeric_checkbox_img('action_prepend', $kas->mail_array["action_prepend"], '{enable_disable}') . "&nbsp;</td>\n\t<td valign='top' align='center' width=1% class=bottom>" . Field_numeric_checkbox_img('action_killmail', $kas->mail_array["action_killmail"], '{enable_disable}') . "&nbsp;</td>\n</tr>\n<tr>\n\t<td class='bottom' align='right'>{$second_rate}</td>\n\t<td valign='top' align='center' width=1% class=bottom>" . Field_numeric_checkbox_img('second_quarantine', $kas->mail_array["second_quarantine"], '{enable_disable}') . "&nbsp;</td>\n\t<td valign='top' align='center' width=1% class=bottom>" . Field_numeric_checkbox_img('second_prepend', $kas->mail_array["second_prepend"], '{enable_disable}') . "&nbsp;</td>\n\t<td valign='top' align='center' width=1% class=bottom>" . Field_numeric_checkbox_img('second_killmail', $kas->mail_array["second_killmail"], '{enable_disable}') . "&nbsp;</td>\n</tr>\n<tr><td colspan=4 align='right'><input type='button' OnClick=\"javascript:ParseForm('FFM1','{$page}',true);\" value='{edit}&nbsp;&raquo;'></td></tr>\n</table>\n</td>\n</tr>\n</table>";
    $tpl = new template_users($title, $html);
    echo $tpl->web_page;
}
Beispiel #6
0
function settings()
{
    $dotclear = new dotclear();
    $page = CurrentPageName();
    $html = "\n\t<center>\n\t<form name=FF1>\n\t<table style='width:90%;border:1px dotted #CCCCCC'>\n\t<tr>\n\t\t<td class=legend>{EnableDotClearHTTPService}:</td>\n\t\t<td>" . Field_numeric_checkbox_img('EnableDotClearHTTPService', $dotclear->EnableDotClearHTTPService, '{EnableDotClearHTTPService}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{DotClearHttpListenPort}:</td>\n\t\t<td>" . Field_text("DotClearHttpListenPort", $dotclear->DotClearHttpListenPort, "width:40px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{DotClearExternalWebUri}:</td>\n\t\t<td>" . Field_text("DotClearExternalWebUri", $dotclear->DotClearExternalWebUri, "width:190px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{DotClearExternalAdminUri}:</td>\n\t\t<td>" . Field_text("DotClearExternalAdminUri", $dotclear->DotClearExternalAdminUri, "width:190px") . "</td>\n\t</tr>\n\t\n\t\n\t\n\t<tr>\n\t\t<td colspan=2 align='right' style='margin-bottom:5px'><input type='button' OnClick=\"javascript:ParseForm('FF1','{$page}',true);\" value='{edit}&nbsp;&raquo;'></td>\n\t</tr>\n\t\n\t\n\t</table>\n\t</form>\n\t</center>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #7
0
function main_settings()
{
    $nmap = new nmap();
    $artica = new artica_general();
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t<H5>{APP_NMAP}&nbsp;{settings}</H5>\n\t<p class=caption>{about}</p>\n\t" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' nowrap align='right'><strong>{NmapScanEnabled}:</strong></td>\n\t\t<td valign='top' nowrap align='left'>" . Field_numeric_checkbox_img('NmapScanEnabled', $artica->NmapScanEnabled, '{enable_disable}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' nowrap align='right'><strong>{NmapRotateMinutes}:</strong></td>\n\t\t<td valign='top' nowrap align='left'>" . Field_text('NmapRotateMinutes', $nmap->NmapRotateMinutes, 'width:90px') . "</td>\n\t</tr>\t\n\t<tr>\n\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:SaveNmapSettings();\" value='{edit}&nbsp;&raquo;'></td>\n\t</tr>\n\t</table>") . "\n\t<br><div id='nmap_list'>" . main_network_list() . "</div>\n\t</td>\n\t<td valign='top'>\n\t" . RoundedLightGrey(Paragraphe("acl-add-64.png", '{add_network}', '{add_network_text}', "javascript:nmap_add_network()")) . "<br>\n\t" . RoundedLightGrey(Paragraphe("folder-logs-64.png", '{nmap_logs}', '{nmap_logs_text}', "javascript:nmap_logs()")) . "<br>\n\t" . RoundedLightGrey(Paragraphe("global-settings.png", '{perform_scan}', '{perform_scan_text}', "javascript:nmap_scan()")) . "<br>\n\t\n\t\n\t\n\t\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #8
0
function popup_start()
{
    $page = CurrentPageName();
    $autocompress = new autocompress();
    $html = "\n\t<input type='hidden' id='addextension_help' name='addextension_help' value='{addextension_help}'>\n\t<H1>{auto-compress}</h1>\n\t<p class=caption>{Auto-compress_explain}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'><img src='img/90-winzip.png'></td>\n\t\t<td valign='top'>\n\t\t\t<form name='FFMCOMPRESSS'>\n\t\t\t\t<table class=table_form>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend>{enable_autocompress}</td>\n\t\t\t\t\t<td>" . Field_numeric_checkbox_img('autcompress_enabled', $autocompress->autcompress_enabled, '{enable_disable}') . "</td>\n\t\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:ParseForm('FFMCOMPRESSS','{$page}',true);\" value='{edit}&nbsp;&raquo;'></td>\n\t\t\t</tr>\n\t\t\t\t\n\t\t\t\n\t\t</table>\n\t\t</form>\n\t\t\t<div id='extlist'>\n\t\t\t\t" . autcompress_list() . "\t\t\n\t\t\t</div>\n\t\t</td>\n\t</tr>\n\t</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'postfix.index.php');
}
function liveForm()
{
    $uid = $_SESSION["uid"];
    $get = new getlive($uid);
    $array = $get->ParseConfig($uid);
    $page = CurrentPageName();
    $html = "<div style='background-image:url(img/bg_form-1.png);padding:10px;width:550px;border:1px solid #CCCCCC;margin-left:100px;'>\n\t<form name='ffm1'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend nowrap>{enable}:</td>\n\t\t<td>" . Field_numeric_checkbox_img('enabled', $array["enabled"], '{enable_disable}') . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr\t\n\t<tr>\n\t\t<td class=legend nowrap>{username}:</td>\n\t\t<td>" . Field_text('UserName', $array["UserName"], 'width:100px') . "</td>\n\t\t<td>{username_text}</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{password}:</td>\n\t\t<td>" . Field_text('Password', $array["Password"], 'width:100px') . "</td>\n\t\t<td>{password_text}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top'>{Domain}:</td>\n\t\t<td valign='top'>" . Field_text('Domain', $array["Domain"], 'width:100px') . "</td>\n\t\t<td valign='top'>{Domain_text}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{Delete_messages}:</td>\n\t\t<td valign='top'>" . Field_yesno_checkbox('Delete', $array["Delete"]) . "</td>\n\t\t<td valign='top'>{Delete_messages_text}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{MarkRead}:</td>\n\t\t<td valign='top'>" . Field_yesno_checkbox('MarkRead', $array["MarkRead"]) . "</td>\n\t\t<td valign='top'>{MarkRead_text}</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td colspan=3 align='right'><input type='button' OnClick=\"javascript:ParseForm('ffm1','{$page}',true);\" value='{submit}&nbsp;&raquo;'>\n\t\t</td>\n\t</tr>\t\n\t</table>\n\t</div>\n\t\n\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $users = new usersMenus();
    if ($users->cyrus_imapd_installed) {
        $cyrus = "\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{delete_mailboxes}</td>\n\t\t\t\t<td>" . Field_numeric_checkbox_img('delete_mailboxes', 0, '{delete_mailboxes}') . "</td>\n\t\t\t</tr>\n\t\t\n\t\t";
    } else {
        $cyrus = "<input type='hidden' id='delete_mailboxes' value='0'>";
    }
    $html = "\n<h1>{$_GET["ou"]}</H1>\n<div id='confirmdeleteou'>\n<table style='width:100%'>\n\t<tr>\n\t\t<td width=1%><img src='img/org-128.png'></td>\n\t\t<td valign='top'>\n\t\t\t<p class=caption>{delete_ou_text}</p>\n\t\t\t<table style='width:100%'>\n\t\t\t\t{$cyrus}\n\t\t\t</table>\t\t\t\n\t\t</td>\n\t\t<tr>\n\t\t<td colspan=2 align='right'><hr></td></tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t" . button("{cancel}", "Loadjs('domains.manage.org.index.php?js=yes&ou={$_GET["ou"]}')") . "\n\t\t\t</td>\n\t\t\t\n\t\t<td align='right'>" . button("{confirm}", "ConFirmDelete()") . "\n\t\t</td>\n\t\t</tr>\n\t</tr>\n</table>\n</div>\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'domain.manage.org.index.php');
}
Beispiel #11
0
function popup()
{
    $group = new groups($_GET["gpid"]);
    $usersmenus = new usersMenus();
    $delete_mailbox = "<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend nowrap>{delete_mailbox}:</td>\n\t\t\t\t\t\t<td>" . Field_numeric_checkbox_img('DeleteMailBox', 0, "{delete_mailbox}") . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>";
    if (!$usersmenus->cyrus_imapd_installed) {
        $delete_mailbox = null;
    }
    $user_infos = "<table style='width:100%'>\n<tr>\n\t<td valign='top' width=99%>\n\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td style='border-bottom:1px solid #CCCCCC'><strong style='font-size:16px;'>{$group->groupName}&nbsp;|&nbsp;ID:{$group->group_id}&nbsp;|&nbsp;" . count($group->members) . " {members}</strong></td>\n\t\t\t</tr>\n\t\t\t{$delete_mailbox}\n\t\t\t<tr>\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend nowrap>{delete_users}:</td>\n\t\t\t\t\t\t<td>" . Field_numeric_checkbox_img('DeleteUsers', 0, "{delete_users}") . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\t\n\t\t\t\t<td align='right'>\n\t\t\t\t\t<hr>\n\t\t\t\t\t<input type='button' OnClick=\"javascript:ConfirmDeletionOfGroup();\" value='{confirm_deletion_of}:{$group->groupName}&nbsp;&raquo;' style='padding:10px;font-size:16px'>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\t\n\t\t</table>\n\t</td>\n</tr>\n</table>";
    $html = "\n<div class=explain>{warning_delete_all_users}</div>\n<div id='deletion'>\n{$user_infos}\n</div>\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "domains.edit.group.php");
}
function popup()
{
    $uid = $_GET["uid"];
    $user = new user($uid);
    $usersmenus = new usersMenus();
    $delete_mailbox = "\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend nowrap>{delete_mailbox}:</td>\n\t\t\t\t\t\t<td>" . Field_numeric_checkbox_img('DeleteMailBox', 0, "{delete_mailbox}") . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>";
    if (!$usersmenus->cyrus_imapd_installed) {
        $delete_mailbox = null;
    }
    $picture = "<img src='{$user->img_identity}' style='border:1px dotted #CCCCCC'>";
    $user_infos = "<table style='width:100%'>\n<tr>\n\t<td valign='top' width=1%>{$picture}</td>\n\t<td valign='top' width=99%>\n\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td style='border-bottom:1px solid #CCCCCC'><strong style='font-size:16px;'>{$user->uid}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right'><strong style='font-size:11px' >{$user->DisplayName}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td><strong style='font-size:12px'>{$user->mail}</strong></td>\n\t\t\t</tr>\n\t\t\t{$delete_mailbox}\n\t\t\t<tr>\n\t\t\t\t<td align='right'>\n\t\t\t\t\t<hr>\n\t\t\t\t\t<input type='button' OnClick=\"javascript:ConfirmDeletionOfUser();\" value='{confirm_deletion_of}:{$user->uid}&nbsp;&raquo;' style='padding:10px'>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\t\n\t\t</table>\n\t</td>\n</tr>\n</table>";
    $user_infos = RoundedLightWhite($user_infos);
    $html = "<H1>{$user->uid}</H1>\n<div id='deletion'>\n{$user_infos}\n</div>\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "domains.edit.user.php");
}
function index()
{
    $ct = new user($_GET["uid"]);
    $sock = new sockets();
    $RsyncStoragePath = $sock->GET_INFO("RsyncStoragePath");
    if ($RsyncStoragePath == null) {
        $RsyncStoragePath = "/var/spool/rsync";
    }
    if ($ct->RsyncBackupTargetPath == null) {
        $ct->RsyncBackupTargetPath = $RsyncStoragePath;
    }
    $RsyncBackupTargetPath = Field_text("RsyncBackupTargetPath", $ct->RsyncBackupTargetPath, "width:220px") . button_browse("RsyncBackupTargetPath");
    $EnableBackupAccount = Field_numeric_checkbox_img("EnableBackupAccount", $ct->EnableBackupAccount);
    $html = "<H1>{backup_parameters}</H1>\n<div id='{$ct->uid}_divid'>\n" . RoundedLightWhite("\n<table style='width:100%'>\n<tr>\n<td valign='top'>\n\t<center><img src='img/bg_backup-org.png'></center><br>\n\t<table style='width:100%' class=table_form>\n\t<tr>\n\t<td class=legend nowrap valign='top'>{ENABLE_RSYNC_ACCOUNT}:</td>\n\t<td>{$EnableBackupAccount}<p class=caption>{ENABLE_RSYNC_ACCOUNT_TEXT}</p></td>\n\t</tr>\n\t<tr>\n\t<td class=legend>{storage_path}:</td>\n\t<td>{$RsyncBackupTargetPath}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td valign='top' align='right' colspan=2><hr>\n\t\t\t<input type='button' OnClick=\"javascript:SaveBackupUserInfos();\" value='&nbsp;&nbsp;{edit}&nbsp;&raquo;&nbsp;&nbsp;'>\n\t\t</td>\n\t</tr>\n</table>\n");
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #14
0
function scan_parameters()
{
    $uid = $_GET["scan-parameters"];
    $computer = new computers($uid . '$');
    $ini = new Bs_IniHandler();
    $ini->loadString($computer->KasperkyAVScanningDatas);
    if ($ini->_params["scanner.options"]["cure"] == null) {
        $ini->_params["scanner.options"]["cure"] = 0;
    }
    for ($i = 0; $i < 5; $i++) {
        $hash[$i] = "{f{$i}}";
    }
    $cure = Field_array_Hash($hash, "cure", $ini->_params["scanner.options"]["cure"], "ChangeCureExplain()");
    $form = "\n\t<div style='font-size:12px' id='curexpl'>{i{$ini->_params["scanner.options"]["cure"]}}</div>\n\t<hr>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend>{SCAN_PACKED}:</td>\n\t\t<td valign='top'>" . Field_numeric_checkbox_img('Packed', $ini->_params["scanner.options"]["Packed"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{SCAN_ARCHIVES}:</td>\n\t\t<td valign='top'>" . Field_numeric_checkbox_img('Archives', $ini->_params["scanner.options"]["Archives"]) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{SelfExtArchives}:</td>\n\t\t<td valign='top'>" . Field_numeric_checkbox_img('SelfExtArchives', $ini->_params["scanner.options"]["SelfExtArchives"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{MailBases}:</td>\n\t\t<td valign='top'>" . Field_numeric_checkbox_img('MailBases', $ini->_params["scanner.options"]["MailBases"]) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{MailPlain}:</td>\n\t\t<td valign='top'>" . Field_numeric_checkbox_img('MailPlain', $ini->_params["scanner.options"]["MailPlain"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{Heuristic}:</td>\n\t\t<td valign='top'>" . Field_numeric_checkbox_img('Heuristic', $ini->_params["scanner.options"]["Heuristic"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{Recursion}:</td>\n\t\t<td valign='top'>" . Field_numeric_checkbox_img('Recursion', $ini->_params["scanner.options"]["Recursion"]) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{cure}:</td>\n\t\t<td valign='top'>{$cure}</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\n\t\n\t<td colspan=2 align='right'>\n\t<hr>\n\t<input type='button' OnClick=\"javascript:SaveComputerScannerOptions();\" value='{apply}&nbsp;&raquo;'></td>\n\t</tr>\n\t</table>\n\t\n";
    $form = RoundedLightWhite($form);
    $html = "<H1>{AV_SCAN_PARAMETERS}</H1>\n<br>\n<div id='AV_SCAN_PARAMETERS'>\n{$form}\n</div>\n\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $uid = $_GET["uid"];
    $user = new user($uid);
    $usersmenus = new usersMenus();
    $delete_mailbox = "\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend nowrap>{delete_mailbox}:</td>\n\t\t\t\t\t\t<td>" . Field_numeric_checkbox_img('DeleteMailBox', 0, "{delete_mailbox}") . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>";
    $delete_mailbox_zarafa = "\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=legend nowrap style='font-size:14px'>{unhook_mailbox}:</td>\n\t\t\t\t\t\t\t<td>" . Field_checkbox('unhookZarafaStore', 1, 0, "unhookZarafaStoreCheck()") . "</td>\n\t\t\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<td class=legend nowrap style='font-size:14px'>{hook_mailboxto}:</td>\n\t\t\t\t\t\t\t<td>" . Field_text('ZarafaCopyToPublic', null, "width:140px;font-size:14px") . "</td>\n\t\t\t\t\t\t\t<td width=1%>" . button("{browse}", "Loadjs('MembersBrowse.php?OnlyUsers=1&NOComputers=0&Zarafa=1&callback=ZarafaDCopyToPublicCallBack')") . "</td>\n\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=3><div class=explain>{ZarafaCopyToPublic}</div></td>\n\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>";
    if (!$usersmenus->cyrus_imapd_installed) {
        $delete_mailbox = null;
    }
    if (!$usersmenus->ZARAFA_INSTALLED) {
        $delete_mailbox_zarafa = null;
    }
    $picture = "<img src='img/user-server-64-delete.png'>";
    $user_infos = "<table style='width:99%' class=form>\n<tr>\n\t<td valign='top' width=1%>{$picture}</td>\n\t<td valign='top' width=99%>\n\t\t<table style='width:100%'>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td style='border-bottom:1px solid #CCCCCC'><strong style='font-size:16px;'>{$user->uid}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right'><strong style='font-size:11px' >{$user->DisplayName}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td><strong style='font-size:12px'>{$user->mail}</strong></td>\n\t\t\t</tr>\n\t\t\t{$delete_mailbox}\n\t\t\t{$delete_mailbox_zarafa}\n\t\t\t</tbody>\n\t\t</table>\n\t</td>\n</tr>\n<tr>\n\t<td colspan=2 align='right'><div style='margin-top:15px;text-align:right'><hr>" . button("{confirm_deletion_of}:{$user->uid}", "ConfirmDeletionOfUser();", 16) . "</div>\n</table>";
    $html = "\n<div id='deletion'>\n\t{$user_infos}\n</div>\n<script>\nfunction unhookZarafaStoreCheck(){\n\tif(!document.getElementById('unhookZarafaStore')){return;}\n\tif(!document.getElementById('unhookZarafaStore').checked){\n\t\tdocument.getElementById('ZarafaCopyToPublic').disabled=true;\n\t}else{\n\t\tdocument.getElementById('ZarafaCopyToPublic').disabled=false;\n\t}\n}\nunhookZarafaStoreCheck();\n</script>\n\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "domains.edit.user.php");
}
Beispiel #16
0
function sieve_vacation()
{
    $sieve = new clSieve($_GET["uid"]);
    $sieve->GetRuleVacation();
    $sieve_rule_name = $sieve->sieve_rulename;
    if ($sieve_rule_name != null) {
        $rules = $sieve->GetRules($sieve_rule_name);
        $vacation_rule = $rules[$sieve->sieve_ruleindex];
    }
    $message = $vacation_rule["actions"][0]["message"];
    $message = stripslashes($message);
    for ($i = 1; $i < 90; $i++) {
        $days[$i] = $i;
    }
    $day = Field_array_Hash($days, 'days', $vacation_rule["actions"][0]["days"]);
    switch ($vacation_rule["status"]) {
        case "DISABLED":
            $status = 0;
            break;
        case "ENABLED":
            $status = 1;
            break;
        default:
            $status = 1;
            break;
    }
    $enable = Field_numeric_checkbox_img('vacation_enabled', $status, "{enable_disable}");
    $addresses = "<table style='width:100%'>\n\t<tr>\n\t\t<th>&nbsp;</td>\n\t\t<th>{email}</th>\n\t</tr>\t\n\t";
    if (is_array($vacation_rule["actions"][0]["addresses"])) {
        while (list($num, $email) = each($vacation_rule["actions"][0]["addresses"])) {
            $addresses = $addresses . "<tr>\n\t\t\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t\t\t<td><code>{$email}</code>\n\t\t\t</tr>";
        }
    }
    $addresses = $addresses . "</table>";
    $addresses = "<div id='email_drr' style='width:99%;height:55px;overflow;auto'>{$addresses}</div>";
    $addresses = RoundedLightWhite($addresses) . "<br>";
    $form = "\n\t<table style='width:100%'>\n\t\n\t\n\t<tr>\n\t\t<td class=legend valign='top'>{enable}:</td>\n\t\t<td valign='top' width=80%>\n\t\t\t{$enable}\n\t\t</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top'>{vacation_message}:</td>\n\t\t<td valign='top' width=80%>\n\t\t\t<textarea name='message' id='message' style='width:100%;height:100px;overflow;auto'>{$message}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top'>{days}:</td>\n\t\t<td valign='top'>\n\t\t\t{$day}\n\t\t</td>\n\t</tr>\t\n\t</table>";
    $form = RoundedLightWhite($form);
    $html = "<H1>{rule}::{$sieve_rule_name}::{OUT_OF_OFFICE}</H1>\n\t<p class=caption>{OUT_OF_OFFICE_TEXT}</p>\n\t<div id='mform'>\n\t{$addresses}\n\t{$form}\n\t<hr>\n\t<div style='width:100%;text-align:right'><input type='button' OnClick=\"javascript:SieveVacantionSave();\" value='{save}&nbsp;&raquo;'></div>\n\t</div>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'users.out-of-office.php');
}
Beispiel #17
0
function popup()
{
    $sock = new sockets();
    $DisclaimerOutbound = $sock->GET_INFO("DisclaimerOutbound");
    $DisclaimerInbound = $sock->GET_INFO("DisclaimerInbound");
    $DisclaimerOrgOverwrite = $sock->GET_INFO("DisclaimerOrgOverwrite");
    if ($DisclaimerOrgOverwrite == null) {
        $DisclaimerOrgOverwrite = 0;
    }
    if ($DisclaimerOutbound == null) {
        $DisclaimerOutbound = 1;
    }
    if ($DisclaimerInbound == null) {
        $DisclaimerInbound = 0;
    }
    $form = "<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend>{enable_outbound}:</td>\n\t\t<td>" . Field_numeric_checkbox_img("DisclaimerOutbound", $DisclaimerOutbound, "{enable_disable}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{enable_inbound}:</td>\n\t\t<td>" . Field_numeric_checkbox_img("DisclaimerInbound", $DisclaimerInbound, "{enable_disable}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{overwritten_by_org}:</td>\n\t\t<td>" . Field_numeric_checkbox_img("DisclaimerOrgOverwrite", $DisclaimerOrgOverwrite, "{enable_disable}") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr><input type='button' OnClick=\"javascript:DisclaimerGlobalConfSave();\" value='{apply}&nbsp;&raquo;'></td>\n\t</tr>\n\t</table>";
    $form = RoundedLightWhite($form);
    $html = "<H1>{disclaimer} {parameters}</H1>\n\t<div id='disclaimerGlobalDiv'>{$form}</div>\n\t\n\t\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #18
0
function popup_start()
{
    $page = CurrentPageName();
    $quar = new GlobalQuarantine();
    $q = new mysql();
    $sql = "SELECT COUNT(MessageID) as tcount FROM quarantine";
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
    $message_number = $ligne["tcount"];
    if ($message_number == null) {
        $message_number = 0;
    }
    $sql = "SELECT COUNT(MessageID) as tcount FROM storage";
    $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
    $message_storage_number = $ligne["tcount"];
    if ($message_storage_number == null) {
        $message_storage_number = 0;
    }
    $html = "\n\t<input type='hidden' id='addextension_help' name='addextension_help' value='{addextension_help}'>\n\t\n\t<p class=caption>{quarantine_text}</p>\n\t<div style='width:100%;font-size:12px;font-weight:bold;text-align:right;border-bottom:1px dotted #CCCCCC;margin-bottom:3px'>\n\t{$message_number} {quarantine} {emails_recieved}&nbsp;|&nbsp;{$message_storage_number} {backup} {emails_recieved}</div>\n\t<div id='quarform'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'><img src='img/90-quarantaine.png'></td>\n\t\t<td valign='top'>\n\t\t\t<form name='FFMCOMPRESSS'>\n\t\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend>{QuarantineAutoCleanEnabled}:</td>\n\t\t\t\t\t<td>" . Field_numeric_checkbox_img('QuarantineAutoCleanEnabled', $quar->QuarantineAutoCleanEnabled, '{enable_disable}') . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend>{QuarantineMaxDayToLive}:</td>\n\t\t\t\t\t<td>" . Field_text('QuarantineMaxDayToLive', $quar->QuarantineMaxDayToLive, 'width:40px') . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend>{StorageAutoCleanEnabled}:</td>\n\t\t\t\t\t<td>" . Field_numeric_checkbox_img('StorageAutoCleanEnabled', $quar->StorageAutoCleanEnabled, '{enable_disable}') . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend>{StorageMaxDayToLive}:</td>\n\t\t\t\t\t<td>" . Field_text('StorageMaxDayToLive', $quar->StorageMaxDayToLive, 'width:40px') . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right'>\n\t\t\t\t<hr>\n\t\t\t\t" . button("{edit}", "SaveQuarantineConfig()") . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\t\n\t\t\t\n\t\t</table>\n\t\t</div>\n\t\t</form>\n\t\t\n\t\t</td>\n\t</tr>\n\t</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'postfix.index.php');
}
function main_plugins()
{
    $style = "style='padding:3px;border-bottom:1px dotted #CCCCCC'";
    $users = new usersMenus();
    if ($_GET["hostname"] == null) {
        $hostname = $users->hostname;
        $_GET["hostname"] = $hostname;
    } else {
        $hostname = $_GET["hostname"];
    }
    $spam = new spamassassin();
    $users = new usersMenus();
    $page = CurrentPageName();
    if (!$users->razor_installed) {
        $razor_but = Paragraphe_switch_disable("Razor", "{razor_text}");
    } else {
        $razor_but = Paragraphe_switch_img("Razor", "{razor_text}", "use_razor2", $spam->main_array["use_razor2"], "{enable_disable}", 600);
    }
    if (!$users->pyzor_installed) {
        $pyzor_but = Paragraphe_switch_disable("Pyzor", "{pyzor_text}");
    } else {
        $pyzor_but = Field_numeric_checkbox_img('use_pyzor', $spam->main_array["use_pyzor"], '{enable_disable}');
        $pyzor_but = Paragraphe_switch_img("Pyzor", "{pyzor_text}", "use_pyzor", $spam->main_array["use_pyzor"], "{enable_disable}", 600);
    }
    $html = "\n\n\t<form name='FFM_DANS5'>\n\t<input type='hidden' name='SaveGeneralSettings' value='yes'>\n\t\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td width=1% valign='top'>{$razor_but}</td>\n\t\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td width=1% valign='top'>{$pyzor_but}</td>\n\t\t\t\n\t\t<tr>\n\t<td {$style} colspan=2 align='right' valign='top'>\n\t<hr>\n\t" . button("{edit}", "ParseForm('FFM_DANS5','{$page}',true);") . "\n\t\n\t</tr>\n\n\t</table></FORM><br>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #20
0
function main_kaspersky(){
	$users=new usersMenus();
	$users->LoadModulesEnabled();
	$page=CurrentPageName();

	$html="
	<p style='font-size:12px;font-weight:bold'>{welcome_kaspersky}</p>
	<table style='width:100%'>
	";
	
	if($users->kas_installed){
		$html=$html . "<tr>
	<td width=1%>
		" . Field_numeric_checkbox_img('enable_kasper',$users->KasxFilterEnabled,'{enable_disable}').
	"</td>
	<td>{enable_kaspersky_antispam}</td>
	</tr>";
	
	
	}
	
	if($users->KAV_MILTER_INSTALLED){
		$html=$html . "<tr>
	<td width=1%>
		" . Field_numeric_checkbox_img('enable_kav',$users->KAVMILTER_ENABLED,'{enable_disable}').
	"</td>
	<td>{enable_kaspersky_antivirus}</td>
	</tr>";
	
	
	}	
	
	$html=$html . "
	<tr><td colspan=2 align='right'><input type='button' OnClick=\"javascript:kavStep2();\" value='{next}&nbsp;&raquo;'></td></tr>
	
	</table>";
	
	$tpl=new templates();
	echo $tpl->_ENGINE_parse_body($html);
	
}
Beispiel #21
0
function backup_config()
{
    $cyrusbackup = new cyrusbackup();
    $datas = $cyrusbackup->list[$_GET["backup-config"]];
    if ($datas["CONTAINER"] == null) {
        $datas["CONTAINER"] = "D";
    }
    if ($datas["MAX_CONTAINERS"] == null) {
        $datas["MAX_CONTAINERS"] = "3";
    }
    if ($datas["BACKUP_MAILBOXES"] == null) {
        $datas["BACKUP_MAILBOXES"] = "1";
    }
    if ($datas["BACKUP_DATABASES"] == null) {
        $datas["BACKUP_DATABASES"] = "1";
    }
    if ($datas["BACKUP_ARTICA"] == null) {
        $datas["BACKUP_ARTICA"] = "1";
    }
    if ($datas["STOP_SERVICES"] == null) {
        $datas["STOP_SERVICES"] = "1";
    }
    $backup_container = array("D" => "{day}", "W" => "{week}");
    $backup_container = Field_array_Hash($backup_container, "CONTAINER", $datas["CONTAINER"]);
    for ($i = 1; $i < 20; $i++) {
        $MaxContainer[$i] = $i;
    }
    $MaxContainer = Field_array_Hash($MaxContainer, "MAX_CONTAINERS", $datas["MAX_CONTAINERS"]);
    $BACKUP_MAILBOXES = Field_numeric_checkbox_img('BACKUP_MAILBOXES', $datas["BACKUP_MAILBOXES"], '{mailboxes_backup_explain}');
    $BACKUP_DATABASES = Field_numeric_checkbox_img('BACKUP_DATABASES', $datas["BACKUP_DATABASES"], '{databases_backup_explain}');
    $BACKUP_ARTICA = Field_numeric_checkbox_img('BACKUP_ARTICA', $datas["BACKUP_ARTICA"], '{artica_confs_explain}');
    $STOP_SERVICES = Field_numeric_checkbox_img('STOP_SERVICES', $datas["STOP_SERVICES"], '{STOP_SERVICES_BACKUP_EXPLAIN}');
    $perform_backup = Paragraphe("64-recycle.png", "{backup_now}", "{backup_now_text}", "javascript:CyrusBackupNow('{$_GET["backup-config"]}');");
    $form = "<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td valign='top' class=legend>{backup_container}:</td>\n\t\t\t<td valign='top'>{$backup_container}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top' class=legend>{max_backup_container}:</td>\n\t\t\t<td valign='top'>{$MaxContainer}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top' class=legend>{stop_services}:</td>\n\t\t\t<td valign='top'>{$STOP_SERVICES}</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td colspan=2><hr><H3>{what_to_backup}</H3></td></tr>\n\t\t<tr>\n\t\t\t<td valign='top' class=legend>{mailboxes}:</td>\n\t\t\t<td valign='top'>{$BACKUP_MAILBOXES}</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td valign='top' class=legend>{databases}:</td>\n\t\t\t<td valign='top'>{$BACKUP_DATABASES}</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td valign='top' class=legend>{artica_confs}:</td>\n\t\t\t<td valign='top'>{$BACKUP_ARTICA}</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td colspan=2 align=right>\n\t\t\t\t<hr>\n\t\t\t<input type='button' OnClick=\"javascript:SaveBackupCyrusSettings('{$_GET["backup-config"]}');\" value='{apply}&nbsp;&raquo;'>\n\t\t\t</td>\n\t\t</tr>\t\t\t\t\t\t\t\n\t\t</table>\n\t";
    $form = RoundedLightWhite($form);
    $html = "<H1>{$_GET["backup-config"]}::{settings}</H1>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>{$perform_backup}</td>\n\t\t<td valign='top'>\n\t\t\t<div id='CyrBackDiv'>{$form}</div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'cyrus.index.php,artica.backup.index.php,dar.index.php');
}
Beispiel #22
0
function section_general()
{
    $tab = _tabs();
    $kas = new kas_single();
    $OPT_SPAM_RATE_LIMIT_TABLE = array(4 => "{maximum}", 3 => "{high}", 2 => "{normal}", 1 => "{minimum}");
    $OPT_SPAM_RATE_LIMIT = Field_array_Hash($OPT_SPAM_RATE_LIMIT_TABLE, 'OPT_SPAM_RATE_LIMIT', $kas->main_array["OPT_SPAM_RATE_LIMIT"]);
    $page = CurrentPageName();
    $html = "\t{$tab}\n<H5>{general}</h5>\n\n<table style='width:100%' class=table_form>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_FILTRATION_ON}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_FILTRATION_ON', $kas->main_array["OPT_FILTRATION_ON"], '{enable_disable}') . "</td>\n\t<td>{OPT_FILTRATION_ON_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_SPAM_RATE_LIMIT}:</strong></td>\n\t<td>{$OPT_SPAM_RATE_LIMIT}</td>\n\t<td>{OPT_SPAM_RATE_LIMIT_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_PROBABLE_SPAM_ON}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_PROBABLE_SPAM_ON', $kas->main_array["OPT_PROBABLE_SPAM_ON"], '{enable_disable}') . "</td>\n\t<td>{OPT_PROBABLE_SPAM_ON_TEXT}</td>\n</tr>\n\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_USE_DNS}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_USE_DNS', $kas->main_array["OPT_USE_DNS"], '{enable_disable}') . "</td>\n\t<td>{OPT_USE_DNS_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_USE_SURBL}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_USE_SURBL', $kas->main_array["OPT_USE_SURBL"], '{enable_disable}') . "</td>\n\t<td>{OPT_USE_SURBL_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{ACTION_SPAM_SUBJECT_PREFIX}:</strong></td>\n\t<td colspan=2>" . Field_text('ACTION_SPAM_SUBJECT_PREFIX', $kas->ACTION_SPAM_SUBJECT_PREFIX, 'width:150px') . "</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{ACTION_PROBABLE_SUBJECT_PREFIX}:</strong></td>\n\t<td colspan=2>" . Field_text('ACTION_PROBABLE_SUBJECT_PREFIX', $kas->ACTION_PROBABLE_SUBJECT_PREFIX, 'width:150px') . "</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{ACTION_BLACKLISTED_SUBJECT_PREFIX}:</strong></td>\n\t<td colspan=2>" . Field_text('ACTION_BLACKLISTED_SUBJECT_PREFIX', $kas->ACTION_BLACKLISTED_SUBJECT_PREFIX, 'width:150px') . "</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{ACTION_FORMAL_SUBJECT_PREFIX}:</strong></td>\n\t<td colspan=2>" . Field_text('ACTION_FORMAL_SUBJECT_PREFIX', $kas->ACTION_FORMAL_SUBJECT_PREFIX, 'width:150px') . "</td>\n</tr>\n\n\n\n\n\n<tr><td colspan=3 align=right><input type='button' value='{edit}&nbsp;&raquo;' OnClick=\"javascript:ParseForm('FFM1','{$page}',true);\"></td></tr>\n</table>";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
Beispiel #23
0
function FormRules($array, $editmode = 0, $rulenumber = 0)
{
    $page = CurrentPageName();
    $title = "<div style='font-size:16px;text-align:right'>{$array["poll"]}</div>";
    $sock = new sockets();
    $FetchMailGLobalDropDelivered = $sock->GET_INFO("FetchMailGLobalDropDelivered");
    if (!is_numeric($FetchMailGLobalDropDelivered)) {
        $FetchMailGLobalDropDelivered = 0;
    }
    $proto = array("" => "{select}", "auto" => "AUTO IMAP, POP3,POP2", "pop2" => "Post Office Protocol 2", "pop3" => "Post Office Protocol 3", "apop" => "POP3 with old-fashioned MD5-challenge authentication.", "rpop" => "POP3 RPOP authentication.", "kpop" => "POP3 Kerberos V4 (port 1109).", "sdps" => "POP3 Demon Internet SDPS extensions.", "imap" => "IMAP2bis, IMAP4,IMAP4rev1", "etrn" => "ESMTP ETRN", "odmr" => "On-Demand Mail Relay ESMTP profile. ", "hotmail" => "Get Live Hotmail (@hotmail.x/@live.x)");
    $user = new usersMenus();
    if ($user->hotwayd_installed == true) {
        $proto["httpp"] = "HTTP/webmail providers (lycos...)";
    }
    $proto = Field_array_Hash($proto, '_proto', $array["proto"], "FetchMailParseConfig()", null, 0, 'width:180px');
    $tracepolls = Field_checkbox('_tracepolls', 1, $array["tracepolls"]);
    $ssl = Field_checkbox('_ssl', 1, $array["ssl"]);
    $fetchall = Field_checkbox('_fetchall', 1, $array["fetchall"]);
    $keep = Field_checkbox('_keep', 1, $array["keep"]);
    $nokeep = Field_checkbox('_nokeep', 1, $array["nokeep"]);
    $sslcertck = Field_checkbox('_sslcertck', 1, $array["sslcertck"]);
    $dropdelivered = Field_checkbox('_dropdelivered', 1, $array["dropdelivered"], null, "{dropdelivered_explain}");
    if ($array["is"] == null) {
        if ($_SESSION["uid"] == -100) {
            $array["is"] = "{select_user}";
        } else {
            $ldap = new clladp();
            $h = $ldap->UserDatas($_SESSION["uid"]);
            $_GET["uid"] = $_SESSION["uid"];
            $array["is"] = $h["mail"];
        }
    }
    $form = "\n\t\n\t<H3>{server_options}</H3>\n\t<table style='width:100%' class=table_form>\n\t<tr>\n\t\t<td align='right' class=legend>{enable}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_numeric_checkbox_img('_enabled', $array["enabled"], '{enable_disable}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' class=legend>{server}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_text('MailBoxServer', $array["poll"], 'width:90%') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' class=legend nowrap>{aka}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_text('_aka', $array["aka"], 'width:90%') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' class=legend>{protocol}</strong>:&nbsp;</td>\n\t\t<td align='left'>{$proto}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' class=legend>{port}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_text('_port', $array["port"], 'width:20%') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' class=legend>{ssl_fingerprint}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_text('_fingerprint', $array["sslfingerprint"], 'width:220px', null, null) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' class=legend>{dropdelivered}</strong>:&nbsp;</td>\n\t\t<td align='left'>{$dropdelivered}</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' class=legend>{timeout}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_text('_timeout', $array["timeout"], 'width:20%') . "</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td align='right' class=legend>{interval}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_text('_interval', $array["interval"], 'width:20%', null, null, '{interval_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' class=legend>{ssl_fingerprint}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_text('_fingerprint', $array["sslfingerprint"], 'width:220px', null, null) . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td colspan=2 align='right'>" . texttooltip("{import_fingerprint}", "{import_fingerprint}", "Loadjs('{$page}?ssl-fingerprint=yes&LdapRules={$rulenumber}&uid={$_GET["uid"]}')") . "</td>\t\n\t<tr>\n\t<td colspan=2>\n\t<table>\n\t\t<tr>\n\t\t<td align='right' class=legend>{tracepolls}</strong>:&nbsp;</td>\n\t\t<td align='left'>{$tracepolls}&nbsp;</td>\t\n\t\t<td width=1%>&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\t\n\t\t<td align='right' class=legend>{ssl}</strong>:&nbsp;</td>\n\t\t<td align='left'>{$ssl}&nbsp;</td>\n\t\t<td width=1%>&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\t\n\t\t<td align='right' class=legend>{sslcertck}</strong>:&nbsp;</td>\n\t\t<td align='left'>{$sslcertck}&nbsp;</td>\n\t\t<td width=1%>" . help_icon("{sslcertck_text}") . "</td>\n\t\t</tr>\t\t\n\t\t\n\t\t<tr>\n\t\t<td align='right' class=legend>{fetchall}</strong>:&nbsp;</td>\n\t\t<td align='left'>{$fetchall}&nbsp;</td>\n\t\t<td width=1%>&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right' class=legend>{keepmess}</strong>:&nbsp;</td>\n\t\t\t<td align='left'>{$keep}&nbsp;</td>\n\t\t\t<td width=1%>&nbsp;</td>\t\n\t\t</tr>\n\t\t\t<td align='right' class=legend>{nokeepmess}</strong>:&nbsp;</td>\n\t\t\t<td align='left'>{$nokeep}&nbsp;</td>\n\t\t\t<td width=1%>&nbsp;</td>\t\n\t\t</tr>\n\t\t\n\t\t\n\t\t\n\t\t\n</table>\n</td>\n</tR>\n</table>\n\t";
    $user = new usersMenus();
    if ($user->AsMailBoxAdministrator or $user->AsPostfixAdministrator) {
        $is = "<span onMouseOver=\"javascript:AffBulle('{cliktochange}');lightup(this, 100);\" \n\t\tOnMouseOut=\"javascript:HideBulle();lightup(this, 50);\" \n\t\tstyle=\"filter:alpha(opacity=50);-moz-opacity:0.5;border:0px;\" \n\t\tOnClick=\"javascript:ChangeFetchMailUser();\">\n\t\t<a href='#' id='is_html' style='font-size:11px;font-weight:bold;text-decoration:underline'>{$array["is"]}</a>\n\t\t</span>\n\t\t";
    } else {
        $is = $array["is"];
    }
    $form2 = "\n\t<H3>{user_option}</H3>\n\t<span id='hotmailexplain'></span>\n\t<table style='width:100%' class=table_form>\n\t<tr>\n\t\t<td align='right' class=legend>{remoteuser}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_text('_user', $array["user"], 'width:70%') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' class=legend>{password}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_password('_pass', $array["pass"], 'width:70%') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' class=legend>{localuser}</strong>:&nbsp;</td>\n\t\t<td align='left'>{$is}<input type='hidden' name='_is' value='{$array["is"]}' id='_is'></td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' class=legend>{multidrop}</strong>:&nbsp;</td>\n\t\t<td align='left'>" . Field_checkbox('_multidrop', 1, $array["multidrop"], '{enable_disable}') . "</td></td>\n\t</tr>\t\t\t\n\n\t</table>\n\t\t";
    if ($editmode == 1) {
        $button = button("{edit}", "FetchMailPostForm({$editmode})");
        $button_delete = button("{delete}", "UserDeleteFetchMailRule({$rulenumber})");
        if ($_SESSION["uid"] != -100) {
            $button_delete = null;
        }
    } else {
        $button = button("{add}", "FetchMailPostForm({$editmode})");
    }
    $option1 = Paragraphe("64-idisk-server.png", '{server_options}', '{server_options}', "javascript:SwitchFetchMailUserForm('server_options');", null, 180, 20);
    $option2 = Paragraphe("64-folder-user.png", '{user_option}', '{user_option}', "javascript:SwitchFetchMailUserForm('users_options');", null, 180, 20);
    $html = "\n\t<div id='fetchmailadvrule'>\n\t{$title}\n\t<input type='hidden' id='uid' value='{$_GET["uid"]}'>\n\t<input type='hidden' id='rule_number' value='{$rulenumber}'>\n\t<input type='hidden' id='confirm' value='{confirm}'>\n\t<input type='hidden' id='ChangeFetchMailUserText' value='{ChangeFetchMailUserText}'>\n\t<input type='hidden' id='hotmail_text' value='{hotmail_text}'>\n\t<input type='hidden' id='hotwayd_text' value='{hotwayd_text}'>\n\t<form name='FFM1'>\n\t<div style='margin-top:-5px'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>{$option1} {$option2}\n\t\t</td>\n\t<td valign='top' width=80%>\n\t\t<div id='server_options' style='display:block'>\n\t\t\t{$form}\n\t\t</div>\n\t\t<div id='users_options' style='display:none'>\n\t\t\t{$form2}\n\t\t</div>\n\t\t\t<div style='text-align:right;width:100%'>\n\t\t\t{$button_delete}{$button}\n\t\t\t</div>\t\n\t</td>\n\t</tr>\n\t</table>\t\t\t\n\t</div>\n\t</form>\n\t</div>\n\t<script>\n\t\tfunction CheckForms(){\n\t\t\tvar FetchMailGLobalDropDelivered={$FetchMailGLobalDropDelivered};\n\t\t\tif(FetchMailGLobalDropDelivered==1){\n\t\t\t\tdocument.getElementById('_dropdelivered').checked=true;\n\t\t\t\tdocument.getElementById('_dropdelivered').disabled=true;\n\t\t\t}\n\t\t}\n\tCheckForms();\n\t</script>\n\t\n\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
function main_config()
{
    $retranslator = new retranslator();
    $page = CurrentPageName();
    $myserver = $_SERVER['SERVER_NAME'];
    if (preg_match("#(.+?):(.+)#", $myserver)) {
        $myserver = $re[1];
    }
    if ($retranslator->RetranslatorHttpdEnabled == 1) {
        $explain = "<p style='font-size:13px;font-weight:bold;color:#005447'>{RETRANSLATOR_CONNECT_URI}</p>\n\t\t<a href='http://{$myserver}:{$retranslator->RetranslatorHttpdPort}' style='font-size:13px'>http://{$myserver}:{$retranslator->RetranslatorHttpdPort}<a>\n\t\t";
    }
    $html = "{$tab}<br><H5>{http_engine}</h5>\n\t{$explain}\n\t<FORM NAME='FFM1'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td colspan=2 style='border-top:1px solid #CCCCCC;padding-top:3px' >\n\t\t<input type='hidden' id='save' value='yes' name='save'>\n\t\t<tr>\n\t\t<td class=legend>{RetranslatorHttpdEnabled}:</td>\n\t\t<td>" . Field_numeric_checkbox_img('RetranslatorHttpdEnabled', $retranslator->RetranslatorHttpdEnabled, '{enabled_disabled}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td class=legend>{RetranslatorHttpdPort}:</td>\n\t\t<td>" . Field_text('RetranslatorHttpdPort', $retranslator->RetranslatorHttpdPort, 'width:80px') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'>\n\t\t\t<hr>\n\t\t\t" . button("{edit}", "ParseForm('FFM1','{$page}',true);") . "\n\t\t\t\n\t\t</td>\n\t\t</tr>\n\t</table>\n\t</FORM>\n\t";
    $html = $html . "<H5>{retranslator_engine}</h5>";
    $regions = array("am", "ar", "at", "az", "be", "bg", "br", "by", "ca", "cl", "cn", "cs", "cz", "de", "ee", "es", "fr", "gb", "ge", "gr", "hk", "hu", "it", "jp", "kg", "kr", "kz", "lt", "lv", "md", "mx", "nl", "pl", "ro", "ru", "th", "tj", "tm", "tr", "tw", "ua", "uk", "us", "uz");
    while (list($num, $ligne) = each($regions)) {
        $hash_regions[$ligne] = $ligne;
    }
    $RetranslatorRegionSettings = Field_array_Hash($hash_regions, 'RetranslatorRegionSettings', $retranslator->RetranslatorRegionSettings);
    $loglevel = array(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 9 => 9);
    $RetranslatorReportLevel = Field_array_Hash($loglevel, 'RetranslatorReportLevel', $retranslator->RetranslatorReportLevel);
    $html = $html . "\n\t<FORM NAME='FFM2'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td colspan=3 style='border-top:1px solid #CCCCCC;padding-top:3px' >\n\t\t<input type='hidden' id='save' value='yes' name='save'>\n\t\t<tr>\n\t\t<tr>\n\t\t<td class=legend>{RetranslatorEnabled}:</td>\n\t\t<td>" . Field_numeric_checkbox_img('RetranslatorEnabled', $retranslator->RetranslatorEnabled, '{enabled_disabled}') . "</td>\n\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorCronMinutes}:</td>\n\t\t\t<td>" . Field_text('RetranslatorCronMinutes', $retranslator->RetranslatorCronMinutes, 'width:40px') . "&nbsp;mn</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorReportLevel}:</td>\n\t\t\t<td>{$RetranslatorReportLevel}</td>\n\t\t\t<td>" . help_icon('{RetranslatorReportLevel_text}') . "</td>\n\t\t</tr>\t\t\n\t\t\n\t\t<tr><td colspan=3><H3 style='margin-top:8px;margin-bottom:5px;border-bottom:1px solid #CCCCCC'>{sources_settings}</h3></td></tr>\n\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorRegionSettings}:</td>\n\t\t\t<td>{$RetranslatorRegionSettings}</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t\t\n\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorUseUpdateServerUrl}:</td>\n\t\t\t<td>" . Field_yesno_checkbox('RetranslatorUseUpdateServerUrl', $retranslator->RetranslatorUseUpdateServerUrl) . "</td>\n\t\t\t<td>" . help_icon('{RetranslatorUseUpdateServerUrl_text}') . "</td>\n\t\t</tr>\t\n\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorUpdateServerUrl}:</td>\n\t\t\t<td>" . Field_text('RetranslatorUpdateServerUrl', $retranslator->RetranslatorUpdateServerUrl, 'width:250px') . "</td>\n\t\t\t<td>" . help_icon('{RetranslatorUpdateServerUrl_text}') . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorUseUpdateServerUrlOnly}:</td>\n\t\t\t<td>" . Field_yesno_checkbox('RetranslatorUseUpdateServerUrlOnly', $retranslator->RetranslatorUseUpdateServerUrlOnly) . "</td>\n\t\t\t<td>" . help_icon('{RetranslatorUseUpdateServerUrlOnly_text}') . "</td>\n\t\t</tr>\t\t\t\n\t\t\n\t\t\n\t\t<tr><td colspan=3><H3 style='margin-top:8px;margin-bottom:5px;border-bottom:1px solid #CCCCCC'>{proxy_settings}</h3></td></tr>\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorUseProxy}:</td>\n\t\t\t<td>" . Field_yesno_checkbox('RetranslatorUseProxy', $retranslator->RetranslatorUseProxy) . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\t\t\n\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{RetranslatorProxyAddress}:</td>\n\t\t\t<td>" . Field_text('RetranslatorProxyAddress', $retranslator->RetranslatorProxyAddress, 'width:250px') . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t<tr>\n\t\t\t<td colspan=3 align='right'>\n\t\t\t\t\t<hr>" . button("{edit}", "ParseForm('FFM2','{$page}',true);") . "\n\t\t</td>\n\t\t</tr>\n\t</table>\n\t</FORM>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "index.retranslator.php");
}
Beispiel #25
0
function AdressBookPopup(){
	include_once('ressources/class.artica.inc');
	$users=new usersMenus();
	$artica=new artica_general();
	$info=Paragraphe_switch_img('{remote_addressbook}','{remote_addressbook_explain}','EnableRemoteAddressBook',$artica->EnableRemoteAddressBook,'{enable_disable}',290);
	$singleAddressBook=Paragraphe_switch_img('{per_user_addressbook}','{per_user_addressbook_explain}','EnablePerUserRemoteAddressBook',$artica->EnablePerUserRemoteAddressBook,'{enable_disable}',290);
	$singleAddressBook_button="<input type='button' OnClick=\"javascript:AdressBookAcls();\" value='{edit_acls}&nbsp;&raquo;'>";
	
	
	if($users->SLPAD_LOCKED){
		$info=Paragraphe('warning64.png','{error}','{ERROR_SLAPDCONF_LOCKED}',null,null,210,null,1);
		$singleAddressBook=null;
		$singleAddressBook_button=null;
	}
	
	$singleAddressBook_button=null;
	
$html="<div id='rdr'>
	<H1>{remote_addressbook}</H1>
	<p class=caption>{remote_addressbook_text}</p>
	<table style='width:100%'>
	<tr>

	<td valign='top' width=100%>
		<table style='width:100%'>
		<tr>
			<td valign='top' style='width:300px'>
				$info
			</td>
			<td valign='top'>
				<input type='button' OnClick=\"javascript:AddressBookSave();\" value='{edit}&nbsp;&raquo;'>
			</td>
		</tr>
		</table>
		
		<br>
		
		<table style='width:100%'>
		<tr>
			<td valign='top' style='width:300px'>
				$singleAddressBook
			</td>
			<td valign='top'>
				<input type='button' OnClick=\"javascript:AddressBookSave();\" value='{edit}&nbsp;&raquo;'>
				<hr>
				<table style='width:100%'>
					<tr>
						<td class=legend>{enable_non_encrypted_sessions}</td>
						<td>" . Field_numeric_checkbox_img('EnableNonEncryptedLdapSession',$users->EnableNonEncryptedLdapSession)."</td>
					</tr>
				</table>
				$singleAddressBook_button
			</td>
		</tr>
		</table>		
		
		
		
	</td>
	
	</tr>
	</table>
	</div>
	";
	
	$tpl=new templates();
	return  $tpl->_ENGINE_parse_body($html);		

}
function masters_list()
{
    $q = new mysql();
    if (isset($_GET["delete"])) {
        $sql = "DELETE FROM vpnclient WHERE ID={$_GET["delete"]}";
        $q->QUERY_SQL($sql, "artica_backup");
        if ($q->ok) {
            $sock = new sockets();
            $sock->getFrameWork("openvpn.php?restart-clients=yes");
        }
    }
    $sql = "SELECT ID,enabled,servername,serverport,connexion_name,connexion_type,routes FROM vpnclient WHERE connexion_type=2 ORDER BY ID DESC";
    $results = $q->QUERY_SQL($sql, "artica_backup");
    $html = "<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n\t<thead class='thead'>\n\t\t<tH>" . imgtootltip("refresh-24.png", "{refresh}", "RefreshOpenVPNMasterList()") . "</th>\n\t\t<th>{status}</th>\n\t\t<th>{connexion_name}</th>\n\t\t<th>{master_server}</th>\n\t\t<th>{port}</th>\n\t\t<th>{enable}</th>\n\t\t<th>&nbsp;</th>\n\t\t</tr>\n\t</thead>\n<tbody class='tbody'>\t\t\n\t";
    $sock = new sockets();
    $count = 0;
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        //$js="EditVPNRemoteSite('{$ligne["ID"]}');";
        //$jsDownload="VPNRemoteSiteConfig('{$ligne["ID"]}');";
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $running = $sock->getFrameWork("openvpn.php?is-client-running={$ligne["ID"]}");
        if ($running == "TRUE") {
            $img_running = "32-green.png";
        } else {
            $img_running = "danger32.png";
            $count = $count + 1;
        }
        $enabled = Field_numeric_checkbox_img("enabled_{$ligne["ID"]}", $ligne["enabled"], "{enable_disable}", "OPenVPNServerEnable");
        if ($ligne["enabled"] == 1) {
            $session_infos = sessions_infos($ligne["ID"]);
            $ligne["connexion_name"] = texttooltip($ligne["connexion_name"], $session_infos, null, null, 0, "font-size:13px");
            $ligne["servername"] = texttooltip($ligne["servername"], $session_infos, null, null, 0, "font-size:13px");
            $ligne["serverport"] = texttooltip($ligne["serverport"], $session_infos, null, null, 0, "font-size:13px");
        }
        $ahref = "<a href=\"javascript:blur();\" OnClick=\"javscript:EditVpnClientID('{$ligne["ID"]}')\" style='font-size:14px;text-decoration:underline'>";
        $html = $html . "\n\t\t\t<tr  class={$classtr}>\n\t\t\t<td  width=1% style='font-size:13px' valign='middle' align='center'>{$ahref}tun{$ligne["ID"]}</a></td>\n\t\t\t<td with=1% style='font-size:13px' valign='middle' align='center'><img src='img/{$img_running}'></td>\n\t\t\t<td nowrap style='font-size:13px' valign='middle' align='center'>{$ahref}{$ligne["connexion_name"]}</a></td>\n\t\t\t<td nowrap style='font-size:13px' valign='middle' align='center'>{$ahref}{$ligne["servername"]}</a></td>\n\t\t\t<td nowrap style='font-size:13px' valign='middle' align='center'>{$ahref}{$ligne["serverport"]}</a></td>\n\t\t\t<td nowrap valign='middle' align='center'>{$enabled}</td>\n\t\t\t<td width=1% valign='middle' align='center'>" . imgtootltip("delete-32.png", "{delete}", "RemoteClientVPNDelete('{$ligne["ID"]}')") . "</td>\n\t\t\t</tr>\n\t\t\n\t\t\t";
    }
    $buttonPLus = "\n\t\t<div style='text-align:right;padding:5px'>\n\t\t\t" . button("{reconnect_vpn_clients}", "OPenVPNReconnectClients()") . "\n\t\t</div>\n\t\t\n\t\t";
    $html = $html . "\n\t</table>{$buttonPLus}";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html, "users.openvpn.index.php");
}
function TOOL_SYNC_STEP2()
{
    $uid = $_GET["uid"];
    $next_uid = $_GET["sync_next_user"];
    $html = "\n\t<input type='hidden' id='export_launched' value='0'>\n\t<input type='hidden' id='mailbox_from' value='{$uid}'>\n\t<input type='hidden' id='mailbox_to' value='{$next_uid}'>\n\t<table style='width:100%;padding:3px;border:1px solid #CCCCCC'>\n\t\t<tr>\n\t\t<td colspan=4 align='right'></td>\n\t<tr>\n\t<tr>\n\t\t<td colspan=4 align='center' style='border-bottom:1px dotted #CCCCCC'><strong style='font-size:12px'>{export_mailbox}</strong></td>\n\t<tr>\n\t\t<td align='center'><img src='img/mailbox.png'></td>\n\t\t<td align='center' width=1%><img src='img/fw_bold.gif'></td>\n\t\t<td align='center'><img src='img/mailbox.png'></td>\n\t</tr>\n\t<tr>\n\t\t<td align='center'><strong>{$uid}</strong></td>\n\t\t<td align='center' width=1%>&nbsp;</td>\n\t\t<td align='center'><strong>{$next_uid}</strong></td>\n\t</tr>\t\n\t</table>\n\t<br>\n\t<table style='width:100%;padding:3px;border:1px solid #CCCCCC'>\n\t<tr>\n\t\t<td class=legend nowrap>{delete_messages}:</td>\n\t\t<td>" . Field_numeric_checkbox_img('delete_messages', 0, "{delete_messages_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap><span id='wait'></span></td>\n\t\t<td align='right'><input type='button' OnClick=\"javascript:ExportMailboxDo()\" value='{launch}&nbsp;&raquo;&raquo;'></td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=2 align='center'>\n\t\t<div id='EXPORT_LOGS_IMAPSYNC' style='width:97%;height:200px;overflow:auto;border:1px dotted #CCCCCC;padding:3px;margin:3px;background-color:white'></div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t</div>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #28
0
function greylist_popup()
{
    $sock = new sockets();
    $EnableDelaying = $sock->GET_INFO("ASSPEnableDelaying");
    $ini = new Bs_IniHandler();
    $ini->loadString($sock->GET_INFO("ASSPDelayingConfig"));
    if ($ini->_params["CONF"]["DelayGripvalue"] == null) {
        $ini->_params["CONF"]["DelayGripvalue"] = "0.4";
    }
    if ($ini->_params["CONF"]["DelaySSL"] == null) {
        $ini->_params["CONF"]["DelaySSL"] = "1";
    }
    if ($ini->_params["CONF"]["DelayEmbargoTime"] == null) {
        $ini->_params["CONF"]["DelayEmbargoTime"] = "5";
    }
    if ($ini->_params["CONF"]["DelayWaitTime"] == null) {
        $ini->_params["CONF"]["DelayWaitTime"] = "28";
    }
    if ($ini->_params["CONF"]["DelayExpiryTime"] == null) {
        $ini->_params["CONF"]["DelayExpiryTime"] = "36";
    }
    $enable = Paragraphe_switch_img("{enable} {greylisting}", "{EnableDelaying_text}", "ASSPEnableDelaying", $EnableDelaying);
    $form = "\n\t<div id='asspgrey'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>{$enable}</td>\n\t<td valign='top'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend>{DelayGripvalue}:</td>\n\t\t<td>" . Field_text("DelayGripvalue", $ini->_params["CONF"]["DelayGripvalue"], "width:50px") . "</td>\n\t\t<td>" . help_icon("{DelayGripvalue_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{DelayEmbargoTime}:</td>\n\t\t<td>" . Field_text("DelayEmbargoTime", $ini->_params["CONF"]["DelayEmbargoTime"], "width:50px") . "&nbsp;mn</td>\n\t\t<td>" . help_icon("{DelayEmbargoTime_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{DelayWaitTime}:</td>\n\t\t<td>" . Field_text("DelayWaitTime", $ini->_params["CONF"]["DelayWaitTime"], "width:50px") . "&nbsp;H</td>\n\t\t<td>" . help_icon("{DelayWaitTime_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{DelayExpiryTime}:</td>\n\t\t<td>" . Field_text("DelayExpiryTime", $ini->_params["CONF"]["DelayExpiryTime"], "width:50px") . "&nbsp;{days}</td>\n\t\t<td>" . help_icon("{DelayExpiryTime_text}") . "</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td class=legend>{DelaySSL}:</td>\n\t\t<td>" . Field_numeric_checkbox_img("DelaySSL", $ini->_params["CONF"]["DelaySSL"], "{DelaySSL_text}") . "</td>\n\t\t<td>" . help_icon("{DelaySSL_text}") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t\n\t\t<td colspan=3 align='right'><hr><input type='button' OnClick=\"javascript:ASSPGreyListSave();\" value='{apply}&nbsp;&raquo;'>\n\t</tr>\n\t\n\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t";
    $html = "<H1>{greylisting}</H1>\n\t<p class=caption>{grelisting_text}</p>{$form}";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #29
0
function main_rule()
{
    $page = CurrentPageName();
    $kas = new kas_mysql($_GET["ou"]);
    $OPT_SPAM_RATE_LIMIT_TABLE = array(4 => "{maximum}", 3 => "{high}", 2 => "{normal}", 1 => "{minimum}");
    $OPT_SPAM_RATE_LIMIT = Field_array_Hash($OPT_SPAM_RATE_LIMIT_TABLE, 'OPT_SPAM_RATE_LIMIT', $kas->GET_KEY("OPT_SPAM_RATE_LIMIT"), null, null, 0, "font-size:14px");
    $page = CurrentPageName();
    $html = "\t{$tab}\n<table style='width:100%'>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_SPAM_RATE_LIMIT}:</strong></td>\n\t<td>{$OPT_SPAM_RATE_LIMIT}</td>\n\t<td>" . help_icon("{OPT_SPAM_RATE_LIMIT_TEXT}") . "</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_USE_DNS}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_USE_DNS', $kas->GET_KEY("OPT_USE_DNS"), '{enable_disable}') . "</td>\n\t<td>" . help_icon("{OPT_USE_DNS_TEXT}") . "</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_DNS_HOST_IN_DNS}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_DNS_HOST_IN_DNS', $kas->GET_KEY("OPT_DNS_HOST_IN_DNS"), '{enable_disable}') . "</td>\n\t<td>{OPT_DNS_HOST_IN_DNS_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_SPF}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_SPF', $kas->GET_KEY("OPT_SPF"), '{enable_disable}') . "</td>\n\t<td>{OPT_SPF_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_HEADERS_TO_UNDISCLOSED}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_HEADERS_TO_UNDISCLOSED', $kas->GET_KEY("OPT_HEADERS_TO_UNDISCLOSED"), '{enable_disable}') . "</td>\n\t<td>{OPT_HEADERS_TO_UNDISCLOSED_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{HEADERS_FROM_OR_TO_DIGITS}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_HEADERS_FROM_OR_TO_DIGITS', $kas->GET_KEY("OPT_HEADERS_FROM_OR_TO_DIGITS"), '{enable_disable}') . "</td>\n\t<td>{HEADERS_FROM_OR_TO_DIGITS_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{HEADERS_FROM_OR_TO_NO_DOMAIN}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_HEADERS_FROM_OR_TO_NO_DOMAIN', $kas->GET_KEY("OPT_HEADERS_FROM_OR_TO_NO_DOMAIN"), '{enable_disable}') . "</td>\n\t<td>{HEADERS_FROM_OR_TO_NO_DOMAIN_TEXT}</td>\n</tr>\n\n\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_HEADERS_SUBJECT_TOO_LONG}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_HEADERS_SUBJECT_TOO_LONG', $kas->GET_KEY("OPT_HEADERS_SUBJECT_TOO_LONG"), '{enable_disable}') . "</td>\n\t<td>{OPT_HEADERS_SUBJECT_TOO_LONG_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_HEADERS_SUBJECT_WS_OR_DOTS}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_HEADERS_SUBJECT_WS_OR_DOTS', $kas->GET_KEY("OPT_HEADERS_SUBJECT_WS_OR_DOTS"), '{enable_disable}') . "</td>\n\t<td>{OPT_HEADERS_SUBJECT_WS_OR_DOTS_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_HEADERS_SUBJECT_DIGIT_OR_TIME_ID}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_HEADERS_SUBJECT_DIGIT_OR_TIME_ID', $kas->GET_KEY("OPT_HEADERS_SUBJECT_DIGIT_OR_TIME_ID"), '{enable_disable}') . "</td>\n\t<td>{OPT_HEADERS_SUBJECT_DIGIT_OR_TIME_ID_TEXT}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_LANG_KOREAN}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_LANG_KOREAN', $kas->GET_KEY("OPT_LANG_KOREAN"), '{enable_disable_kas}') . "</td>\n\t<td>{eastern_encodings}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_LANG_CHINESE}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_LANG_CHINESE', $kas->GET_KEY("OPT_LANG_CHINESE"), '{enable_disable_kas}') . "</td>\n\t<td>{eastern_encodings}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_LANG_JAPANESE}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_LANG_JAPANESE', $kas->GET_KEY("OPT_LANG_JAPANESE"), '{enable_disable_kas}') . "</td>\n\t<td>{eastern_encodings}</td>\n</tr>\n<tr>\n\t<td align='right' nowrap class=legend>{OPT_LANG_THAI}:</strong></td>\n\t<td>" . Field_numeric_checkbox_img('OPT_LANG_THAI', $kas->GET_KEY("OPT_LANG_THAI"), '{enable_disable_kas}') . "</td>\n\t<td>{eastern_encodings}</td>\n</tr>\n\n\n\n<tr><td colspan=3 align=right>\n\t\t\t<hr>\n\t\t\t\t" . button("{apply}", "OPT_SPAM_RATE_LIMIT()") . "\n\t\t</td></tr>\n</table>\n\n\n\t<script>\n\t\tvar x_OPT_SPAM_RATE_LIMIT= function (obj) {\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue);}\n\t\t\tRefreshTab('main_rule_kas3');\n\t\t}\t\n\t\t\tfunction OPT_SPAM_RATE_LIMIT(){\n\t\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\t\t\t\tXHR.appendData('OPT_SPAM_RATE_LIMIT',document.getElementById('OPT_SPAM_RATE_LIMIT').value);\n\t\t\t\t\tXHR.appendData('OPT_USE_DNS',document.getElementById('OPT_USE_DNS').value);\n\t\t\t\t\tXHR.appendData('OPT_HEADERS_TO_UNDISCLOSED',document.getElementById('OPT_HEADERS_TO_UNDISCLOSED').value);\n\n\t\t\t\t\tXHR.appendData('OPT_HEADERS_FROM_OR_TO_DIGITS',document.getElementById('OPT_HEADERS_FROM_OR_TO_DIGITS').value);\n\t\t\t\t\tXHR.appendData('OPT_HEADERS_FROM_OR_TO_NO_DOMAIN',document.getElementById('OPT_HEADERS_FROM_OR_TO_NO_DOMAIN').value);\t\t\t\t\t\n\t\t\t\t\tXHR.appendData('OPT_HEADERS_SUBJECT_TOO_LONG',document.getElementById('OPT_HEADERS_SUBJECT_TOO_LONG').value);\n\t\t\t\t\tXHR.appendData('OPT_HEADERS_SUBJECT_WS_OR_DOTS',document.getElementById('OPT_HEADERS_SUBJECT_WS_OR_DOTS').value);\n\t\t\t\t\tXHR.appendData('OPT_HEADERS_SUBJECT_DIGIT_OR_TIME_ID',document.getElementById('OPT_HEADERS_SUBJECT_DIGIT_OR_TIME_ID').value);\n\t\t\t\n\t\t\t\t\tXHR.appendData('OPT_DNS_HOST_IN_DNS',document.getElementById('OPT_DNS_HOST_IN_DNS').value);\n\t\t\t\t\tXHR.appendData('OPT_SPF',document.getElementById('OPT_SPF').value);\n\t\t\t\t\t\n\t\t\t\t\tXHR.appendData('OPT_LANG_KOREAN',document.getElementById('OPT_LANG_KOREAN').value);\n\t\t\t\t\tXHR.appendData('OPT_LANG_CHINESE',document.getElementById('OPT_LANG_CHINESE').value);\n\t\t\t\t\tXHR.appendData('OPT_LANG_JAPANESE',document.getElementById('OPT_LANG_JAPANESE').value);\n\t\t\t\t\tXHR.appendData('OPT_LANG_THAI',document.getElementById('OPT_LANG_THAI').value);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdocument.getElementById('img_OPT_HEADERS_TO_UNDISCLOSED').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_HEADERS_FROM_OR_TO_NO_DOMAIN').src='ajax-menus-loader.gif';\t\t\t\t\t\n\t\t\t\t\tdocument.getElementById('img_OPT_HEADERS_FROM_OR_TO_DIGITS').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_HEADERS_SUBJECT_TOO_LONG').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_HEADERS_SUBJECT_WS_OR_DOTS').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_HEADERS_SUBJECT_DIGIT_OR_TIME_ID').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_SPF').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_DNS_HOST_IN_DNS').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_LANG_KOREAN').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_LANG_CHINESE').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_LANG_THAI').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_LANG_JAPANESE').src='ajax-menus-loader.gif';\n\t\t\t\t\tdocument.getElementById('img_OPT_USE_DNS').src='ajax-menus-loader.gif';\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_OPT_SPAM_RATE_LIMIT);\n\t\t\t}\t\n\t</script>\n\n\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #30
0
function HTTPS_PORT()
{
    $httpd = new httpd();
    $users = new usersMenus();
    $page = CurrentPageName();
    $use_apache = null;
    $sock = new sockets();
    $tpl = new templates();
    $LighttpdUserAndGroup = $sock->GET_INFO("LighttpdUserAndGroup");
    $LighttpdArticaDisabled = $sock->GET_INFO("LighttpdArticaDisabled");
    $LighttpdArticaDisableSSLv2 = $sock->GET_INFO("LighttpdArticaDisableSSLv2");
    $ConfirmDisableArticaWebConsole = $tpl->javascript_parse_text("{ConfirmDisableArticaWebConsole}");
    if ($LighttpdUserAndGroup == null) {
        $LighttpdUserAndGroup = "www-data:www-data";
    }
    $ArticaHttpsPort = $sock->GET_INFO("ArticaHttpsPort");
    $ArticaHttpUseSSL = $sock->GET_INFO("ArticaHttpUseSSL");
    if (!is_numeric($ArticaHttpUseSSL)) {
        $ArticaHttpUseSSL = 1;
    }
    if (!is_numeric($LighttpdArticaDisabled)) {
        $LighttpdArticaDisabled = 0;
    }
    if (!is_numeric($LighttpdArticaDisableSSLv2)) {
        $LighttpdArticaDisableSSLv2 = 0;
    }
    if ($ArticaHttpsPort == null) {
        $ArticaHttpsPort = "9000";
    }
    $lighttp_processes = "<tr>\n\t\t\t<td nowrap nowrap class=legend>{processes}:</strong></td>\n\t\t\t<td><input type='button' value='{advanced_settings}&nbsp;&raquo;' OnClick=\"javascript:YahooWin3(440,'{$page}?advlighttp=yes');\"></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap nowrap class=legend>{LighttpdUseLdap}:</strong></td>\n\t\t\t<td>" . Field_numeric_checkbox_img('LighttpdUseLdap', $httpd->LighttpdUseLdap, '{LighttpdUseLdap_text}') . "</td>\n\t\t</tr>\t";
    if ($users->lighttpd_installed) {
        $use_apache = "<tr>\n\t\t\t<td nowrap class=legend>{disable_webconsole_engine}:</strong></td>\n\t\t\t<td>" . Field_checkbox('LighttpdArticaDisabled', 1, $LighttpdArticaDisabled, "LighttpdArticaDisabledCheck()") . "</td>\n\t\t</tr>";
        $lighttp_processes = "<input type='hidden' id='LighttpdUseLdap' value=',{$httpd->LighttpdUseLdap}'>";
    }
    $lighttpd_usenossl = "\n\t\t<tr>\n\t\t\t<td nowrap nowrap class=legend>{ssl}:</strong></td>\n\t\t\t<td>" . Field_checkbox("ArticaHttpUseSSL", 1, $ArticaHttpUseSSL, "WebArticaCheck()") . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td nowrap nowrap class=legend>{disableSSLv2}:</strong></td>\n\t\t\t<td>" . Field_checkbox("LighttpdArticaDisableSSLv2", 1, $LighttpdArticaDisableSSLv2, "disableSSLv2Check()") . "</td>\n\t\t</tr>\t\n\t";
    if ($use_apache == null) {
        $use_apache = "<input type='hidden' name='ApacheArticaEnabled' value='0'>";
    }
    $html = "\n\t<input type='hidden' id='interface_restarted' value='{interface_restarted}'>\n\t<form name='FFM109'>\n\t<input type='hidden' name='http_settings' value='yes'>\n\t<script>\n\t\tfunction LighttpdArticaDisabledCheck(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tif(document.getElementById('LighttpdArticaDisabled').checked){\n\t\t\t\tif(!confirm('{$ConfirmDisableArticaWebConsole}')){return;}\n\t\t\t\tXHR.appendData('LighttpdArticaDisabled',1);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tXHR.appendData('LighttpdArticaDisabled',0);\n\t\t\t}\n\t\t\tLighttpdArticaDisabledcheck();\n\t\t\tXHR.sendAndLoad('{$page}', 'GET');\n\t\t\n\t\t}\n\t\t\n\t\tfunction disableSSLv2Check(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tif(document.getElementById('LighttpdArticaDisableSSLv2').checked){\n\t\t\t\tXHR.appendData('LighttpdArticaDisableSSLv2',1);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tXHR.appendData('LighttpdArticaDisableSSLv2',0);\n\t\t\t}\n\t\t\tXHR.sendAndLoad('{$page}', 'POST');\n\t\t\n\t\t}\t\t\n\t\t\n\t\t\n\t\t\n\t\tfunction WebArticaCheck(){\n\t\t\tdocument.getElementById('LighttpdArticaDisableSSLv2').disabled=true;\n\t\t\tif(document.getElementById('ArticaHttpUseSSL')){\n\t\t\t\tif(document.getElementById('ArticaHttpUseSSL').checked){\n\t\t\t\t\tdocument.getElementById('LighttpdArticaDisableSSLv2').disabled=false;\t\n\t\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tfunction LighttpdArticaDisabledcheck(){\n\t\t\tif(!document.getElementById('LighttpdArticaDisabled')){return;}\n\t\t\tdocument.getElementById('LighttpdArticaDisableSSLv2').disabled=true;\n\t\t\tdocument.getElementById('ArticaHttpUseSSL').disabled=true;\n\t\t\tdocument.getElementById('https_port').disabled=true;\n\t\t\tdocument.getElementById('LighttpdUserAndGroup').disabled=true;\n\t\t\tif(!document.getElementById('LighttpdArticaDisabled').checked){\n\t\t\t\tdocument.getElementById('LighttpdArticaDisableSSLv2').disabled=false;\n\t\t\t\tdocument.getElementById('ArticaHttpUseSSL').disabled=false;\n\t\t\t\tdocument.getElementById('https_port').disabled=false;\n\t\t\t\tdocument.getElementById('LighttpdUserAndGroup').disabled=false;\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\tWebArticaCheck();\t\n\tLighttpdArticaDisabledcheck();\n\t</script>\n\t\n\t<H5>{web_interface_settings}</H5>\n\t";
    if ($users->lighttpd_installed) {
        $lighttpd = "\n\t\t{$use_apache}\n\t\t{$lighttp_processes}\n\t\t{$lighttpd_usenossl}\n\t\t\t\t\t\t\n\t\t";
    } else {
        $html = $html . "<input type='hidden' name='ApacheArticaEnabled' value='1'>";
    }
    $html = $html . "\n<table style='width:100%'>\n<tr>\n\t<td valign='top'>\n\t" . Paragraphe("64-settings.png", "{advanced_options}", "{php_advanced_options_text}", "javascript:Loadjs('phpconfig.php')") . "</td>\n\t<td valign='top'>\n\t\t\t<table style='width:100%' class=form>\n\t\t\t{$lighttpd}\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{listen_port}:</strong></td>\n\t\t\t\t<td>" . Field_text('https_port', trim($ArticaHttpsPort), 'width:100px;font-size:13px;padding:3px') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{username}:</strong></td>\n\t\t\t\t<td>" . Field_text('LighttpdUserAndGroup', trim($LighttpdUserAndGroup), 'width:130px;font-size:13px;padding:3px') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right'>\n\t\t\t\t\t<span style='padding-top:3px'><a href='javascript:blur();' OnClick=\"javascript:Loadjs('phpconfig.php');\">{advanced_options}</a></span>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right'>\n\t\t\t\t\t<hr>\n\t\t\t\t\t" . button("{apply}", "HTTPS_PORT()") . "\n\t\t\t\t\t\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\n\t\t</table>\n\t</td>\n</tR>\n</table>\n</form>\n" . TIME_ZONE_SETTINGS();
    return $html;
}