1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
| <?php
require_once('data.php');
$i=0;
$cell_name = $_POST['cell_name'];
$from_date = $_POST['from_date'];
$to_date = $_POST['to_date'];
$action = $_POST['action'];
echo'<br><br><br>name....'.$cell_name;
echo'<br>from....'.$from_date;
echo'<br>to....'.$to_date;
echo'<br>AA....'.$action;
if ($from_date == NULL or $to_date==NULL or $cell_name == NULL) echo '<br> Les champs doivent etre non vides';
else{
if ($action == 'RRC_Accessibility'){
echo'<br><br> RRC_Accessibility <br>';
$resultats = $pdo->query(' SELECT
rsran000_cell. Period_start_time ,
SUM( RRC_Stp_att ) AS SumOfRRC_Stp_att,
SUM( RRC_stp_and_acc_CR_UE ) AS SumOfRRC_stp_and_acc_CR_UE,
FROM rsran000_cell
where Period_start_time >="'.$from_date.'" and Period_start_time <="'.$to_date.'"
GROUP BY Period_start_time
');
foreach($resultats as $res){
$Period_start_time[] = $res[0];
$SumOfRRC_Stp_att[] = $res[1]; //RRC_Stp_att
$SumOfRRC_stp_and_acc_CR_UE[] = $res[2]; //RRC_stp_and_acc_CR_UE
$i= $i+1;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transpitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transpitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Cell</title>
<script type="text/javascript" src="js/jquery.min.js" ></script>
<script type="text/javascript" src="js/highcharts.js" ></script>
<script type="text/javascript" src="js/themes/gray.js"></script>
<script src="js/modules/exporting.js"></script>
<script> <!-- script pour générer le graphe -->
$(function () {
$('#container').highcharts({
chart: {
zoomType: 'xy'
},
title: {
text: 'RRC Setup&access SR'
},
subtitle: {
text: ''
},
xAxis: [{
categories: <?php echo json_encode($Period_start_time, JSON_NUMERIC_CHECK);?>
}],
yAxis: [{ // Primary yAxis
min:0,
labels: {
format: '{value}',
style: {
color: '#89A54E'
}
},
title: {
text: 'SumOfRRC stp and acc CR UE',
style: {
color: '#89A54E'
}
}
}, { // Secondary yAxis
title: {
text: 'SumOfRRC Stp att',
style: {
color: '#FF00FF'
}
},
labels: {
format: '{value} ',
style: {
color: '#FF00FF'
}
},
opposite: true
}],
tooltip: {
shared: true
},
legend: {
layout: 'vertical',
align: 'left',
x: 120,
verticalAlign: 'top',
y: 100,
floating: true,
backgroundColor: '#FFFFFF'
},
series: [{
name: 'SumOfRRC stp and acc CR UE',
color: '#89A54E',
type: 'spline',
yAxis: 0,
data: [<?php echo json_encode($SumOfRRC_stp_and_acc_CR_UE, JSON_NUMERIC_CHECK);?>],
tooltip: {
valueSuffix: ''
}
}, {
name: 'SumOfRRC Stp att',
color: '#FF00FF',
type: 'column',
yAxis: 1,
data: [<?php echo json_encode($SumOfRRC_Stp_att, JSON_NUMERIC_CHECK); ?>],
tooltip: {
valueSuffix: ''
}
}]
});
});
</script>
</head>
<body>
<div id="container" style="width: 80%; height: 400px; margin: 10px auto"></div>
</body>
</html>
<?php } } ?> |