<?php
 require_once('class.WebRAD.inc.php'); class Radlog extends WebRAD { var $db; public function __construct( $app) { parent::__construct( $app); $this->owner->set_help( get_class($this)); $this->db = $this->owner->load_db_resource( get_class($this)); $this->can_access = ValidateLevel( $this->owner->config['SECURITY']['SYSTEM_OPERATORS']); $this->can_add = ValidateLevel( $this->owner->config['SECURITY']['SYSTEM_OPERATORS']+LVL_ADD); $this->can_edit = ValidateLevel( $this->owner->config['SECURITY']['SYSTEM_OPERATORS']+LVL_EDIT); $this->can_remove = ValidateLevel( $this->owner->config['SECURITY']['SYSTEM_OPERATORS']+LVL_REMOVE); $this->owner->load_string_resource(get_class($this)); } public function table_view() { if ( !$this->can_access) { $this->owner->permission_denied(); return; } if ( isset($GLOBALS['page'])) $page = $GLOBALS['page']; else $page = -1; call_user_func(array($this,'int_show'), $page); } protected function int_show($page=0) { $a = $this->db->get_records( $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) { $allName = array( 0 => STR_RAD_TIME, 1 => STR_RAD_MSG); $this->owner->print_array_as_table($allName, $allRecs, STR_RAD_TABLETITLE, sprintf(STR_RAD_TOTAL,$recs)); } else $this->owner->info_msg(STR_CMMN_NOTFOUND); } } ?>
