}
$_GET['roomid'] = empty($_GET['roomid']) ? $currentrommid : intval($_GET['roomid']);
$_GET['start_date'] = empty($_GET['start_date']) ? $start_date : $_GET['start_date'];
$_GET['end_date'] = empty($_GET['end_date']) ? $end_date : $_GET['end_date'];
$_GET['width'] = empty($_GET['width']) ? 800 : $_GET['width'];
$_GET['height'] = empty($_GET['height']) ? 720 : $_GET['height'];
extract($_GET, EXTR_IF_EXISTS);
$room_option_list = array();
foreach ($DimRoom as $room) {
    $room_option_list[$room['ID']] = $room['NAME'];
}
if ($search) {
    if (empty($roomid)) {
        $roomid = -1;
    }
    $list = AttackdefenseMonitor::getAttackHourBoxPlot($roomid, $start_date, $end_date, $width, $height);
    $jpg = $list[0]['IMAGE'];
    if (!empty($jpg)) {
        $filename = 'attackHours' . $roomid . '.png';
        $file = file_put_contents(ADMIN_BASE_RIMAGE . $filename, $jpg);
        //打开文件准备写入
        $imgurl = ADMIN_URL_RIMAGE . $filename . '?' . microtime(true);
        $img = "<center><img src=\"{$imgurl}\"></center>";
    } else {
        if (count($count) > 0) {
            $img = "无数据!";
        } else {
            $img = "图片加载失败";
        }
    }
    exit($img);
Beispiel #2
0
    $start_date = $times[0]['BDATE'];
    $end_date = $times[0]['EDATE'];
}
$_GET['roomid'] = empty($_GET['roomid']) ? $currentrommid : intval($_GET['roomid']);
$_GET['start_date'] = empty($_GET['start_date']) ? $start_date : $_GET['start_date'];
$_GET['end_date'] = empty($_GET['end_date']) ? $end_date : $_GET['end_date'];
extract($_GET, EXTR_IF_EXISTS);
$room_option_list = array();
foreach ($DimRoom as $room) {
    $room_option_list[$room['ID']] = $room['NAME'];
}
if (empty($roomid)) {
    $roomid = -1;
}
//获取被攻击IP的TOPN
$list = AttackdefenseMonitor::getAttackIpTopn($roomid, $start_date, $end_date);
$ip = array();
$attack = array();
$defense = array();
foreach ($list as $item) {
    $ip[] = $item['ATTACK2IP'];
    $attack[] = $item['ATTACK_NUM'];
    $defense[] = $item['DEFENSE_NUM'];
}
$ip = json_encode($ip);
$attack = json_encode($attack);
$defense = json_encode($defense);
Template::assign('room_option_list', $room_option_list);
Template::assign('ip', $ip);
Template::assign('attack', $attack);
Template::assign('defense', $defense);
Beispiel #3
0
    $start_date = $times[0]['BDATE'];
    $end_date = $times[0]['EDATE'];
}
$_GET['roomid'] = empty($_GET['roomid']) ? $currentrommid : intval($_GET['roomid']);
$_GET['start_date'] = empty($_GET['start_date']) ? $start_date : $_GET['start_date'];
$_GET['end_date'] = empty($_GET['end_date']) ? $end_date : $_GET['end_date'];
extract($_GET, EXTR_IF_EXISTS);
$room_option_list = array();
foreach ($DimRoom as $room) {
    $room_option_list[$room['ID']] = $room['NAME'];
}
if (empty($roomid)) {
    $roomid = -1;
}
//获取每天攻防信息
$list = AttackdefenseMonitor::getDayMonitorData($roomid, $start_date, $end_date);
$day = array();
$flux = array();
$defenseflux = array();
foreach ($list as $item) {
    $day[] = $item['SATTACK_DATE'];
    $flux[] = floatval($item['FLUX']);
    $defenseflux[] = floatval($item['DEFENSE_FLUX']);
}
$day = json_encode($day);
$flux = json_encode($flux);
$defenseflux = json_encode($defenseflux);
Template::assign('room_option_list', $room_option_list);
Template::assign('day', $day);
Template::assign('flux', $flux);
Template::assign('defenseflux', $defenseflux);
Beispiel #4
0
$end_date = date("Y-m-d");
if (!empty($times) && count($times) > 0) {
    $start_date = $times[0]['BDATE'];
    $end_date = $times[0]['EDATE'];
}
$_GET['roomid'] = empty($_GET['roomid']) ? $currentrommid : intval($_GET['roomid']);
$_GET['start_date'] = empty($_GET['start_date']) ? $start_date : $_GET['start_date'];
$_GET['end_date'] = empty($_GET['end_date']) ? $end_date : $_GET['end_date'];
extract($_GET, EXTR_IF_EXISTS);
$room_option_list = array();
foreach ($DimRoom as $room) {
    $room_option_list[$room['ID']] = $room['NAME'];
}
if (empty($roomid)) {
    $roomid = -1;
}
//获取每天攻防信息
$list = AttackdefenseMonitor::getAttackDurationData($roomid, $start_date, $end_date);
$day = array();
$attackTimes = array();
foreach ($list as $item) {
    $day[] = $item['SATTACK_DATE'];
    $attackTimes[] = $item['TIMES'];
}
$day = json_encode($day);
$attackTimes = json_encode($attackTimes);
Template::assign('room_option_list', $room_option_list);
Template::assign('day', $day);
Template::assign('attackTimes', $attackTimes);
Template::assign('_GET', $_GET);
Template::display('netshow/dimmroom/attackDuration.tpl');