' . PHP_EOL; //echo '
'; // Pretty inefficient looping everything if section != all, but meh // This is only done on this page, so there is no performance issue for the rest of Observium foreach ($config_subsections as $section => $subdata) { if (isset($config_sections[$section]['edition']) && $config_sections[$section]['edition'] != OBSERVIUM_EDITION) { // Skip sections not allowed for a current Observium edition continue; } echo('
' . PHP_EOL); if ($vars['section'] === 'all' || $vars['section'] === $section) { // When printing all, also print the section name $title = $vars['section'] === 'all' ? $config_sections[$section]['text'] . ' :: ' : ''; foreach ($subdata as $subsection => $vardata) { //echo '
'; //echo '

'.$subsection.'

'; echo generate_box_open(['title' => $title . $subsection, 'header-border' => FALSE, 'box-style' => 'margin-bottom: 30px; margin-top: 10px;', 'title-style' => 'padding: 15px 10px; color: #555; font-size: 21px;', 'title-element' => 'h2']); //echo generate_box_open(array('box-style' => 'margin-bottom: 30px; margin-top: 10px;')); echo '' . PHP_EOL; $cols = [ [NULL, 'class="state-marker"'], //array(NULL, 'style="width: 0px;"'), ['Description', 'style="width: 40%;"'], [NULL, 'style="width: 50px;"'], 'Configuration Value', [NULL, 'style="width: 75px;"'], //array(NULL, 'style="width: 10px;"'), ]; //echo(get_table_header($cols)); foreach ($vardata as $varname => $variable) { print_setting_row($varname, $variable); } echo('
' . PHP_EOL); echo generate_box_close(); } //echo('
' . PHP_EOL); } echo('
' . PHP_EOL); } ?>
'hidden', 'id' => 'requesttoken', 'value' => $_SESSION['requesttoken']]; echo(generate_form_element($item) . PHP_EOL); $item = ['type' => 'submit', 'id' => 'submit', 'name' => 'Save Changes', 'class' => 'btn-primary', 'right' => TRUE, 'icon' => 'icon-ok icon-white', 'value' => 'save']; echo(generate_form_element($item) . PHP_EOL); ?>