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


PHP Resource::enum方法代码示例

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


在下文中一共展示了Resource::enum方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Resource

#
# Version: 1.0
# Created: 07.04.2009, Bunyamin Demir
#
# Index page
#
# Release Notes:
#
require_once "lib/DB.class.php";
require_once "lib/Template.class.php";
require_once "lib/Report.class.php";
require_once "lib/Resource.class.php";
require_once "lib/Filter.class.php";
require_once "lib/php-ofc-library/open-flash-chart.php";
$rs = new Resource();
$RS = $rs->enum(array('LIST_CATEGORY'));
if ($_GET['graph_filter']) {
    $plist = explode(";", $_GET['graph_filter']);
    for ($i = 0; $i <= count($plist); $i++) {
        list($k, $v) = explode("=", $plist[$i]);
        $param[$k] = $v;
    }
}
list($filter, $fwhere) = Filter::getFilter($param, '');
foreach ($fwhere as $w) {
    $where .= $w;
}
$categories =& Report::getCategoryDistribution($where);
$category = array();
foreach (array_keys($RS['LIST_CATEGORY']) as $s) {
    if ($categories[$s] && $s) {
开发者ID:AviMoto,项目名称:webekci,代码行数:31,代码来源:category_dist.php

示例2: Template

# Webekci Manage Interface
#
# Release Notes:
#
require_once "lib/DB.class.php";
require_once "lib/Template.class.php";
$tmp = new Template();
$pages = array('wbmng' => 'wb_manage.tpl', 'dbmng' => 'db_manage.tpl', 'cnfmng' => 'conf_manage.tpl', 'inf' => 'inf_manage.tpl');
$_GET['tab'] ? $sub_menu = $_GET['tab'] : ($sub_menu = 'wbmng');
$_GET['c'] ? $c = $_GET['c'] : ($c = 0);
$_GET['cmd'] ? $cmd = $_GET['cmd'] : ($cmd = '');
$rs = new Resource();
$sub_menus = $rs->create_sub_menu('webekci');
$count_menus = count($sub_menus);
$rs = new Resource();
$RS = $rs->enum(array('LIST_MANAGEMENT_TYPE'));
$db = new DBConnection();
$tmp->assign('sub_menus', $sub_menus);
$tmp->assign('select_menu', $c);
$tmp->assign('count_menus', $count_menus);
# --------------------------------------------------------------------------
switch ($sub_menu) {
    case "wbmng":
        if ($cmd == 'dadd') {
            domain_add($tmp, $pages[$cmd], $_GET['id']);
        } elseif ($cmd == 'validity') {
            $db->setDomainValidity($_GET['id'], $_GET['v']);
            domain_list($tmp, $pages[$sub_menu]);
        } elseif ($cmd == 'dinst') {
            domain_insert($_POST, $db);
            domain_list($tmp, $pages[$sub_menu]);
开发者ID:AviMoto,项目名称:webekci,代码行数:31,代码来源:webekci_manage.php

示例3: Template

require_once "lib/Navigation.class.php";
require_once "lib/Resource.class.php";
require_once "lib/Filter.class.php";
$tmp = new Template();
$pages = array('audit' => 'audit_records.tpl', 'show_det' => 'audit_log_detail.tpl', 'sip' => 'source_ip_report.tpl', 'show_ip' => 'source_ip_detail.tpl', 'severity' => 'severity_dist_report.tpl', 'category' => 'category_dist_report.tpl', 'rule' => 'rule_report.tpl', 'show_rule' => 'rule_detail.tpl');
$_GET['tab'] ? $sub_menu = $_GET['tab'] : ($sub_menu = 'audit');
$_GET['c'] ? $c = $_GET['c'] : ($c = 0);
$_GET['cmd'] ? $cmd = $_GET['cmd'] : ($cmd = '');
$rs = new Resource();
$sub_menus = $rs->create_sub_menu('report');
$count_menus = count($sub_menus);
$tmp->assign('sub_menus', $sub_menus);
$tmp->assign('select_menu', $c);
$tmp->assign('count_menus', $count_menus);
$db = new DBConnection();
$RS = $rs->enum(array('LIST_SEVERITY', 'LIST_CATEGORY', 'LIST_HTTP_METHOD', 'LIST_STATUS', 'LIST_PHASE', 'LIST_HTTP_CODE', 'LIST_HTTP_PROTOCOL', 'LIST_IP'));
# --------------------------------------------------------------------------
switch ($sub_menu) {
    case 'audit':
        if ($cmd == 'show_det') {
            audit_record_details($tmp, $pages[$cmd], $_GET['id']);
        } elseif ($cmd == 'ip_block') {
            $db->setIpBlock($_GET['ip'], $_GET['v']);
            audit_record_details($tmp, $pages['show_det'], $_GET['id']);
        } else {
            audit_record_list($tmp, $pages[$sub_menu]);
        }
        break;
    case 'sip':
        if ($cmd == 'show_ip') {
            source_ip_detail($tmp, $pages[$cmd], $_GET['ip']);
开发者ID:AviMoto,项目名称:webekci,代码行数:31,代码来源:reports.php

示例4: Resource

#
# Version: 1.0
# Created: 07.04.2009, Bunyamin Demir
#
# Index page
#
# Release Notes:
#
require_once "lib/DB.class.php";
require_once "lib/Template.class.php";
require_once "lib/Report.class.php";
require_once "lib/Resource.class.php";
require_once "lib/Filter.class.php";
require_once "lib/php-ofc-library/open-flash-chart.php";
$rs = new Resource();
$RS = $rs->enum(array('LIST_SEVERITY'));
if ($_GET['graph_filter']) {
    $plist = explode(";", $_GET['graph_filter']);
    for ($i = 0; $i <= count($plist); $i++) {
        list($k, $v) = explode("=", $plist[$i]);
        $param[$k] = $v;
    }
}
list($filter, $fwhere) = Filter::getFilter($param, '');
foreach ($fwhere as $w) {
    $where .= $w;
}
$severities =& Report::getSeverityDistribution($where);
//print_r($severities);
$severity = array();
foreach (array_keys($RS['LIST_SEVERITY']) as $s) {
开发者ID:AviMoto,项目名称:webekci,代码行数:31,代码来源:severity_dist.php

示例5: Template

require_once "lib/Resource.class.php";
require_once "lib/Navigation.class.php";
require_once "lib/ModSecConfiguration.class.php";
$tmp = new Template();
$pages = array('rfile' => 'rule_files.tpl', 'rf_add' => 'rule_files_add.tpl', 'rule' => 'rule.tpl', 'rule_add' => 'rule_add.tpl', 'rdfile' => 'rule_data_files.tpl', 'rdf_add' => 'rule_data_files_add.tpl', 'rdata' => 'rule_data.tpl', 'rd_add' => 'rule_data_add.tpl', 'wlist' => 'white_list.tpl', 'wl_add' => 'white_list_add.tpl');
$_GET['tab'] ? $sub_menu = $_GET['tab'] : ($sub_menu = 'rfile');
$_GET['c'] ? $c = $_GET['c'] : ($c = 0);
$_GET['cmd'] ? $cmd = $_GET['cmd'] : ($cmd = '');
$rs = new Resource();
$sub_menus = $rs->create_sub_menu('rule');
$count_menus = count($sub_menus);
$tmp->assign('sub_menus', $sub_menus);
$tmp->assign('select_menu', $c);
$tmp->assign('count_menus', $count_menus);
$rs = new Resource();
$RS = $rs->enum(array('LIST_WHITE_LIST_TYPE'));
$db = new DBConnection();
# --------------------------------------------------------------------------
switch ($sub_menu) {
    case "rfile":
        if ($cmd == 'rf_add') {
            rule_file_add($tmp, $pages[$cmd], $_GET['id']);
        } elseif ($cmd == 'validity') {
            $db->setRuleFileValidity($_GET['id'], $_GET['v']);
            rule_file_list($tmp, $pages[$sub_menu]);
        } elseif ($cmd == 'rf_inst') {
            rule_file_insert($_POST, $db);
            rule_file_list($tmp, $pages[$sub_menu]);
        } elseif ($cmd == 'rf_edit') {
            rule_file_edit($_POST, $db);
            rule_file_list($tmp, $pages[$sub_menu]);
开发者ID:AviMoto,项目名称:webekci,代码行数:31,代码来源:rules.php

示例6: getFilters

 public function getFilters()
 {
     $rs = new Resource();
     $RS = $rs->enum(array('LIST_SEVERITY', 'LIST_CATEGORY', 'LIST_HTTP_METHOD', 'LIST_STATUS', 'LIST_PHASE', 'LIST_HTTP_CODE', 'LIST_HTTP_PROTOCOL', 'LIST_IP'));
     $filters['severity'] = array_values($RS['LIST_SEVERITY']);
     $filters['category'] = array_values($RS['LIST_CATEGORY']);
     $filters['http_method'] = array_values($RS['LIST_HTTP_METHOD']);
     $filters['status'] = array_values($RS['LIST_STATUS']);
     $filters['phase'] = array_values($RS['LIST_PHASE']);
     $filters['http_code'] = array_values($RS['LIST_HTTP_CODE']);
     $filters['http_pro'] = array_values($RS['LIST_HTTP_PROTOCOL']);
     $filters['ip_block'] = array_values($RS['LIST_IP']);
     return $filters;
 }
开发者ID:AviMoto,项目名称:webekci,代码行数:14,代码来源:Filter.class.php


注:本文中的Resource::enum方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。