Ejemplo n.º 1
0
 function displayPage()
 {
     Theme::Set('version', VERSION);
     Theme::Set('text', Theme::RenderReturn('about_text'));
     // Render the Theme and output
     Theme::Render('about_page');
 }
Ejemplo n.º 2
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');
 }
Ejemplo n.º 3
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');
 }
Ejemplo n.º 4
0
 public function displayPage()
 {
     $subpage = Kit::GetParam('sp', _GET, _WORD, '');
     // Configure the theme
     $id = uniqid();
     // Different pages for data entry and admin
     if ($subpage == 'DataEntry') {
         Theme::Set('id', 'DataEntryGrid');
         $dataSetId = Kit::GetParam('datasetid', _GET, _INT);
         $dataSet = Kit::GetParam('dataset', _GET, _STRING);
         Theme::Set('form_meta', '<input type="hidden" name="p" value="dataset"><input type="hidden" name="q" value="DataSetDataForm"><input type="hidden" name="datasetid" value="' . $dataSetId . '"><input type="hidden" name="dataset" value="' . $dataSet . '">');
         // Call to render the template
         Theme::Set('header_text', $dataSet);
         Theme::Set('form_fields', array());
         Theme::Render('grid_render');
     } else {
         $id = uniqid();
         Theme::Set('id', $id);
         Theme::Set('form_meta', '<input type="hidden" name="p" value="dataset"><input type="hidden" name="q" value="DataSetGrid">');
         Theme::Set('pager', ResponseManager::Pager($id));
         // Call to render the template
         Theme::Set('header_text', __('DataSets'));
         Theme::Set('form_fields', array());
         Theme::Render('grid_render');
     }
 }
Ejemplo n.º 5
0
 /**
  * Controls which pages are to be displayed
  * @return 
  */
 function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('displaygroup_form_add_url', 'index.php?p=displaygroup&q=AddForm');
     Theme::Set('form_meta', '<input type="hidden" name="p" value="user"><input type="hidden" name="q" value="UserGrid">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     if (Kit::IsFilterPinned('user_admin', 'Filter')) {
         $filter_pinned = 1;
         $filter_username = Session::Get('user_admin', 'filter_username');
         $filter_usertypeid = Session::Get('user_admin', 'filter_usertypeid');
         $filterRetired = Session::Get('user_admin', 'filterRetired');
     } else {
         $filter_pinned = 0;
         $filter_username = NULL;
         $filter_usertypeid = NULL;
         $filterRetired = 0;
     }
     $formFields = array();
     $formFields[] = FormManager::AddText('filter_username', __('Name'), $filter_username, NULL, 'n');
     $usertypes = $this->db->GetArray("SELECT usertypeID, usertype FROM usertype ORDER BY usertype");
     array_unshift($usertypes, array('usertypeID' => 0, 'usertype' => 'All'));
     $formFields[] = FormManager::AddCombo('filter_usertypeid', __('User Type'), $filter_usertypeid, $usertypes, 'usertypeID', 'usertype', NULL, 't');
     $formFields[] = FormManager::AddCombo('filterRetired', __('Retired?'), $filterRetired, array(array('retiredId' => -1, 'retired' => 'All'), array('retiredId' => 1, 'retired' => 'Yes'), array('retiredId' => 0, 'retired' => 'No')), 'retiredId', 'retired', NULL, 'r');
     $formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
     // Call to render the template
     Theme::Set('header_text', __('Users'));
     Theme::Set('form_fields', $formFields);
     Theme::Render('grid_render');
 }
Ejemplo n.º 6
0
 /**
  * Displays the page logic
  */
 function displayPage()
 {
     $db =& $this->db;
     // Default options
     if (Kit::IsFilterPinned('content', 'Filter')) {
         Theme::Set('filter_pinned', 'checked');
         Theme::Set('filter_name', Session::Get('content', 'filter_name'));
         Theme::Set('filter_type', Session::Get('content', 'filter_type'));
         Theme::Set('filter_retired', Session::Get('content', 'filter_retired'));
         Theme::Set('filter_owner', Session::Get('content', 'filter_owner'));
         Theme::Set('filter_duration_in_seconds', Session::Get('content', 'filter_duration_in_seconds'));
         Theme::Set('filter_duration_in_seconds_checked', Theme::Get('filter_duration_in_seconds') == 1 ? 'checked' : '');
     } else {
         Theme::Set('filter_retired', 0);
         Theme::Set('filter_duration_in_seconds', 0);
     }
     Theme::Set('library_form_add_url', 'index.php?p=content&q=displayForms');
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     Theme::Set('form_meta', '<input type="hidden" name="p" value="content"><input type="hidden" name="q" value="LibraryGrid">');
     // Field list for a "retired" dropdown list
     Theme::Set('retired_field_list', array(array('retiredid' => 1, 'retired' => 'Yes'), array('retiredid' => 0, 'retired' => 'No')));
     // Field list for a "owner" dropdown list
     Theme::Set('owner_field_list', $db->GetArray("SELECT 0 AS UserID, 'All' AS UserName UNION SELECT DISTINCT user.UserID, user.UserName FROM `media` INNER JOIN `user` ON media.UserID = user.UserID "));
     // Module types filter
     $types = $db->GetArray("SELECT Module AS moduleid, Name AS module FROM `module` WHERE RegionSpecific = 0 AND Enabled = 1 ORDER BY 2");
     array_unshift($types, array('moduleid' => '', 'module' => 'All'));
     Theme::Set('module_field_list', $types);
     // Call to render the template
     Theme::Render('library_page');
 }
Ejemplo n.º 7
0
 public function displayPage()
 {
     $db =& $this->db;
     // Default options
     if (Kit::IsFilterPinned('mediamanager', 'Filter')) {
         $filter_pinned = 1;
         $filter_layout_name = Session::Get('mediamanager', 'filter_layout_name');
         $filter_region_name = Session::Get('mediamanager', 'filter_region_name');
         $filter_media_name = Session::Get('mediamanager', 'filter_media_name');
         $filter_type = Session::Get('mediamanager', 'filter_type');
     } else {
         $filter_pinned = 0;
         $filter_layout_name = NULL;
         $filter_region_name = NULL;
         $filter_media_name = NULL;
         $filter_type = 0;
     }
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     Theme::Set('form_meta', '<input type="hidden" name="p" value="mediamanager"><input type="hidden" name="q" value="MediaManagerGrid">');
     $formFields = array();
     $formFields[] = FormManager::AddText('filter_layout_name', __('Layout'), $filter_layout_name, NULL, 'l');
     $formFields[] = FormManager::AddText('filter_region_name', __('Region'), $filter_region_name, NULL, 'r');
     $formFields[] = FormManager::AddText('filter_media_name', __('Media'), $filter_media_name, NULL, 'm');
     $types = $db->GetArray("SELECT moduleid AS moduleid, Name AS module FROM `module` WHERE Enabled = 1 ORDER BY 2");
     array_unshift($types, array('moduleid' => 0, 'module' => 'All'));
     $formFields[] = FormManager::AddCombo('filter_type', __('Type'), $filter_type, $types, 'moduleid', 'module', NULL, 't');
     $formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
     // Call to render the template
     Theme::Set('header_text', __('Media Manager'));
     Theme::Set('form_fields', $formFields);
     Theme::Render('grid_render');
 }
Ejemplo n.º 8
0
 /**
  * Controls which pages are to be displayed
  * @return 
  */
 function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('displaygroup_form_add_url', 'index.php?p=displaygroup&q=AddForm');
     Theme::Set('form_meta', '<input type="hidden" name="p" value="user"><input type="hidden" name="q" value="UserGrid">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     // Button URL's
     Theme::Set('user_form_add_url', 'index.php?p=user&q=DisplayForm');
     Theme::Set('myapplications_form_add_url', 'index.php?p=user&q=MyApplications');
     if (Kit::IsFilterPinned('user', 'Filter')) {
         Theme::Set('filter_pinned', 'checked');
         Theme::Set('filter_username', Session::Get('user', 'filter_username'));
         Theme::Set('filter_usertypeid', Session::Get('user', 'filter_usertypeid'));
     } else {
         Theme::Set('filter_usertypeid', 0);
     }
     // List of Displays this user has permission for
     $usertypes = $this->db->GetArray("SELECT usertypeID, usertype FROM usertype ORDER BY usertype");
     array_unshift($usertypes, array('usertypeID' => 0, 'usertype' => 'All'));
     Theme::Set('usertype_field_list', $usertypes);
     // Render the Theme and output
     Theme::Render('user_page');
 }
Ejemplo n.º 9
0
 /**
  * Display page logic
  */
 function displayPage()
 {
     $db =& $this->db;
     // Default options
     if (Kit::IsFilterPinned('template', 'Filter')) {
         $pinned = 1;
         $name = Session::Get('template', 'filter_name');
         $tags = Session::Get('template', 'filter_tags');
         $showThumbnail = Session::Get('template', 'showThumbnail');
     } else {
         $pinned = 0;
         $name = '';
         $tags = '';
         $showThumbnail = 1;
     }
     $id = uniqid();
     Theme::Set('header_text', __('Templates'));
     Theme::Set('id', $id);
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     Theme::Set('form_meta', '<input type="hidden" name="p" value="template"><input type="hidden" name="q" value="TemplateView">');
     $formFields = array();
     $formFields[] = FormManager::AddText('filter_name', __('Name'), $name, NULL, 'n');
     $formFields[] = FormManager::AddText('filter_tags', __('Tags'), $tags, NULL, 't');
     $formFields[] = FormManager::AddCheckbox('showThumbnail', __('Show Thumbnails'), $showThumbnail, NULL, 't');
     $formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $pinned, NULL, 'k');
     Theme::Set('form_fields', $formFields);
     // Call to render the template
     Theme::Render('grid_render');
 }
Ejemplo n.º 10
0
 function displayPage()
 {
     // Set some information about the form
     Theme::Set('form_id', 'SettingsForm');
     Theme::Set('form_action', 'index.php?p=admin&q=Edit');
     $libraryLimit = Config::GetSetting('LIBRARY_SIZE_LIMIT_KB');
     // Get all of the settings in an array
     $settings = Config::GetAll(NULL, array('userSee' => 1));
     $currentCategory = '';
     $catagories = array();
     $formFields = array();
     // Go through each setting, validate it and add it to the array
     foreach ($settings as $setting) {
         if ($currentCategory != $setting['cat']) {
             $currentCategory = $setting['cat'];
             $catagories[] = array('tabId' => $setting['cat'], 'tabName' => ucfirst($setting['cat']));
         }
         // Are there any options
         $options = NULL;
         if (!empty($setting['options'])) {
             // Change to an id=>value array
             foreach (explode('|', Kit::ValidateParam($setting['options'], _HTMLSTRING)) as $tempOption) {
                 $options[] = array('id' => $tempOption, 'value' => $tempOption);
             }
         }
         // Validate the current setting
         if ($setting['type'] == 'checkbox' && isset($setting['value'])) {
             $validated = $setting['value'];
         } else {
             if (isset($setting['value'])) {
                 $validated = Kit::ValidateParam($setting['value'], $setting['type']);
             } else {
                 $validated = $setting['default'];
             }
         }
         // Time zone type requires special handling.
         if ($setting['fieldType'] == 'timezone') {
             $options = $this->TimeZoneDropDown($validated);
         }
         // Get a list of settings and assign them to the settings field
         $formFields[] = array('name' => $setting['setting'], 'type' => $setting['type'], 'fieldType' => $setting['fieldType'], 'helpText' => $setting['helptext'], 'title' => $setting['title'], 'options' => $options, 'validation' => $setting['validation'], 'value' => $validated, 'enabled' => $setting['userChange'], 'catId' => $setting['cat'], 'cat' => ucfirst($setting['cat']));
     }
     Theme::Set('cats', $catagories);
     Theme::Set('form_fields', $formFields);
     // Provide some bandwidth and library information to the theme.
     // Library Size in Bytes
     $fileSize = $this->db->GetSingleValue('SELECT IFNULL(SUM(FileSize), 0) AS SumSize FROM media', 'SumSize', _INT);
     $limitPcnt = $libraryLimit > 0 ? $fileSize / ($libraryLimit * 1024) * 100 : '';
     Theme::Set('library_info', $this->FormatByteSize($fileSize) . ($libraryLimit > 0 ? sprintf(__(' / %d %% of %s'), $limitPcnt, $this->FormatByteSize($libraryLimit * 1024)) : ''));
     // Monthly bandwidth - optionally tested against limits
     $xmdsLimit = Config::GetSetting('MONTHLY_XMDS_TRANSFER_LIMIT_KB');
     $startOfMonth = strtotime(date('m') . '/01/' . date('Y') . ' 00:00:00');
     $sql = sprintf('SELECT IFNULL(SUM(Size), 0) AS BandwidthUsage FROM `bandwidth` WHERE Month > %d AND Month < %d', $startOfMonth, $startOfMonth + 86400 * 2);
     $bandwidthUsage = $this->db->GetSingleValue($sql, 'BandwidthUsage', _INT);
     $usagePcnt = $xmdsLimit > 0 ? (double) $bandwidthUsage / ($xmdsLimit * 1024) * 100 : '';
     Theme::Set('bandwidth_info', $this->FormatByteSize($bandwidthUsage) . ($xmdsLimit > 0 ? sprintf(__(' / %d %% of %s'), $usagePcnt, $this->FormatByteSize($xmdsLimit * 1024)) : ''));
     // Render the Theme and output
     Theme::Render('settings_page');
 }
Ejemplo n.º 11
0
 function displayPage()
 {
     $db =& $this->db;
     $user =& $this->user;
     $error = Kit::GetParam('ErrorMessage', _SESSION, _HTMLSTRING, __('Unknown Error'));
     Theme::Set('ErrorMessage', $error);
     Theme::Render('error');
 }
Ejemplo n.º 12
0
 function displayPage()
 {
     // Set some information about the form
     Theme::Set('form_id', 'SettingsForm');
     Theme::Set('form_action', 'index.php?p=group&q=Delete');
     Theme::Set('settings_help_button_url', HelpManager::Link('Content', 'Config'));
     Theme::Set('settings_form', $this->display_settings());
     // Render the Theme and output
     Theme::Render('settings_page');
 }
Ejemplo n.º 13
0
 /**
  * Display the module page
  * @return
  */
 function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('form_meta', '<input type="hidden" name="p" value="module"><input type="hidden" name="q" value="Grid">');
     Theme::Set('pager', ResponseManager::Pager($id));
     // Render the Theme and output
     Theme::Render('module_page');
 }
Ejemplo n.º 14
0
 function displayPage()
 {
     $db =& $this->db;
     $user =& $this->user;
     $config = new Config();
     // Configure the theme
     Theme::Set('environment_check', $config->CheckEnvironment());
     Theme::Set('collect_data_url', 'index.php?p=fault&q=CollectData');
     // Render the Theme and output
     Theme::Render('fault_page');
 }
Ejemplo n.º 15
0
 /**
  * No display page functionaility
  * @return
  */
 function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('help_form_add_url', 'index.php?p=help&q=AddForm');
     Theme::Set('form_meta', '<input type="hidden" name="p" value="help"><input type="hidden" name="q" value="Grid">');
     Theme::Set('pager', ResponseManager::Pager($id));
     // Render the Theme and output
     Theme::Render('help_page');
 }
Ejemplo n.º 16
0
 public function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('campaign_form_add_url', 'index.php?p=campaign&q=AddForm');
     Theme::Set('form_meta', '<input type="hidden" name="p" value="campaign"><input type="hidden" name="q" value="Grid">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     // Render the Theme and output
     Theme::Render('campaign_page');
 }
Ejemplo n.º 17
0
 /**
  * No display page functionaility
  * @return
  */
 function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('form_meta', '<input type="hidden" name="p" value="help"><input type="hidden" name="q" value="Grid">');
     Theme::Set('pager', ResponseManager::Pager($id));
     // Call to render the template
     Theme::Set('header_text', __('Help Links'));
     Theme::Set('form_fields', array());
     Theme::Render('grid_render');
 }
Ejemplo n.º 18
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');
 }
Ejemplo n.º 19
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="schedule"><input type="hidden" name="q" value="DisplayList">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     // Render the Theme and output
     Theme::Render('schedule_page');
 }
Ejemplo n.º 20
0
 public function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('form_meta', '<input type="hidden" name="p" value="campaign"><input type="hidden" name="q" value="Grid">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     // Call to render the template
     Theme::Set('header_text', __('Campaigns'));
     Theme::Set('form_fields', array());
     Theme::Render('grid_render');
 }
Ejemplo n.º 21
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');
 }
Ejemplo n.º 22
0
 /**
  * Displays the page logic
  */
 function displayPage()
 {
     $db =& $this->db;
     // Default options
     if (Kit::IsFilterPinned('content', 'Filter')) {
         $filter_pinned = 1;
         $filter_name = Session::Get('content', 'filter_name');
         $filterId = Session::Get('content', 'fiterId');
         $filter_type = Session::Get('content', 'filter_type');
         $filter_retired = Session::Get('content', 'filter_retired');
         $filter_owner = Session::Get('content', 'filter_owner');
         $filter_duration_in_seconds = Session::Get('content', 'filter_duration_in_seconds');
         $showTags = Session::Get('content', 'showTags');
         $filter_showThumbnail = Session::Get('content', 'filter_showThumbnail');
     } else {
         $filter_pinned = 0;
         $filter_name = NULL;
         $filterId = NULL;
         $filter_type = NULL;
         $filter_retired = 0;
         $filter_owner = NULL;
         $filter_duration_in_seconds = 0;
         $filter_showThumbnail = 0;
         $showTags = 0;
     }
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     Theme::Set('form_meta', '<input type="hidden" name="p" value="content"><input type="hidden" name="q" value="LibraryGrid">');
     $formFields = array();
     $formFields[] = FormManager::AddText('filter_name', __('Name'), $filter_name, NULL, 'n');
     $formFields[] = FormManager::AddText('filterId', __('ID'), $filterId, NULL, 'i');
     // Users we have permission to see
     $users = $this->user->userList();
     array_unshift($users, array('userid' => '', 'username' => 'All'));
     $formFields[] = FormManager::AddCombo('filter_owner', __('Owner'), $filter_owner, $users, 'userid', 'username', NULL, 'o');
     $types = $db->GetArray("SELECT Module AS moduleid, Name AS module FROM `module` WHERE RegionSpecific = 0 AND Enabled = 1 ORDER BY 2");
     array_unshift($types, array('moduleid' => '', 'module' => 'All'));
     $formFields[] = FormManager::AddCombo('filter_type', __('Type'), $filter_type, $types, 'moduleid', 'module', NULL, 'y');
     $formFields[] = FormManager::AddCombo('filter_retired', __('Retired'), $filter_retired, array(array('retiredid' => 1, 'retired' => 'Yes'), array('retiredid' => 0, 'retired' => 'No')), 'retiredid', 'retired', NULL, 'r');
     $formFields[] = FormManager::AddCheckbox('filter_duration_in_seconds', __('Duration in Seconds'), $filter_duration_in_seconds, NULL, 's');
     $formFields[] = FormManager::AddCheckbox('showTags', __('Show Tags'), $showTags, NULL, 't');
     $formFields[] = FormManager::AddCheckbox('filter_showThumbnail', __('Show Thumbnails'), $filter_showThumbnail, NULL, 't');
     $formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
     // Call to render the template
     Theme::Set('header_text', __('Library'));
     Theme::Set('form_fields', $formFields);
     Theme::Render('grid_render');
 }
Ejemplo n.º 23
0
 /**
  * Display page logic
  */
 function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('usergroup_form_add_url', 'index.php?p=group&q=GroupForm');
     Theme::Set('form_meta', '<input type="hidden" name="p" value="group"><input type="hidden" name="q" value="Grid">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     // Default options
     if (Kit::IsFilterPinned('usergroup', 'Filter')) {
         Theme::Set('filter_pinned', 'checked');
         Theme::Set('filter_name', Session::Get('usergroup', 'filter_name'));
     }
     // Render the Theme and output
     Theme::Render('usergroup_page');
 }
Ejemplo n.º 24
0
 public function displayPage()
 {
     if (DBVERSION == WEBSITE_VERSION) {
         Theme::Set('message', sprintf(__('Sorry you have arrived at this page in error, please try to navigate away.'), Theme::GetConfig('app_name')));
         Theme::Render('message_box');
         return;
     }
     if ($this->user->usertypeid != 1) {
         // Make sure we actually need to do an upgrade
         Theme::Set('message', sprintf(__('The CMS is temporarily off-line as an upgrade is in progress. Please check with your system administrator for updates or refresh your page in a few minutes.'), Theme::GetConfig('app_name')));
         Theme::Render('message_box');
         return;
     } else {
         // We want a static form (traditional rather than ajax)
         Theme::Set('form_class', 'StaticForm');
         // What step are we on
         $xibo_step = Kit::GetParam('step', _REQUEST, _INT, 1);
         $content = '';
         switch ($xibo_step) {
             case 1:
                 // Checks environment
                 $content = $this->Step1();
                 break;
             case 2:
                 // Collect upgrade details
                 $content = $this->Step2();
                 break;
             case 3:
                 // Execute upgrade
                 try {
                     $content = $this->Step3();
                 } catch (Exception $e) {
                     $this->errorMessage = $e->getMessage();
                     // Reload step 2
                     $content = $this->Step2();
                 }
                 break;
         }
         Theme::Set('step', $xibo_step);
         Theme::Set('page_content', $content);
         Theme::Render('upgrade_page');
     }
 }
Ejemplo n.º 25
0
 /**
  * Stats page
  */
 function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('form_meta', '<input type="hidden" name="p" value="stats"><input type="hidden" name="q" value="StatsGrid">');
     Theme::Set('fromdt', date("Y-m-d", time() - 86400));
     Theme::Set('todt', date("Y-m-d"));
     // List of Displays this user has permission for
     $displays = $this->user->DisplayGroupList(1);
     array_unshift($displays, array('displayid' => 0, 'displaygroup' => 'All'));
     Theme::Set('display_field_list', $displays);
     // List of Media this user has permission for
     $media = $this->user->MediaList();
     array_unshift($media, array('mediaid' => 0, 'media' => 'All'));
     Theme::Set('media_field_list', $media);
     // Render the Theme and output
     Theme::Render('stats_page');
 }
Ejemplo n.º 26
0
 /**
  * Include display page template page based on sub page selected
  * @return
  */
 function displayPage()
 {
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('form_meta', '<input type="hidden" name="p" value="display"><input type="hidden" name="q" value="DisplayGrid">');
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     // Default options
     if (Kit::IsFilterPinned('display', 'DisplayFilter')) {
         $filter_pinned = 1;
         $filter_displaygroup = Session::Get('display', 'filter_displaygroup');
         $filter_display = Session::Get('display', 'filter_display');
         $filterMacAddress = Session::Get('display', 'filterMacAddress');
         $filter_showView = Session::Get('display', 'filter_showView');
         $filterVersion = Session::Get('display', 'filterVersion');
         $filter_autoRefresh = Session::Get('display', 'filter_autoRefresh');
     } else {
         $filter_pinned = 0;
         $filter_displaygroup = NULL;
         $filter_display = NULL;
         $filterMacAddress = NULL;
         $filter_showView = 0;
         $filterVersion = NULL;
         $filter_autoRefresh = 0;
     }
     $formFields = array();
     $formFields[] = FormManager::AddCombo('filter_showView', __('View'), $filter_showView, array(array('key' => 0, 'value' => __('Default')), array('key' => 4, 'value' => __('Default with Description')), array('key' => 1, 'value' => __('Screen shot thumbnails')), array('key' => 2, 'value' => __('Screen shot thumbnails when Logged In')), array('key' => 3, 'value' => __('Extended Display Status'))), 'key', 'value', NULL, 't');
     $formFields[] = FormManager::AddText('filter_display', __('Name'), $filter_display, NULL, 'n');
     $formFields[] = FormManager::AddText('filterMacAddress', __('Mac Address'), $filterMacAddress, NULL, 'm');
     $displayGroups = $this->user->DisplayGroupList(0);
     array_unshift($displayGroups, array('displaygroupid' => '0', 'displaygroup' => 'All'));
     $formFields[] = FormManager::AddCombo('filter_displaygroup', __('Display Group'), $filter_displaygroup, $displayGroups, 'displaygroupid', 'displaygroup', NULL, 'd');
     $formFields[] = FormManager::AddText('filterVersion', __('Version'), $filterVersion, NULL, 'v');
     $formFields[] = FormManager::AddNumber('filter_autoRefresh', __('Auto Refresh'), $filter_autoRefresh, NULL, 'r');
     $formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
     // Call to render the template
     Theme::Set('header_text', __('Displays'));
     Theme::Set('form_fields', $formFields);
     Theme::Render('grid_render');
 }
Ejemplo n.º 27
0
 public function displayPage()
 {
     $db =& $this->db;
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     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($id));
     Theme::Set('truncate_url', 'index.php?p=log&q=TruncateForm');
     // Construct Filter Form
     if (Kit::IsFilterPinned('log', 'Filter')) {
         Theme::Set('filter_pinned', 'checked');
         Theme::Set('filter_type', Session::Get('user', 'filter_type'));
         Theme::Set('filter_page', Session::Get('user', 'filter_page'));
         Theme::Set('filter_function', Session::Get('user', 'filter_function'));
         Theme::Set('filter_display', Session::Get('user', 'filter_display'));
         Theme::Set('filter_fromdt', Session::Get('user', 'filter_fromdt'));
         Theme::Set('filter_seconds', Session::Get('user', 'filter_seconds'));
     } else {
         Theme::Set('filter_type', '0');
         Theme::Set('filter_seconds', 120);
         Theme::Set('filter_page', '0');
         Theme::Set('filter_function', '0');
         Theme::Set('filter_display', 0);
     }
     // Lists
     $types = array(array('typeid' => '0', 'type' => 'All'), array('typeid' => 'audit', 'type' => 'Audit'), array('typeid' => 'error', 'type' => 'Error'));
     Theme::Set('type_field_list', $types);
     $pages = $db->GetArray("SELECT DISTINCT IFNULL(page, '-1') AS pageid, page FROM log ORDER BY 2");
     array_unshift($pages, array('pageid' => '0', 'page' => 'All'));
     Theme::Set('page_field_list', $pages);
     $functions = $db->GetArray("SELECT DISTINCT IFNULL(function, '-1') AS functionid, function FROM log ORDER BY 2");
     array_unshift($functions, array('functionid' => '0', 'function' => 'All'));
     Theme::Set('function_field_list', $functions);
     $displays = $db->GetArray('SELECT displayid, display FROM display WHERE licensed = 1 ORDER BY 2');
     array_unshift($displays, array('displayid' => 0, 'display' => 'All'));
     Theme::Set('display_field_list', $displays);
     // Render the Theme and output
     Theme::Render('log_page');
 }
Ejemplo n.º 28
0
 /**
  * Validate the User is Logged In
  * @param $ajax Object[optional] Indicates if this request came from an AJAX call or otherwise
  */
 function attempt_login($ajax = false)
 {
     $db =& $this->db;
     $userid = Kit::GetParam('userid', _SESSION, _INT);
     // Referring Page is anything after the ?
     $requestUri = rawurlencode(Kit::GetCurrentPage());
     if (!$this->checkforUserid()) {
         // Log out the user
         if ($userid != 0) {
             $db->query(sprintf("UPDATE user SET loggedin = 0 WHERE userid = %d ", $userid));
         }
         // AJAX calls that fail the login test cause a page redirect
         if ($ajax) {
             //create the AJAX request object
             $response = new ResponseManager();
             $response->Login();
             $response->Respond();
         } else {
             Theme::Set('form_meta', '<input type="hidden" name="token" value="' . CreateFormToken() . '" />');
             Theme::Set('form_action', 'index.php?q=login&referingPage=' . $requestUri);
             Theme::Set('about_url', 'index.php?p=index&q=About');
             Theme::Set('source_url', 'https://launchpad.net/xibo/1.6');
             // Message (either from the URL or the session)
             $message = Kit::GetParam('message', _GET, _STRING, Kit::GetParam('message', _SESSION, _STRING, ''));
             Theme::Set('login_message', $message);
             Theme::Render('login_page');
             // Clear the session message
             $_SESSION['message'] = '';
             exit;
         }
         return false;
     } else {
         //write out to the db that the logged in user has accessed the page still
         $SQL = sprintf("UPDATE user SET lastaccessed = '" . date("Y-m-d H:i:s") . "', loggedin = 1 WHERE userid = %d ", $userid);
         $results = $db->query($SQL) or trigger_error("Can not write last accessed info.", E_USER_ERROR);
         // Load the information about this user
         $this->LoginServices($userid);
         return true;
     }
 }
Ejemplo n.º 29
0
 /**
  * Display page logic
  */
 function displayPage()
 {
     $db =& $this->db;
     // Default options
     if (Kit::IsFilterPinned('template', 'Filter')) {
         Theme::Set('filter_pinned', 'checked');
         Theme::Set('filter_name', Session::Get('template', 'filter_name'));
         Theme::Set('filter_tags', Session::Get('template', 'filter_tags'));
         Theme::Set('filter_is_system', Session::Get('template', 'filter_is_system'));
     } else {
         Theme::Set('filter_is_system', -1);
     }
     $id = uniqid();
     Theme::Set('id', $id);
     Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
     Theme::Set('pager', ResponseManager::Pager($id));
     Theme::Set('form_meta', '<input type="hidden" name="p" value="template"><input type="hidden" name="q" value="TemplateView">');
     // Field list for a "retired" dropdown list
     Theme::Set('is_system_field_list', array(array('is_systemid' => -1, 'is_system' => 'All'), array('is_systemid' => 1, 'is_system' => 'Yes'), array('is_systemid' => 0, 'is_system' => 'No')));
     // Call to render the template
     Theme::Render('template_page');
 }
Ejemplo n.º 30
0
 public function displayPage()
 {
     $subpage = Kit::GetParam('sp', _GET, _WORD, '');
     // Configure the theme
     $id = uniqid();
     Theme::Set('id', $id);
     // Different pages for data entry and admin
     if ($subpage == 'DataEntry') {
         $dataSetId = Kit::GetParam('datasetid', _GET, _INT);
         $dataSet = Kit::GetParam('dataset', _GET, _STRING);
         Theme::Set('form_meta', '<input type="hidden" name="p" value="dataset"><input type="hidden" name="q" value="DataSetDataForm"><input type="hidden" name="datasetid" value="' . $dataSetId . '"><input type="hidden" name="dataset" value="' . $dataSet . '">');
         Theme::Render('dataset_dataentry_page');
     } else {
         $id = uniqid();
         Theme::Set('id', $id);
         Theme::Set('dataset_form_add_url', 'index.php?p=dataset&q=AddDataSetForm');
         Theme::Set('form_meta', '<input type="hidden" name="p" value="dataset"><input type="hidden" name="q" value="DataSetGrid">');
         Theme::Set('pager', ResponseManager::Pager($id));
         // Render the Theme and output
         Theme::Render('dataset_page');
     }
 }