###################################################
 ### TOTALS SERVER IP SUMMARY SECTION ###
 if (strlen($did_server_ip[0]) > 0) {
     $ASCII_text .= _QXZ("Server Summary") . ":\n";
     $ASCII_text .= "+----------------------------+------------+\n";
     $ASCII_text .= "| " . _QXZ("SERVER", 26) . " | " . _QXZ("CALLS", 10) . " |\n";
     $ASCII_text .= "+----------------------------+------------+\n";
     $CSV_text1 .= "\"" . _QXZ("Server Summary") . ":\"\n";
     $CSV_text1 .= "\"" . _QXZ("Server") . "\",\"" . _QXZ("CALLS") . "\"\n";
     $GRAPH_text .= "</PRE><table cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"white\" summary=\"Server Summary\" class=\"horizontalgraph\">\n";
     $GRAPH_text .= "  <caption align=\"top\">" . _QXZ("Server Summary") . ":</caption>\n";
     $GRAPH_text .= "<tr>\n";
     $GRAPH_text .= "<th class=\"thgraph\" scope=\"col\">" . _QXZ("SERVER") . "</th>\n";
     $GRAPH_text .= "<th class=\"thgraph\" scope=\"col\">" . _QXZ("CALLS") . "</th>\n";
     $GRAPH_text .= "</tr>\n";
     $SVstats_array = array_group_count($did_server_ip, 'desc');
     $SVstats_array_ct = count($SVstats_array);
     $d = 0;
     $max_calls = 1;
     while ($d < $SVstats_array_ct) {
         $stat_description = ' *** default *** ';
         $stat_route = $default_route;
         $stat_record_array = explode(' ', $SVstats_array[$d]);
         $stat_count = $stat_record_array[0] + 0;
         $stat_pattern = $stat_record_array[1];
         if ($stat_count > $max_calls) {
             $max_calls = $stat_count;
         }
         $SVgraph_stats[$d][0] = $stat_count;
         $SVgraph_stats[$d][1] = $stat_pattern;
         $stmt = "select server_id from servers where server_ip='{$stat_pattern}';";
Exemple #2
0
 if ($DB) {
     echo "{$stmt}\n";
 }
 $Drecords_to_grab = mysql_num_rows($rslt);
 if ($Drecords_to_grab > 0) {
     $row = mysql_fetch_row($rslt);
     $default_route = $row[0];
 }
 ###################################################
 ### TOTALS DID SUMMARY SECTION ###
 if (strlen($extension[0]) > 0) {
     echo "DID Summary:\n";
     echo "+--------------------+--------------------------------+------------+------------+\n";
     echo "| DID                | DESCRIPTION                    | ROUTE      | CALLS      |\n";
     echo "+--------------------+--------------------------------+------------+------------+\n";
     $stats_array = array_group_count($extension, 'desc');
     $stats_array_ct = count($stats_array);
     $d = 0;
     while ($d < $stats_array_ct) {
         $stat_description = ' *** default *** ';
         $stat_route = $default_route;
         $stat_record_array = explode(' ', $stats_array[$d]);
         $stat_count = $stat_record_array[0] + 0;
         $stat_pattern = $stat_record_array[1];
         $stmt = "select did_description,did_route from vicidial_inbound_dids where did_pattern='{$stat_pattern}';";
         $rslt = mysql_query($stmt, $link);
         $details_to_grab = mysql_num_rows($rslt);
         if ($details_to_grab > 0) {
             $row = mysql_fetch_row($rslt);
             $stat_description = $row[0];
             $stat_route = $row[1];