<!doctype html>
<html>
    <head>
        <title>Update</title>
        <link rel="stylesheet" type="text/css" href="style.css"/>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script type="text/javascript" src="api.js"></script>
    </head>
    <body>
        <div class="topnav">
            <a href="/" class="title">AhoyDTU</a>
            <a href="javascript:void(0);" class="icon" onclick="topnav()">
                <span></span>
                <span></span>
                <span></span>
            </a>
            <div id="topnav" class="hide"></div>
        </div>
        <div id="wrapper">
            <div id="content">
                <div>
                    Make sure that you have noted all your settings before starting an update. New versions may have changed their memory layout which can break your existing settings.<br/>
                    <br/>
                    <a href="/get_setup" target="_blank">Download your settings (JSON file)</a>
                </div>
                <br/><br/>
                <form method="POST" action="/update" enctype="multipart/form-data" accept-charset="utf-8">
                    <input type="file" name="update"><input type="submit" value="Update">
                </form>
            </div>
        </div>
        <div id="footer">
            <div class="left">
                <a href="https://ahoydtu.de" target="_blank">AhoyDTU &copy 2022</a>
                <ul>
                    <li><a href="https://discord.gg/WzhxEY62mB" target="_blank">Discord</a></li>
                    <li><a href="https://github.com/lumapu/ahoy" target="_blank">Github</a></li>
                </ul>
            </div>
            <div class="right">
                <span id="version"></span><br/><br/>
                <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/de" target="_blank" >CC BY-NC-SA 3.0</a>
            </div>
        </div>
        <script type="text/javascript">
            function parseSys(obj) {
                parseVersion(obj);
            }

            function parse(obj) {
                if(null != obj) {
                    parseMenu(obj["menu"]);
                    parseSys(obj["system"]);
                }
            }

            getAjax("/api/index", parse);
        </script>
    </body>
</html>