function smtpd_client_restrictions_popup()
{
    $sock = new sockets();
    $EnablePostfixAntispamPack_value = $sock->GET_INFO('EnablePostfixAntispamPack');
    $reject_forged_mails = $sock->GET_INFO('reject_forged_mails');
    $restrictions = get_restrictions_classes();
    $whitelists = Paragraphe("routing-domain-relay.png", "{PostfixAutoBlockDenyAddWhiteList}", "{PostfixAutoBlockDenyAddWhiteList_explain}", "javascript:Loadjs('postfix.iptables.php?white-js=yes')");
    $rollover = CellRollOver();
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%>\n\t<img src='img/96-planetes-free.png'>\n\t</td>\n\t<td valign='top'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<p class=caption>{smtpd_client_restrictions_text}</p>\n\t</td>\n\t<td valign='top'>\n\t\t{$whitelists}\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t</td>\n\t</tr>\n\t</table>\n\t<div id='smtpd_client_restrictions_div'>\n\t<table style='width:100%'>\n\t<tr {$rollover}>\n\t<td valign='top' width=1%>" . Field_checkbox("reject_unknown_client_hostname", 1, $restrictions["reject_unknown_client_hostname"]) . "</td>\n\t<td valign='top' style='font-size:14px;text-transform:capitalize'>{reject_unknown_client_hostname}</td>\n\t<td valign='top' width=1%>" . help_icon("{reject_unknown_client_hostname_text}") . "</td>\n\t</tr {$rollover}>\n\t<tr>\n\t<td valign='top' width=1%>" . Field_checkbox("reject_unknown_reverse_client_hostname", 1, $restrictions["reject_unknown_reverse_client_hostname"]) . "</td>\n\t<td valign='top' style='font-size:14px;text-transform:capitalize'>{reject_unknown_reverse_client_hostname}</td>\n\t<td valign='top' width=1%>" . help_icon("{reject_unknown_reverse_client_hostname_text}") . "</td>\n\t<tr {$rollover}>\n\t<td valign='top' width=1%>" . Field_checkbox("reject_unknown_sender_domain", 1, $restrictions["reject_unknown_sender_domain"]) . "</td>\n\t<td valign='top' style='font-size:14px;text-transform:capitalize'>{reject_unknown_sender_domain}</td>\n\t<td valign='top' width=1%>" . help_icon("{reject_unknown_sender_domain_text}") . "</td>\n\t</tr>\n\t<tr {$rollover}>\n\t<td valign='top' width=1%>" . Field_checkbox("reject_invalid_hostname", 1, $restrictions["reject_invalid_hostname"]) . "</td>\n\t<td valign='top' style='font-size:14px;text-transform:capitalize'>{reject_invalid_hostname}</td>\n\t<td valign='top' width=1%>" . help_icon("{reject_invalid_hostname_text}") . "</td>\n\t</tr>\n\t<tr {$rollover}>\n\t<td valign='top' width=1%>" . Field_checkbox("reject_non_fqdn_sender", 1, $restrictions["reject_non_fqdn_sender"]) . "</td>\n\t<td valign='top' style='font-size:14px;text-transform:capitalize'>{reject_non_fqdn_sender}</td>\n\t<td valign='top' width=1%>" . help_icon("{reject_non_fqdn_sender_text}") . "</td>\n\t</tr>\n\t<tr {$rollover}>\n\t<td valign='top' width=1%>" . Field_checkbox("reject_forged_mails", 1, $reject_forged_mails) . "</td>\n\t<td valign='top' style='font-size:14px;text-transform:capitalize'>{reject_forged_mails}</td>\n\t<td valign='top' width=1%>" . help_icon("{reject_forged_mails_text}") . "</td>\n\t</tr>\t\n\t\n\t\n\t<tr {$rollover}>\n\t<td valign='top' width=1%>" . Field_checkbox("EnablePostfixAntispamPack", 1, $EnablePostfixAntispamPack_value) . "</td>\n\t<td valign='top' style='font-size:14px;text-transform:capitalize'>{EnablePostfixAntispamPack}</td>\n\t<td valign='top' width=1%>" . help_icon("{EnablePostfixAntispamPack_text}") . "</td>\n\t</tr>\t\t\t\t\t\n\t</table>\n\t</div>\n<hr>\n\t<div style='width:100%;text-align:right'>\n\t" . button("{edit}", "smtpd_client_restrictions_save()") . "\n\t\n\t</div>\t\n\t";
    //smtpd_client_connection_rate_limit = 100
    //smtpd_client_recipient_rate_limit = 20
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "postfix.index.php");
}
function smtpd_client_restrictions_popup()
{
    $sock = new sockets();
    $restrictions = get_restrictions_classes();
    $reject_unknown_client_hostname = Paragraphe_switch_img_32('{reject_unknown_client_hostname}', '{reject_unknown_client_hostname_text}', "reject_unknown_client_hostname", $restrictions["reject_unknown_client_hostname"], "{enable_disable}", "100%");
    $reject_unknown_reverse_client_hostname = Paragraphe_switch_img_32('{reject_unknown_reverse_client_hostname}', '{reject_unknown_reverse_client_hostname_text}', "reject_unknown_reverse_client_hostname", $restrictions["reject_unknown_reverse_client_hostname"], "{enable_disable}", "100%");
    $reject_unknown_sender_domain = Paragraphe_switch_img_32('{reject_unknown_sender_domain}', '{reject_unknown_sender_domain_text}', "reject_unknown_sender_domain", $restrictions["reject_unknown_sender_domain"], "{enable_disable}", "100%");
    $reject_invalid_hostname = Paragraphe_switch_img_32('{reject_invalid_hostname}', '{reject_invalid_hostname_text}', "reject_invalid_hostname", $restrictions["reject_invalid_hostname"], "{enable_disable}", "100%");
    $reject_non_fqdn_sender = Paragraphe_switch_img_32('{reject_non_fqdn_sender}', '{reject_non_fqdn_sender_text}', "reject_non_fqdn_sender", $restrictions["reject_non_fqdn_sender"], "{enable_disable}", "100%");
    $EnablePostfixAntispamPack = Paragraphe_switch_img_32('{EnablePostfixAntispamPack}', '{EnablePostfixAntispamPack_text}', "EnablePostfixAntispamPack", $restrictions["EnablePostfixAntispamPack"], "{enable_disable}", "100%");
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%>\n\t<img src='img/96-planetes-free.png'>\n\t</td>\n\t<td valign='top'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<p class=caption>{smtpd_client_restrictions_text}</p>\n\t</td>\n\t<td valign='top'>\n\t\t{$whitelists}\n\t</td>\n\t</tr>\n\t</table>\n\t<hr>\n\t<div style='width:100%;text-align:right'>\n\t" . button('{apply}', 'smtpd_client_restrictions_save()') . "\n\t</div>\n\t</td>\n\t</tr>\n\t</table>\n\t<div id='smtpd_client_restrictions_div'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>{$reject_unknown_client_hostname}</td>\n\t<td valign='top'>{$reject_unknown_reverse_client_hostname}</td>\n\t</tr>\n\t<tr>\n\t<td valign='top'>{$reject_unknown_sender_domain}</td>\n\t<td valign='top'>{$reject_invalid_hostname}</td>\n\t</tr>\n\t<tr>\n\t<td valign='top'>{$reject_non_fqdn_sender}</td>\n\t<td valign='top'>{$EnablePostfixAntispamPack}</td>\n\t</tr>\t\n\t</table>\n\t</div>";
    //smtpd_client_connection_rate_limit = 100
    //smtpd_client_recipient_rate_limit = 20
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "postfix.index.php");
}