<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>
        <% title %>
    </title>
    <link rel="stylesheet" href="./styl.css">
    <link rel="stylesheet" href="./light.css">
    <link rel="stylesheet" href="./dark.css">
</head>

<body>
    <!-- Cofanie bo na razie nie zrobione -->
    <script>
        history.back()
    </script>
    <!-- Cofanie bo na razie nie zrobione -->

    <div class="bok"><iframe src="/tables?d=<%= database %>"></iframe></div>
    <div class="prawo">
        <div class="tekst">
    <table>
        <% for(name in data[0]) { %>
            <th>
                <%= name %>
            </th>
            <% } %>
            <% for(element of data) { %>
                <tr>
                    <form method="post" action="/update?d=<%= database %>&t=<%= table %>">
                    <% for(key in element) { %>
                        <td>
                            <input type="text" name="<%= key %>" value="<%= element[key] %>">
                        </td>
                    <% } %>
                    <td>
                        <input type="submit" value="Insert" class="no">
                    </td>
                </tr>
            <% } %>
        </form>
    </table>
</div>
<div class="wynik"></div>
</div>
</body>

</html>