function LoadRblist($ou)
{
    $ldap = new clladp();
    $oudat = $ldap->OUDatas($ou);
    if (!is_array($oudat["SURBLServers"])) {
        echo " ";
        exit;
    }
    $cell = CellRollOver() . " style='font-size:12px'";
    $serverlist = RblForm(1);
    $html = "\n\t<H5>{rbl_servers}</H5>\n\t<table style='width:90%'>";
    while (list($num, $val) = each($oudat["SURBLServers"])) {
        if (strpos($val, ':') > 0) {
            $tb = explode(":", $val);
            $rbl = $tb[0];
            $purc = $tb[1];
            $count = $count + $purc;
        } else {
            $country = $val;
            $action = "delete";
        }
        $html = $html . "\n\t\t\t<tr>\n\t\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t\t<td {$cell}><strong>{$rbl}</strong></td>\n\t\t\t<td {$cell} width=1%'><img src='img/i16.gif'></td>\n\t\t\t<td {$cell}><strong><a href='{$serverlist["{$rbl}"]["uri"]}' target='_new'>{$serverlist["{$rbl}"]["name"]}</a></strong></td>\n\t\t\t<td {$cell}><strong>" . Field_text("{$num}", $purc, 'width:50px', null, 'EditSurblRblServer(this)') . "</strong></td>\n\t\t\t<td {$cell} width=1%>" . imgtootltip('x.gif', '{delete}', "SURblDelete({$num})") . "</td>\n\t\t\t</tr>";
    }
    $html = $html . "<tr><td colspan=4 align='right' style='color:#005447;font-size:12px;border-top:1px solid black;padding:5px'><strong>{$count}%</strong></td></tr>";
    $tpl = new templates();
    echo "<br>" . RoundedLightGrey($tpl->_ENGINE_parse_body($html . "</table>"));
}
Exemplo n.º 2
0
function INDEX()
{
    if (!isset($_GET["ou"])) {
        header('location:domains.index.php');
        exit;
    }
    $page = CurrentPageName();
    $ou = $_GET["ou"];
    $ldap = new clladp();
    $hash = $ldap->OUDatas($_GET["ou"]);
    $rbl = RblForm();
    $array = array("delete" => "{delete_mail}", "quarantine" => "{quarantine}", "pass" => "{pass}");
    $action = Field_array_Hash($array, 'action', $hash["RblServersAction"]);
    $form = "<table style='width:60%'>\n\t<td align='right' nowrap><strong>{action_100_pourc}:</strong>\n\t<td>{$action}</td>\n\t<td align='right'><input type='button' value='{apply}&nbsp;&raquo;' OnClick=\"javascript:EditActionRbl();\"></td>\n\t</tr>\n\t<tr>\n\t<td align='right'><strong>{rbl_servers}:</strong></td>\n\t<td>{$rbl}<br><strong>{related} <a href='http://spamlinks.net/filter-dnsbl-lists.htm#spamsource' target='_new'>http://spamlinks.net</a> </strong></td>\n\t<td align='right'><input type='button' value='{add}&nbsp;&raquo;' OnClick=\"javascript:AddRblServer();\"></td>\n\t</tr>\n\t</table>\n\t\n\t";
    $form = RoundedLightGreen($form);
    $html = "\n\t<input type='hidden' name='ou' value='{$ou}' id='ou'>\n\t<p class='caption'>{rbl_explain}</p>\n\t{$form}\n\t<div id='rbl-list'></div>\n\t\n\t\n\t<script>LoadAjax('rbl-list','{$page}?rbl-list={$ou}');</script>\n\t";
    $cfg["JS"][] = "js/denycountries.ou.js";
    $tpl = new template_users('{rbl_check}', $html, 0, 0, 0, 0, $cfg);
    echo $tpl->web_page;
}