コード例 #1
0
function HumanRule($ligne)
{
    $fr = new Fetchmail_settings();
    $arr = $fr->parse_config($ligne);
    $arr = $arr[1];
    if ($arr["ssl"]) {
        $ssl = "{using_ssl}";
    }
    if ($arr["port"] != null) {
        $port = "{with_port} {$arr["port"]}";
    } else {
        $port = null;
    }
    $line = "{fetch_address} &#34;<strong>" . $arr["user"] . "</strong>&#34;<br>\n\t{protocol}: <strong>{$arr["proto"]} {$port} {$ssl}</strong><br>\n\t{and_send_to} <strong>&#34;" . $arr["is"] . "&#34;</strong>";
    return $line;
}
コード例 #2
0
function LoadFetchMailRuleFromUser()
{
    $ldap = new clladp();
    $u = $ldap->UserDatas($_GET["LoadFetchMailRuleFromUser"]);
    $fr = new Fetchmail_settings();
    $tpl = new templates();
    while (list($num, $ligne) = each($u["FetchMailsRulesSources"])) {
        $arr = $fr->parse_config($ligne);
        $arr = $arr[1];
        $line = "\n\t\t<table>\n\t\t<tr>\n\t\t<td width=1% valign='top'><img src='img/fw_bold.gif'></td>\n\t\t<td width=1% nowrap valign='top'>{rule} {$num}</td>\n\t\t<td>" . $arr["poll"] . " {from} " . $arr["user"] . " {to} " . $arr["is"] . "</td>\n\t\t</tr>\n\t\t</table>";
        $res[] = RoundedLightGrey($tpl->_ENGINE_parse_body($line), "javascript:UserFetchMailRule({$num},'{$_GET["LoadFetchMailRuleFromUser"]}');", 1);
    }
    echo $tpl->_ENGINE_parse_body(implode("<br>", $res));
    echo $list;
}
コード例 #3
0
ファイル: exec.fetchmail.php プロジェクト: BillTheBest/1.6.x
function import_filename($filename)
{
    if (!is_file($filename)) {
        echo "{$filename} (no such file)\n";
    }
    $f = new Fetchmail_settings();
    $array = $f->parse_config(@file_get_contents($filename));
    echo "Importing " . count($array) . " lines/rules form \"{$path}\"\n";
    $fetch = new Fetchmail_settings();
    while (list($num, $ligne) = each($array)) {
        if ($fetch->EditRule($ligne, 0, true)) {
        }
    }
}