当前位置: 首页>>代码示例>>PHP>>正文


PHP squidbee::external_acl_helper_categories方法代码示例

本文整理汇总了PHP中squidbee::external_acl_helper_categories方法的典型用法代码示例。如果您正苦于以下问题:PHP squidbee::external_acl_helper_categories方法的具体用法?PHP squidbee::external_acl_helper_categories怎么用?PHP squidbee::external_acl_helper_categories使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在squidbee的用法示例。


在下文中一共展示了squidbee::external_acl_helper_categories方法的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::external_acl_helper_categories方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。