function wbl_popup()
{
    $page = CurrentPageName();
    $q = new amavisdb();
    $tpl = new templates();
    $t = time();
    $type = $_GET["type"];
    $boot = new boostrap_form();
    $email = $q->email_from_emailid($_GET["rid"]);
    $sender = $q->email_from_mailid($_GET["sid"]);
    $user = new user($_SESSION["uid"]);
    $mails = $user->HASH_ALL_MAILS;
    while (list($b, $email) = each($mails)) {
        $mailZ[$email] = $email;
    }
    if ($_GET["sid"] == 0) {
        $bt = "{add}";
    } else {
        $bt = "{apply}";
    }
    $policy_id = $q->policyid_from_mail($email);
    $boot->set_hidden("wbl-type", $type);
    $boot->set_list("rcpt", "{email}", $mailZ, $email);
    $boot->set_field("sender", "{sender}", $sender, array("MANDATORY" => true));
    $boot->set_button($bt);
    $boot->set_CallBack("YahooWin2Hide");
    $boot->set_RefreshSearchs();
    $boot->set_formdescription("{amavis_wblsql_explain}");
    echo $boot->Compile();
}