<?php
 require_once('class.Card2.inc.php'); class RecCard2 extends Card2 { 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']['PROVIDER_OPERATORS']+LVL_EDIT); $this->can_remove = ValidateLevel( $this->owner->config['SECURITY']['PROVIDER_OPERATORS']+LVL_REMOVE); } protected function int_show($page=0, $printable=false) { $a = $this->dbr->get_records_for_lowlevel( $this->owner->config['LINES_PER_PAGE'], $page); $recs = $a[0]; $allRecs = $a[1]; $this->owner->pager('rad.'.get_class($this).'.table_view', $recs, $page); if (count($allRecs) > 0) { $obj = $this->owner->load_object_resource('rad.Reports2'); for ($i = 0; $i < count($allRecs); $i++) { $ucol = $allRecs[$i]['cards_col']; if ( $printable) $allRecs[$i][1] = '<a href="'.$_SERVER['PHP_SELF'].'?q=rad.'.get_class($this).'.print_n_sell&amp;sid='.$allRecs[$i][0].'&amp;desc='.$allRecs[$i][5].'" ><img src="'.$allRecs[$i][1].'" border="0" width="150px" height="100px" /></a>'; else $allRecs[$i][1] = '<a href="'.$_SERVER['PHP_SELF'].'?q=rad.'.get_class($this).'.sell&amp;sid='.$allRecs[$i][0].'&amp;desc='.$allRecs[$i][5].'" ><img src="'.$allRecs[$i][1].'" border="0" width="150px" height="100px" /></a>'; $allRecs[$i][3] = $this->get_users_from_sid( $allRecs[$i][0], $ucol, 'Op'); $allRecs[$i][4] = '&nbsp;<a href="'.$_SERVER['PHP_SELF'].'?q=rad.OpTariff2.edit&amp;id='.$allRecs[$i][4].'&amp;page='.$page.'" >'.$this->db->get_tariff_name($allRecs[$i][4]).'</a>&nbsp;'; } $allName = array( 0 => STR_CMMN_ID, 1 => STR_CRD_IMAGE, 2 => STR_CRD_SUM_ON_CARD, 3 => STR_CRD_USERS, 4 => STR_CRD_TARIFF, 5 => STR_CMMN_DESC ); $this->owner->_out('<p>'); if ( $printable) $this->owner->_out( STR_CRD_CLICK_P_SELL); else $this->owner->_out( STR_CRD_CLICK_2_SELL); $this->owner->_out('<p />'); $this->owner->print_array_as_table($allName, $allRecs, STR_CRD_TABLETITLE, sprintf(STR_CMMN_TOTAL,$recs)); } else $this->owner->info_msg(STR_CMMN_NOTFOUND); } } ?>
