[Fixes in sip prepaid pages Adrian Georgescu **20090503081248] hunk ./library/ngnpro_client.php 2827 - if (is_array($dictionary['$properties'])) { - $properties=$dictionary['$properties']; + if (is_array($dictionary['properties'])) { + $properties=$dictionary['properties']; hunk ./library/rating.php 5885 - ('%s','%s','Debit balance','Session to %s for %ds','%s','%s',NOW(),'%s','%d','%s')", + ('%s','%s','Debit balance','Session to %s for %ds','-%s','%s',NOW(),'%s','%d','%s')", hunk ./library/sip_settings.php 641 - //dprint_r($result); + //print_r($result); hunk ./library/sip_settings.php 671 + $this->createDate= $result->createDate; hunk ./library/sip_settings.php 1554 - print " - - - "; - hunk ./library/sip_settings.php 1756 -

%s"),$this->sip_settings_page,$this->sip_settings_page); + %s"),$this->sip_settings_page,$this->sip_settings_page); hunk ./library/sip_settings.php 1773 + if ($this->login_type == 'admin' && $this->Preferences['ip']) { + printf ("SIP account registered from %s at %s",$this->Preferences['ip'],$this->createDate); + } hunk ./library/sip_settings.php 3538 + + if (PEAR::isError($result)) { + $error_msg = $result->getMessage(); + $error_fault= $result->getFault(); + $error_code = $result->getCode(); + if ($error_fault->detail->exception->errorcode != "2000") { + printf ("

Error (SipPort): %s (%s): %s",$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); + } + } + + if (!count($this->balance_history)) { + return; + } hunk ./library/sip_settings.php 3558 -

- "; + "; hunk ./library/sip_settings.php 3560 + print " +

+

"; hunk ./library/sip_settings.php 3584 - $this->SipPort->addHeader($this->SoapAuth); - - $result = $this->SipPort->getCreditHistory($this->sipId,200); - - if (PEAR::isError($result)) { - $error_msg = $result->getMessage(); - $error_fault= $result->getFault(); - $error_code = $result->getCode(); - if ($error_fault->detail->exception->errorcode != "2000") { - printf ("

Error (SipPort): %s (%s): %s",$error_msg, $error_fault->detail->exception->errorcode,$error_fault->detail->exception->errorstring); - } - } - hunk ./library/sip_settings.php 3588 + $value=-$_line->value; hunk ./library/sip_settings.php 3597 + $value=$_line->value; + } + + if ($value <0) { + $total_debit+=$value; + } + if ($value >0) { + $total_credit+=$value; hunk ./library/sip_settings.php 3614 -

+ hunk ./library/sip_settings.php 3623 + "; + + if (strlen($total_credit)) { + + print " + + + + + + + + + "; + } + + if ($total_debit) { + print " + + + + + + + + + "; + } + + print "
$_line->value$value
Total credit$total_credit
Total debit$total_debit