Пример #1
0
    if (isset($known_good_modules[$name]) && isset($known_good_modules[$name]['description'])) {
        $name = $known_good_modules[$name]['description'];
    }
    echo '<tr>';
    printf('<td style="width: 40%%;"><b>Device</b>: %s</td>', $name);
    printf('<input type="hidden" name="entryID[]" value="%d" />', $i);
    echo '<td><b>Port</b>: <select name="port[]" title="Stored in ini.json">';
    if (isset($known_good_modules[$port['module']])) {
        foreach (expand_port_list($known_good_modules[$port['module']]['common-ports']) as $k => $v) {
            printf('<option %s value="%s">%s</option>', $port['port'] == $k ? 'selected' : '', $k, $v);
        }
    } else {
        echo '<option>' . $port['port'] . '</option>';
    }
    echo '</select></td>';
    printf('<td><label>Delete entry <input type="checkbox" name="delete[]" value="%d" /></label></td>', $i);
    echo '</tr>';
    $i++;
}
$json['NewMagellanPorts'] = $valid;
InstallUtilities::jsonConfSave('NewMagellanPorts', $json['NewMagellanPorts']);
?>
<tr>
    <td colspan=3 class="tblHeader">&nbsp;</td>
</tr>
</table>
<input type="submit" value="Save Changes" />
</form>
</body>
</html>