<?php
 require_once('class.ProvOnline2.inc.php'); class OpOnline2 extends ProvOnline2 { public function __construct( $app) { parent::__construct( $app); $this->can_access = ValidateLevel( $this->owner->config['SECURITY']['RESELLER_OPERATORS']); $this->can_add = ValidateLevel( $this->owner->config['SECURITY']['RESELLER_OPERATORS']+LVL_ADD); $this->can_edit = ValidateLevel( $this->owner->config['SECURITY']['RESELLER_OPERATORS']+LVL_EDIT); $this->can_remove = ValidateLevel( $this->owner->config['SECURITY']['SYSTEM_OPERATORS']+LVL_REMOVE); } protected function int_show($page=0) { $a = $this->db->get_records_for_lowlevel( $this->owner->config['LINES_PER_PAGE'], $page); $recs = $a[0][0]; $allTime = $a[0][1]; $allRecs = $a[1]; array_push($this->owner->pan_menu,array('rad.OpActions2.search','bbar/search.png',STR_CMMN_FIND)); $this->owner->pager('rad.'.get_class($this).'.view', $recs, $page); $allSum = 0; $allIn = 0; $allOut = 0; $aact = (file_exists('/opt/stasoft/bin/raddis.sh') && $this->can_remove); if (count($allRecs) > 0) { for ($i = 0; $i < count($allRecs); $i++) { $allRecs[$i][6] = round(($allRecs[$i][6]/1024),0); $allRecs[$i][7] = round(($allRecs[$i][7]/1024),0); $allRecs[$i][8] = round($allRecs[$i][8],2); $allIn += $allRecs[$i][6]; $allOut += $allRecs[$i][7]; $allSum += $allRecs[$i][8]; $allRecs[$i][3] = $allRecs[$i][3].':'.$allRecs[$i][9]; if ($aact) $allRecs[$i][9] = "&nbsp;<a onclick=\"javascript: return dialog('".STR_ACT_DISCONNECT."', '".$allRecs[$i][0]." ?', '".$_SERVER['PHP_SELF']."?q=rad.OpOnline2.disconnect&amp;id=".$allRecs[$i][0]."&amp;srv=".$allRecs[$i][10]."&amp;page=0')\" href=# >".GetImage('delete.png').'</a>&nbsp;'; else $allRecs[$i][9] = ''; } $allName = array( 0 => STR_ACT_USERNAME, 1 => STR_ACT_STARTTIME, 2 => STR_ACT_CALLFROM, 3 => STR_ACT_CALLTO, 4 => STR_ACT_IP, 5 => STR_ACT_TIMEON, 6 => STR_ACT_INBYTES, 7 => STR_ACT_OUTBYTES, 8 => STR_ACT_MBILLING, 9 => STR_CMMN_OPTIONS ); $this->owner->print_array_as_table($allName, $allRecs, STR_ACT_TABLETITLE, sprintf(STR_ACT_TOTAL,$recs, $allTime, $allIn, $allOut, $allSum)); } else $this->owner->info_msg(STR_CMMN_NOTFOUND); } } ?>
