當前位置: 首頁>>代碼示例>>PHP>>正文


PHP squidbee::refresh_pattern_list方法代碼示例

本文整理匯總了PHP中squidbee::refresh_pattern_list方法的典型用法代碼示例。如果您正苦於以下問題:PHP squidbee::refresh_pattern_list方法的具體用法?PHP squidbee::refresh_pattern_list怎麽用?PHP squidbee::refresh_pattern_list使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在squidbee的用法示例。


在下文中一共展示了squidbee::refresh_pattern_list方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: output_acls

function output_acls()
{
    $q = new squidbee();
    $acls = new squid_acls_groups();
    $squid = new squidbee();
    echo "\nexternal_acl_helper_categories\n-----------------\n";
    echo $squid->external_acl_helper_categories();
    echo "\n-----------------\n";
    $sock = new sockets();
    $refreshpattern = $squid->refresh_pattern_list();
    $SquidBubbleMode = $sock->GET_INFO("SquidBubbleMode");
    if (!is_numeric($SquidBubbleMode)) {
        $SquidBubbleMode = 0;
    }
    $acl = new squid_acls_quotas_time();
    $squid_acls_quotas_time = $acl->build() . "\n";
    $acls = new squid_acls();
    $acls->Build_Acls();
    $aclgroups = new squid_acls_groups();
    if (count($acls->acls_array) > 0) {
        $ACLS_TO_ADD = @implode("\n", $acls->acls_array);
    }
    echo "\nAcls\n-----------------\n" . $ACLS_TO_ADD . "\n-----------------\n\n";
    echo "\nQuotas Time\n-----------------\n" . $squid_acls_quotas_time . "\n-----------------\n\n";
    echo "\n\n-----------------\n" . $aclgroups->buildacls_order(0) . "\n-----------------\n\n";
    echo "######\n";
    $tcp_outgoing_address = $aclgroups->buildacls_bytype("tcp_outgoing_address");
    echo "\n\ntcp_outgoing_address -----------------\n";
    if (count($tcp_outgoing_address) > 0) {
        echo "Starting......: " . date("H:i:s") . " [ACLS]: Engine tcp_outgoing_address " . count($tcp_outgoing_address) . " rules..\n";
        while (list($index, $line) = each($tcp_outgoing_address)) {
            echo "tcp_outgoing_address {$line}\n";
        }
    } else {
        echo "Starting......: " . date("H:i:s") . " [ACLS]: ACL Engine tcp_outgoing_address No rules..\n";
    }
    echo "\n-----------------\n\n";
    echo "######\n";
    $q = new mysql_squid_builder();
    if ($SquidBubbleMode == 1) {
        $sql = "SELECT * FROM webfilters_sqaclsports ORDER BY aclport";
        $results = $q->QUERY_SQL($sql);
        while ($ligne = mysql_fetch_assoc($results)) {
            echo "\n\n#--------- ACLS {$ligne["portname"]}\n\n";
            echo "\n\n" . $aclgroups->buildacls_order($ligne["aclport"]) . "\n\n";
        }
    }
    $bandwith = new squid_bandwith_builder();
    echo "\n-----------------\n\n";
    echo $bandwith->compile() . "\n";
    $acls_rules = $acls->build_http_access(0);
    echo "\n\n# Builded acls from engine [" . count($acls_rules) . "] items.\n";
    if (count($acls_rules) > 0) {
        echo "\n\n" . @implode("\n", $acls_rules) . "\n";
    }
    if ($SquidBubbleMode == 1) {
        $sql = "SELECT * FROM webfilters_sqaclsports ORDER BY aclport";
        $results = $q->QUERY_SQL($sql);
        while ($ligne = mysql_fetch_assoc($results)) {
            $acls_rules = $acls->build_http_access($ligne["aclport"]);
            echo "\n\n# Builded acls from engine {$ligne["portname"]} [" . count($acls_rules) . "] items.\n";
            if (count($acls_rules) > 0) {
                echo "\n\n" . @implode("\n", $acls_rules) . "\n";
            }
        }
    }
    echo "\n\n-----------------\n" . $refreshpattern . "\n-----------------\n\n";
    $acls = new squid_acls_groups();
    $acls_deny = $acls->buildacls_bytype("url_rewrite_access_deny");
    if (count($acls_deny) > 0) {
        while (list($index, $line) = each($acls_deny)) {
            $MyStandPort = "MyStandPort";
            echo "url_rewrite_access deny {$line}\n";
        }
    }
    echo "######\n";
    echo "######\n";
    echo "######\n";
}
開發者ID:brucewu16899,項目名稱:1.6.x,代碼行數:79,代碼來源:exec.squid.php


注:本文中的squidbee::refresh_pattern_list方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。