<!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">
    <form method="post" action="/delete?t=<%= table %>&d=<%= database %>">
        <table>
            <% for(name in data[0]) { %>
                <th>
                    <%= name %>
                </th>
            <% } %>
            <% for(index in data) { %>
                <tr>
                    <% for(key in data[index]) { %>
                        <td>
                            <div class="wartosc">
                                <%= data[index][key] %>
                            </div>
                        </td>
                    <% } %>
                    <td>
                        <input type="checkbox" name="<%= index %>">
                    </td>
                </tr>
            <% } %>
        </table>
        <input type="submit" value="Insert">
    </form>
    </div>
    <div class="wynik"></div>
    </div>
</body>

</html>