Fixed minor bug in Hangup Cause Report

git-svn-id: svn://192.168.202.10@2097 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2014-04-03 23:55:44 +00:00
parent 3c59351a20
commit 5c1d7c639b
@@ -11,6 +11,7 @@
# 130621-0749 - Added filtering of input to prevent SQL injection attacks and new user auth # 130621-0749 - Added filtering of input to prevent SQL injection attacks and new user auth
# 130902-0731 - Changed to mysqli PHP functions # 130902-0731 - Changed to mysqli PHP functions
# 140108-0739 - Added webserver and hostname to report logging # 140108-0739 - Added webserver and hostname to report logging
# 140403-1830 - Fixed SIP hangup bug
# #
$startMS = microtime(); $startMS = microtime();
@@ -124,6 +125,7 @@ $hangup_cause_dictionary = array(
#### SIP response code directory #### SIP response code directory
$sip_response_directory = array( $sip_response_directory = array(
0 => "",
100 => "Trying", 100 => "Trying",
180 => "Ringing", 180 => "Ringing",
181 => "Call is Being Forwarded", 181 => "Call is Being Forwarded",
@@ -727,14 +729,14 @@ if ($SUBMIT && $server_ip_ct>0) {
$carrier_rpt_hf=""; $carrier_rpt_hf="";
$ll=$lower_limit-1000; $ll=$lower_limit-1000;
if ($ll>=1) { if ($ll>=1) {
$carrier_rpt_hf.="<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&type=$type&query_date=$query_date&query_date_D=$query_date_D&query_date_T=$query_date_T$hangup_causeQS$dial_statusQS$server_ipQS&lower_limit=$ll\">[<<< PREV 1000 records]</a>"; $carrier_rpt_hf.="<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&type=$type&query_date=$query_date&query_date_D=$query_date_D&query_date_T=$query_date_T$server_ipQS$hangup_causeQS$sip_hangup_causeQS$dial_statusQS&lower_limit=$ll\">[<<< PREV 1000 records]</a>";
} else { } else {
$carrier_rpt_hf.=sprintf("%-23s", " "); $carrier_rpt_hf.=sprintf("%-23s", " ");
} }
$carrier_rpt_hf.=sprintf("%-145s", " "); $carrier_rpt_hf.=sprintf("%-145s", " ");
if (($lower_limit+1000)<mysqli_num_rows($rpt_rslt)) { if (($lower_limit+1000)<mysqli_num_rows($rpt_rslt)) {
if ($upper_limit+1000>=mysqli_num_rows($rpt_rslt)) {$max_limit=mysqli_num_rows($rpt_rslt)-$upper_limit;} else {$max_limit=1000;} if ($upper_limit+1000>=mysqli_num_rows($rpt_rslt)) {$max_limit=mysqli_num_rows($rpt_rslt)-$upper_limit;} else {$max_limit=1000;}
$carrier_rpt_hf.="<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&type=$type&query_date=$query_date&query_date_D=$query_date_D&query_date_T=$query_date_T$server_ipQS$hangup_causeQS$dial_statusQS&lower_limit=".($lower_limit+1000)."\">[NEXT $max_limit records >>>]</a>"; $carrier_rpt_hf.="<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&type=$type&query_date=$query_date&query_date_D=$query_date_D&query_date_T=$query_date_T$server_ipQS$hangup_causeQS$sip_hangup_causeQS$dial_statusQS&lower_limit=".($lower_limit+1000)."\">[NEXT $max_limit records >>>]</a>";
} else { } else {
$carrier_rpt_hf.=sprintf("%23s", " "); $carrier_rpt_hf.=sprintf("%23s", " ");
} }