[Added links to Prepaid calls and quota in the main menu Adrian Georgescu **20080914160346 Fixed showFooter() when exporting csv files from rating page ] hunk ./debian/changelog 1 +cdrtool (6.6.4) unstable; urgency=low + + * Added links to Prepaid calls and quota in the main menu + * + + -- Adrian Georgescu Sun, 14 Sep 2008 18:03:10 +0200 + hunk ./library/rating.php 3641 + if ($table=='prepaid' && strlen($_REQUEST['search_session_counter'])) { + $this->readonly=true; + } + hunk ./library/rating.php 4168 - $active_sessions[$_session]['startTime']=Date("Y-m-d H:i",$active_sessions[$_session]['timestamp']); - $active_sessions[$_session]['duration']=sec2hms($duration). " (".$duration."s)"; - $active_sessions[$_session]['maxSessionTime']=sec2hms($maxsessiontime). " (".$maxsessiontime."s)";; hunk ./library/rating.php 4169 - $extraInfo.= sprintf ("%s%s",ucfirst($key),$active_sessions[$_session][$key]); + if ($key=='timestamp') { + $extraInfo.= sprintf ("StartTime%s",Date("Y-m-d H:i",$active_sessions[$_session]['timestamp'])); + $extraInfo.= sprintf ("Progress%s (%s s)",sec2hms($duration),$duration); + } else { + $extraInfo.= sprintf ("%s%s",ucfirst($key),$active_sessions[$_session][$key]); + } hunk ./library/rating.php 4204 - hunk ./library/rating.php 4250 - hunk ./library/rating.php 4253 - hunk ./library/rating.php 4254 - print "$value"; + if ($table == 'prepaid' && $Fname == 'session_counter' && $value) { + if (count($active_sessions) > 1) { + $session_counter_txt=sprintf("%d sessions",$value); + } else { + $session_counter_txt=sprintf("%d session",$value); + } + + printf("%s",$found,$session_counter_txt); + + } else { + print "$value"; + } + hunk ./library/rating.php 4301 - if (!$export && !$this->tables[$table]['readonly']) { - if ($subaction=="Delete" && $idForDeletion == $id && !$confirmDelete) { - print ""; - print ""; - print ""; - } else { + if (!$export) { + if (!$this->tables[$table]['readonly']) { + if ($subaction=="Delete" && $idForDeletion == $id && !$confirmDelete) { + print ""; + print ""; + print ""; + } else { + print " + + + + "; + print ""; + } + hunk ./library/rating.php 4317 - - - + + + + + + + + + $extraInfo + hunk ./library/rating.php 4328 - print ""; + } else { + if ($table=='prepaid') { + print " + + + $extraInfo + + "; + } hunk ./library/rating.php 4338 - - print " - - - - - - - - - - $extraInfo - - - "; hunk ./phplib/local.inc 724 + print " | Prepaid"; + print " | Quota"; hunk ./rating_tables.phtml 93 -$layout->showFooter(); - -print " - - -"; +if (!$export) { + $layout->showFooter(); + print " + + + "; +} hunk ./version 1 -6.6.3 +6.6.4