add new version
This commit is contained in:
@@ -262,6 +262,9 @@ $thisMonthTotalMMSRetrieveCharged=0;
|
||||
$thisMonthTotalMMSEmailNumber=0;
|
||||
$thisMonthTotalMMSEmailCharged=0;
|
||||
|
||||
|
||||
$allUssdCodes = []; // <20><><EFBFBD>ڴ洢<DAB4><E6B4A2><EFBFBD>м<EFBFBD>¼<EFBFBD><C2BC> ussd_code
|
||||
|
||||
do{
|
||||
//Account summary
|
||||
if ($lastMonthBalance==0)
|
||||
@@ -379,6 +382,54 @@ do{
|
||||
$thisMonthTotalMMSEmailNumber+=$selRow[mms_email_number];
|
||||
$thisMonthTotalMMSEmailCharged+=$selRow[mms_email_charged];
|
||||
|
||||
|
||||
if(!count($allUssdCodes)){ // <20><><EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>¼
|
||||
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
for ($i = 1; $i <= 8; $i++) {
|
||||
$allUssdCodes[$i] = $selRow['ussd_code_' . $i];
|
||||
$thisMonthTotalSessionNum[$i] = $selRow['session_num_' . $i];
|
||||
$thisMonthTotalSessionDuration[$i] = $selRow['session_duration_'. $i];
|
||||
$thisMonthTotalErrorTimeout[$i] = $selRow['error_timeout_'. $i];
|
||||
$thisMonthTotalErrorSystem[$i] = $selRow['error_system_'. $i];
|
||||
$thisMonthTotalErrorMessage[$i] = $selRow['error_message_'. $i];
|
||||
}
|
||||
} else { // ʣ<><CAA3><EFBFBD><EFBFBD>¼
|
||||
// <20><><EFBFBD><EFBFBD>USSD<53><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><D3B3>
|
||||
$codeToIndexMap = array_flip(array_filter($allUssdCodes));
|
||||
|
||||
for ($j = 1; $j <= 8; $j++) {
|
||||
$currentCode = $selRow['ussd_code_' . $j];
|
||||
if (!$currentCode) continue; // <20><><EFBFBD><EFBFBD><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>
|
||||
|
||||
if (isset($codeToIndexMap[$currentCode])) {
|
||||
// <20>Ѵ<EFBFBD><D1B4>ڵĴ<DAB5><C4B4>룬<EFBFBD>ۼ<EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$index = $codeToIndexMap[$currentCode];
|
||||
$thisMonthTotalSessionNum[$index] += $selRow['session_num_' . $j];
|
||||
$thisMonthTotalSessionDuration[$index] += $selRow['session_duration_'. $j];
|
||||
$thisMonthTotalErrorTimeout[$index] += $selRow['error_timeout_'. $j];
|
||||
$thisMonthTotalErrorSystem[$index] += $selRow['error_system_'. $j];
|
||||
$thisMonthTotalErrorMessage[$index] += $selRow['error_message_'. $j];
|
||||
} else {
|
||||
//<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
|
||||
foreach ($allUssdCodes as $key => $value) {
|
||||
if (!$value) {
|
||||
$allUssdCodes[$key] = $currentCode;
|
||||
$codeToIndexMap[$currentCode] = $key;
|
||||
$thisMonthTotalSessionNum[$key] = $selRow['session_num_' . $j];
|
||||
$thisMonthTotalSessionDuration[$key] = $selRow['session_duration_'. $j];
|
||||
$thisMonthTotalErrorTimeout[$key] = $selRow['error_timeout_'. $j];
|
||||
$thisMonthTotalErrorSystem[$key] = $selRow['error_system_'. $j];
|
||||
$thisMonthTotalErrorMessage[$key] = $selRow['error_message_'. $j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}while($selRow=mysqli_fetch_array($selRes));
|
||||
|
||||
$thisMonthTotalGPRSVolume=number_format($thisMonthTotalGPRSVolume,3,'.','');
|
||||
@@ -735,6 +786,79 @@ for($i=1;$i<=12;$i++){
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
//----------------------------------USSD Code Report-----------------------------------------------------------
|
||||
?>
|
||||
<p></p>
|
||||
<TABLE border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||||
<TR bgcolor=#E6E6E6>
|
||||
<?php
|
||||
echo "<td width=\"10%\"> </td>";
|
||||
echo "<td width=\"10%\">Index</td>";
|
||||
echo "<td width=\"10%\">USSD Code</td> ";
|
||||
echo "<td width=\"10%\" align=\"right\">Session Num</td> ";
|
||||
echo "<td width=\"10%\" align=\"right\">Session Duration</td> ";
|
||||
echo "<td width=\"10%\" align=\"right\">Error Timeout</td> ";
|
||||
echo "<td width=\"10%\" align=\"right\">Error System</td> ";
|
||||
echo "<td width=\"10%\" align=\"right\">Error Message</td> ";
|
||||
echo "<td width=\"10%\" align=\"right\">Average Duration</td> ";
|
||||
echo "<td width=\"10%\" align=\"right\">TPS</td> ";
|
||||
|
||||
?>
|
||||
</TR>
|
||||
<TR >
|
||||
<td rowspan="11"><?php echo "USSD Code Report"; ?></td>
|
||||
<?php
|
||||
echo "<td>1</td>";
|
||||
// $thisMonthTotalSessionNum[$i]+=$selRow['session_num_' . $i];
|
||||
// $thisMonthTotalSessionDuration[$i]+=$selRow['session_duration_'. $i];
|
||||
// $thisMonthTotalErrorTimeout[$i]+=$selRow['error_timeout_'. $i];
|
||||
// $thisMonthTotalErrorSystem[$i]+=$selRow['error_system_'. $i];
|
||||
// $thisMonthTotalErrorMessage[$i]+=$selRow['error_message_'. $i];
|
||||
// $thisMonthTotalErrorReserve1[$i]+=$selRow['error_reserve_1_'. $i];
|
||||
// $thisMonthTotalErrorReserve2[$i]+=$selRow['error_reserve_2_'. $i];
|
||||
$average1 = $thisMonthTotalSessionNum[1] ? round($thisMonthTotalSessionDuration[1]/($thisMonthTotalSessionNum[1]), 2) : 0;
|
||||
$tps1 = round($thisMonthTotalSessionNum[1]/(3600*24), 2);
|
||||
echo "<td align=\"right\">$allUssdCodes[1]</td>";
|
||||
echo "<td align=\"right\">$thisMonthTotalSessionNum[1]</td>";
|
||||
echo "<td align=\"right\">$thisMonthTotalSessionDuration[1]</td>";
|
||||
echo "<td align=\"right\">$thisMonthTotalErrorTimeout[1]</td>";
|
||||
echo "<td align=\"right\">$thisMonthTotalErrorSystem[1]</td>";
|
||||
echo "<td align=\"right\">$thisMonthTotalErrorMessage[1]</td>";
|
||||
echo "<td align=\"right\">$average1</td>";
|
||||
echo "<td align=\"right\">$tps1</td>";
|
||||
|
||||
|
||||
// echo "<td align=\"right\">$incoming_call_nums</td>";
|
||||
// echo "<td align=\"right\">$incoming_call_duration</td>";
|
||||
// echo "<td align=\"right\">$incoming_call_charge</td>";
|
||||
?>
|
||||
</TR>
|
||||
<?php
|
||||
for ($i = 2; $i <= 8; $i++) {
|
||||
$average = $thisMonthTotalSessionNum[$i] ? round($thisMonthTotalSessionDuration[$i]/$thisMonthTotalSessionNum[$i], 2) : 0;
|
||||
$tps = round($thisMonthTotalSessionNum[$i]/(3600*24), 2);
|
||||
echo "<tr>";
|
||||
echo "<td>$i</td>";
|
||||
echo "<td align=\"right\">{$allUssdCodes[$i]}</td>";
|
||||
echo "<td align=\"right\">{$thisMonthTotalSessionNum[$i]}</td>";
|
||||
echo "<td align=\"right\">{$thisMonthTotalSessionDuration[$i]}</td>";
|
||||
echo "<td align=\"right\">{$thisMonthTotalErrorTimeout[$i]}</td>";
|
||||
echo "<td align=\"right\">{$thisMonthTotalErrorSystem[$i]}</td>";
|
||||
echo "<td align=\"right\">{$thisMonthTotalErrorMessage[$i]}</td>";
|
||||
echo "<td align=\"right\">{$average}</td>";
|
||||
echo "<td align=\"right\">{$tps}</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p></p>
|
||||
<?php
|
||||
echo "<table border=\"1\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
|
||||
|
||||
Reference in New Issue
Block a user