query("SELECT * FROM Settings"); // array $settings = array(); while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { // Push row data $settings[] = array( 'Code_Name' => $row['Code_Name'], 'Display_Name' => $row['Display_Name'], 'Description' => $row['Description'], 'Type' => $row['Type'], 'Options' => $row['Options'], 'RegEx' => $row['RegEx'], 'Value' => $row['Value'], 'Group' => $row['Group'] ); } $db->close(); ?>

'.$group.'

'; // populate settings for each group foreach ($settings as $set) { if($set["Group"] == $group) { $html = $html. '
'; $html = $html.'
'.$set['Code_Name'].'
'; $html = $html. '
'; $html = $html.getString ($set['Code_Name'].'_description', $set['Description']); $html = $html. '
'; // render different input types based on the settings type $input = ""; // text - textbox if($set['Type'] == 'text' ) { $input = ''; } // password - hidden text elseif ($set['Type'] == 'password') { $input = ''; } // readonly elseif ($set['Type'] == 'readonly') { $input = ''; } // boolean - checkbox elseif ($set['Type'] == 'boolean') { $checked = ""; if ($set['Value'] == "True") { $checked = "checked";}; $input = ''; } // integer - number input elseif ($set['Type'] == 'integer') { $input = ''; } // selecttext - dropdown elseif ($set['Type'] == 'selecttext') { $input = ''; } // selectinteger - dropdown elseif ($set['Type'] == 'selectinteger') { $input = ''; } // multiselect elseif ($set['Type'] == 'multiselect') { $input = ''; } // multiselect elseif ($set['Type'] == 'subnets') { $input = $input. '
'; // Add interface button $input = $input. '
'; // list all interfaces as options $input = $input.'
'; // Remove all interfaces button $input = $input.'
'; } $html = $html.$input; $html = $html.'
'; } } $html = $html.''; } echo $html; ?>