function sub_page()
{
    $main = new main_cf();
    $stunnel = new stunnel4();
    $relay_host = $stunnel->main_array["postfix_relayhost"]["connect"];
    $localport = $stunnel->main_array["postfix_relayhost"]["accept"];
    $apply = applysettingsGeneral('apply', 'relayssl_start()', 'apply_text', true);
    $main = new main_cf();
    $sock = new sockets();
    $sTunnel4enabled = $sock->GET_INFO('sTunnel4enabled');
    preg_match('#(.+?):([0-9]+)#', $relay_host, $h);
    //$relayhost=$main->main_array["relayhost"];
    $sasl = new smtp_sasl_password_maps();
    preg_match('#(.+?):(.+)#', $sasl->smtp_sasl_password_hash[$h[1]], $ath);
    if ($localport == null) {
        $sock = new sockets();
        $localport = $sock->RandomPort();
    }
    if ($h[2] == null) {
        $h[2] = 465;
    }
    $form = "\n<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:14px'><strong>{yserver}:&nbsp;</strong></td>\n\t\t\t\t\t<td><input type='text' id='server' value='{$h[1]}' style='font-size:14px'></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:14px'><strong>{yport}:&nbsp;</strong></td>\n\t\t\t\t\t<td><input type='text' id='port' value='{$h[2]}' style='font-size:14px;width:30%'></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t</table>\n\n";
    $artica = new artica_general();
    $enable = Paragraphe_switch_img('{enable_stunnel}', "{enable_stunnel_text}", 'enable_stunnel', $sTunnel4enabled);
    $form1 = "\n<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:14px'><strong>{stunnelport}:&nbsp;</strong></td>\n\t\t\t\t\t<td><input type='text' id='localport' value='{$localport}' style='font-size:14px;width:30%'></td>\n\t\t\t\t</tr>\t\t\t\n\t\t\t</table>\n\n";
    $form2 = "\n<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:14px'><strong><u>" . texttooltip("{smtp_sender_dependent_authentication}", "{smtp_sender_dependent_authentication_tooltip}", "smtp_sender_dependent_authentication()") . "</u>:&nbsp;</strong></td>\n\t\t\t\t\t<td>" . Field_yesno_checkbox('smtp_sender_dependent_authentication', $main->main_array["smtp_sender_dependent_authentication"]) . "</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<div id='peruser'>\n\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='left' nowrap style='font-size:16px' colspan=2><strong>{single_auth}:</strong>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t\t<td align='right' nowrap style='font-size:14px'><strong>{username}:&nbsp;</strong></td>\n\t\t\t\t\t<td><input type='text' id='username' value='{$ath[1]}' style='font-size:14px'></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' nowrap style='font-size:14px'><strong>{password}:&nbsp;</strong></td>\n\t\t\t\t\t<td><input type='text' id='password' value='{$ath[2]}' style='font-size:14px;'></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t</table>\n\t\t</div>\n\n";
    $form = "<br>" . RoundedLightWhite($form);
    $form1 = "<br>" . RoundedLightWhite($form1);
    $form2 = "<br>" . RoundedLightWhite($form2);
    return "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t\t<table style='width:100%'>\n\t\t\t\t<tr " . CellRollOver("stunnelSwitchdiv('stunnel_relayhost')") . ">\n\t\t\t\t<td valign='top' width=1%><img src='img/chiffre1_32.png'></td>\n\t\t\t\t<td valign='top' width=99%><span style='font-size:13px;font-weight:bold'>{relayhost}</span>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2>\n\t\t\t\t\t\t<div id='stunnel_relayhost'>\t\t\t\t\n\t\t\t\t\t\t<p class=caption>{relayhost_text}</p>\n\t\t\t\t\t\t{$form}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr><td colspan=2><hr></tr>\n\t\t\t\t<tr " . CellRollOver("stunnelSwitchdiv('stunnel_relayport')") . ">\n\t\t\t\t<td valign='top' width=1%><img src='img/chiffre2_32.png'></td>\n\t\t\t\t<td valign='top' width=99%><span style='font-size:13px;font-weight:bold'>{stunnelport}</span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=2>\n\t\t\t\t\t\t<div id='stunnel_relayport' style='width:0px;height:0px;visibility:hidden'>\n\t\t\t\t\t\t<p class=caption>{stunnelport_text}</p>\n\t\t\t\t\t\t{$form1}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr><td colspan=2><hr></tr>\n\t\t\t\t<tr " . CellRollOver("stunnelSwitchdiv('stunnel_auth')") . ">\n\t\t\t\t<td valign='top' width=1%><img src='img/chiffre3_32.png'></td>\n\t\t\t\t<td valign='top' width=99%><span style='font-size:13px;font-weight:bold'>{authentication}</span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=2>\n\t\t\t\t\t\t<div id='stunnel_auth' style='width:0px;height:0px;visibility:hidden'>\n\t\t\t\t\t\t<p class=caption>{authentication_text}</p>\n\t\t\t\t\t\t{$form2}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\t\t\n\t\t\t\t</table>\n\t\t</td>\n\t\t<td valign='top'>{$enable}<br>{$apply}<br></td>\n\t\t\n\t</tr>\n\t</table>\n\t\n\t\n\t";
}
Beispiel #2
0
function trustlocal_popup()
{
    $amavis = new amavis();
    $loopback = Paragraphe_switch_img('{trust_local}', '{trust_local_explain}', 'TrustLocalHost', $amavis->main_array["NETWORK"]["TrustLocalHost"], '{enable_disable}', 290);
    $html = "\n\t<H1>{trust_local}</H1>\n\t<p class=caption>{trust_local_text}</p>\n\t<table style='width:100%'>\n\t<tr>\n\n\t<td valign='top' width=50%>\n\t\t{$loopback}\n\t</td>\n\t<td valign='top' width=50% style='margin:4px'>\n\t\t" . applysettingsGeneral('apply', 'ApplyTrustLocalHost()', 'save_policies') . "\n\t\n\t</td>\t\n\t</tr>\n\t</table>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Beispiel #3
0
function milter_behavior_popup()
{
    //64-green.png
    $sock = new sockets();
    $PostfixMiltersBehavior = $sock->GET_INFO("PostfixMiltersBehavior");
    $milter = Paragraphe_switch_img('{enable_milter}', '{enable_milter_text}', 'enable_milter', $PostfixMiltersBehavior, '{enable_disable}', 290);
    $EnableArticaSMTPFilter = $sock->GET_INFO("EnableArticaSMTPFilter");
    $ArticaFilterMaxProc = $sock->GET_INFO("ArticaFilterMaxProc");
    if ($ArticaFilterMaxProc == null) {
        $ArticaFilterMaxProc = 20;
    }
    $ArticaFilterMaxProc_arr = array("-" => '{illimited}', "5" => 5, "10" => 10, 20 => 20, 50 => 50, 100 => 10);
    $ArticaFilterMaxProc = Field_array_Hash($ArticaFilterMaxProc_arr, "ArticaFilterMaxProc", $ArticaFilterMaxProc);
    $articafilter_form = "\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend>{ArticaFilterMaxProc}:</td>\n\t\t\t<td>{$ArticaFilterMaxProc}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "ApplyMilterBehavior()") . "</td>\n\t\t</tr>\n\t\t</table>\n\t\t";
    $html = "\n\t<H1>{plugins_behavior}</H1>\n\t<p class=caption>{plugins_behavior_text}</p>\n\t<table style='width:100%'>\n\t<tr>\n\n\t<td valign='top' width=50%>\n\t\t{$milter}\n\t</td>\n\t<td valign='top' width=50% style='margin:4px'>\n\t\t" . applysettingsGeneral('apply', 'ApplyMilterBehavior()', 'apply_milter_behavior') . "\n\t\n\t</td>\t\n\t</tr>\n\t</table>\n\t<br>{$articafilter_form}\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'postfix.plugins.php');
}
function main_slaves()
{
    $ldap = new clladp();
    $cross = new crossroads();
    $warn = RoundedLightBlue("\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top'>\n\t\t<img src='img/i32.png'>\n\t</td>\n\t<td valing='top'>{warning_all_ldap_deleted}</strong></td>\n\t</tr>\n\t</table>");
    $html = main_tabs() . "<br>\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top'>\n\t<img src='img/red-server.png'>\n\t</td>\n\t<td valign='top'>\n\t<H5>{slaves_servers}</H5>\n\t<p class=caption>{main_slaves_text}</p>\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t\t" . RoundedLightGreen("\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap><strong>{PostfixSlaveServersIdentity}:</strong></td>\n\t\t\t\t<td><strong>" . Field_text('PostfixSlaveServersIdentity', null, 'width:150px') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 class=caption align='right'>{PostfixSlaveServersIdentity_text}</td>\n\t\t\t</tr>\n\t\t<tr>\n\t\t\t\t<td colspan=2 class=caption align='right'><input type='button' value='{add}&nbsp;&raquo;' OnClick=\"javascript:CrossRoadsSaveSlave();\"</td>\n\t\t\t</tr>\t\n\t\t\t\n\t\t\t</tr>\n\t\t\t</table>") . main_sub_slaves() . "\n\t\t</td>\n\t\t\n\t\t<td valign='top'>\n\t\t" . applysettingsGeneral('synchronize', "SynchronizeSlaves()", "synchronize_text") . "{$warn}\n\t\t</td>\n\t\t</tr>\n\t\t\n\t\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body("{$html}<br>{$table}<br>");
}