Example #1
0
 function displayPage()
 {
     $db =& $this->db;
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('form_meta', '<input type="hidden" name="p" value="sessions"><input type="hidden" name="q" value="Grid">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     // Construct Filter Form
     if (Kit::IsFilterPinned('sessions', 'Filter')) {
         $filter_pinned = 1;
         $filter_type = Session::Get('sessions', 'filter_type');
         $filter_fromdt = Session::Get('sessions', 'filter_fromdt');
     } else {
         $filter_pinned = 0;
         $filter_type = '0';
         $filter_fromdt = NULL;
     }
     $formFields = array();
     $formFields[] = FormManager::AddDatePicker('filter_fromdt', __('From Date'), $filter_fromdt, NULL, 't');
     $formFields[] = FormManager::AddCombo('filter_type', __('Type'), $filter_type, array(array('typeid' => '0', 'type' => 'All'), array('typeid' => 'active', 'type' => 'Active'), array('typeid' => 'guest', 'type' => 'Guest'), array('typeid' => 'expired', 'type' => 'Expired')), 'typeid', 'type', NULL, 'd');
     $formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
     // Call to render the template
     Theme::Set('header_text', __('Sessions'));
     Theme::Set('form_fields', $formFields);
     Theme::Render('grid_render');
 }
Example #2
0
 public function displayPage()
 {
     // Configure the theme
     Theme::Set('id', 'LogGridForRefresh');
     Theme::Set('form_meta', '<input type="hidden" name="p" value="auditlog"><input type="hidden" name="q" value="Grid">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager('LogGridForRefresh'));
     // Construct Filter Form
     if (Kit::IsFilterPinned('auditlog', 'Filter')) {
         $filter_pinned = 1;
         $filterFromDt = Session::Get('auditlog', 'filterFromDt');
         $filterToDt = Session::Get('auditlog', 'filterToDt');
         $filterUser = Session::Get('auditlog', 'filterUser');
         $filterEntity = Session::Get('auditlog', 'filterEntity');
     } else {
         $filter_pinned = 0;
         $filterFromDt = NULL;
         $filterToDt = NULL;
         $filterUser = NULL;
         $filterEntity = NULL;
     }
     // Fields
     $formFields = array();
     $formFields[] = FormManager::AddDatePicker('filterFromDt', __('From Date'), $filterFromDt, NULL, 'f');
     $formFields[] = FormManager::AddDatePicker('filterToDt', __('To Date'), $filterToDt, NULL, 't');
     $formFields[] = FormManager::AddText('filterUser', __('User'), $filterUser, NULL, 'u');
     $formFields[] = FormManager::AddText('filterEntity', __('Entity'), $filterEntity, NULL, 'e');
     $formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
     // Call to render the template
     Theme::Set('header_text', __('Audit Trail'));
     Theme::Set('form_fields', $formFields);
     Theme::Render('grid_render');
 }
Example #3
0
 public function displayPage()
 {
     $db =& $this->db;
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', 'LogGridForRefresh');
     Theme::Set('form_meta', '<input type="hidden" name="p" value="log"><input type="hidden" name="q" value="Grid">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager('LogGridForRefresh'));
     // Construct Filter Form
     if (Kit::IsFilterPinned('log', 'Filter')) {
         $filter_pinned = 1;
         $filter_type = Session::Get('log', 'filter_type');
         $filter_page = Session::Get('log', 'filter_page');
         $filter_function = Session::Get('log', 'filter_function');
         $filter_display = Session::Get('log', 'filter_display');
         $filter_fromdt = Session::Get('log', 'filter_fromdt');
         $filter_seconds = Session::Get('log', 'filter_seconds');
         $filter_intervalTypeId = Session::Get('log', 'filter_intervalTypeId');
     } else {
         $filter_pinned = 0;
         $filter_type = 0;
         $filter_page = NULL;
         $filter_function = NULL;
         $filter_display = 0;
         $filter_fromdt = NULL;
         $filter_seconds = 120;
         $filter_intervalTypeId = 1;
     }
     // Two tabs
     $tabs = array();
     $tabs[] = FormManager::AddTab('general', __('General'));
     $tabs[] = FormManager::AddTab('advanced', __('Advanced'));
     $formFields = array();
     $formFields['general'][] = FormManager::AddCombo('filter_type', __('Type'), $filter_type, array(array('typeid' => 0, 'type' => 'All'), array('typeid' => 2, 'type' => 'Audit'), array('typeid' => 1, 'type' => 'Error')), 'typeid', 'type', NULL, 't');
     $formFields['general'][] = FormManager::AddCombo('filter_intervalTypeId', __('Interval'), $filter_intervalTypeId, array(array('intervalTypeid' => 1, 'intervalType' => __('Seconds')), array('intervalTypeid' => 60, 'intervalType' => __('Minutes')), array('intervalTypeid' => 3600, 'intervalType' => __('Hours'))), 'intervalTypeid', 'intervalType', NULL, 'i');
     $formFields['general'][] = FormManager::AddText('filter_seconds', __('Duration back'), $filter_seconds, NULL, 's');
     $formFields['general'][] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
     // Advanced Tab
     $formFields['advanced'][] = FormManager::AddDatePicker('filter_fromdt', __('From Date'), $filter_fromdt, NULL, 't');
     $formFields['advanced'][] = FormManager::AddText('filter_page', __('Page'), $filter_page, NULL, 'p');
     $formFields['advanced'][] = FormManager::AddText('filter_function', __('Function'), $filter_function, NULL, 'f');
     // Display
     $displays = $this->user->DisplayList();
     array_unshift($displays, array('displayid' => 0, 'display' => 'All'));
     $formFields['advanced'][] = FormManager::AddCombo('filter_display', __('Display'), $filter_display, $displays, 'displayid', 'display', NULL, 't');
     // Call to render the template
     Theme::Set('header_text', __('Logs'));
     Theme::Set('form_tabs', $tabs);
     Theme::Set('form_fields_general', $formFields['general']);
     Theme::Set('form_fields_advanced', $formFields['advanced']);
     Theme::Render('grid_render');
 }
Example #4
0
 /**
  * Stats page
  */
 function displayPage()
 {
     // Render a Bandwidth Widget
     $id = Kit::uniqueId();
     Theme::Set('id', $id);
     Theme::Set('form_meta', '<input type="hidden" name="p" value="stats"><input type="hidden" name="q" value="BandwidthGrid">');
     $formFields = array();
     $formFields[] = FormManager::AddDatePicker('fromdt', __('From Date'), DateManager::getLocalDate(time() - 86400 * 35, 'Y-m-d'), NULL, 'f');
     $formFields[] = FormManager::AddDatePicker('todt', __('To Date'), DateManager::getLocalDate(null, 'Y-m-d'), NULL, 't');
     // List of Displays this user has permission for
     $displays = $this->user->DisplayGroupList(1);
     array_unshift($displays, array('displayid' => 0, 'displaygroup' => 'All'));
     $formFields[] = FormManager::AddCombo('displayid', __('Display'), NULL, $displays, 'displayid', 'displaygroup', NULL, 'd');
     Theme::Set('header_text', __('Bandwidth'));
     Theme::Set('form_fields', $formFields);
     Theme::Render('grid_render');
     // Render an Availability Widget
     $id = Kit::uniqueId();
     Theme::Set('id', $id);
     Theme::Set('form_meta', '<input type="hidden" name="p" value="stats"><input type="hidden" name="q" value="AvailabilityGrid">');
     $formFields = array();
     $formFields[] = FormManager::AddDatePicker('fromdt', __('From Date'), DateManager::getLocalDate(time() - 86400 * 35, 'Y-m-d'), NULL, 'f');
     $formFields[] = FormManager::AddDatePicker('todt', __('To Date'), DateManager::getLocalDate(null, 'Y-m-d'), NULL, 't');
     // List of Displays this user has permission for
     $displays = $this->user->DisplayGroupList(1);
     array_unshift($displays, array('displayid' => 0, 'displaygroup' => 'All'));
     $formFields[] = FormManager::AddCombo('displayid', __('Display'), NULL, $displays, 'displayid', 'displaygroup', NULL, 'd');
     Theme::Set('header_text', __('Availability'));
     Theme::Set('form_fields', $formFields);
     Theme::Render('grid_render');
     // Proof of Play stats widget
     $id = Kit::uniqueId();
     Theme::Set('id', $id);
     Theme::Set('form_meta', '<input type="hidden" name="p" value="stats"><input type="hidden" name="q" value="StatsGrid">');
     $formFields = array();
     $formFields[] = FormManager::AddDatePicker('fromdt', __('From Date'), DateManager::getLocalDate(time() - 86400, 'Y-m-d'), NULL, 'f');
     $formFields[] = FormManager::AddDatePicker('todt', __('To Date'), DateManager::getLocalDate(null, 'Y-m-d'), NULL, 't');
     // List of Displays this user has permission for
     $displays = $this->user->DisplayGroupList(1);
     array_unshift($displays, array('displayid' => 0, 'displaygroup' => 'All'));
     $formFields[] = FormManager::AddCombo('displayid', __('Display'), NULL, $displays, 'displayid', 'displaygroup', NULL, 'd');
     // List of Media this user has permission for
     $media = $this->user->MediaList();
     array_unshift($media, array('mediaid' => 0, 'media' => 'All'));
     $formFields[] = FormManager::AddCombo('mediaid', __('Media'), NULL, $media, 'mediaid', 'media', NULL, 'm');
     // Call to render the template
     Theme::Set('header_text', __('Statistics'));
     Theme::Set('form_fields', $formFields);
     Theme::Render('grid_render');
 }