<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="full-screen" content="true">
    <meta name="screen-orientation" content="true">
    <meta name="x5-fullscreen" content="true">
    <meta name="360-fullscreen" content="true">
    <meta name="viewport" content="width=device-width,maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="renderer" content="webkit" />
    <title>跳转中...</title>

    <link href="/static/css/lato.css" rel="stylesheet" type="text/css">

    <style>
        html,
        body {
            height: 100%;
        }

        body {
            margin: 0;
            padding: 0;
            width: 100%;
            color: #B0BEC5;
            display: table;
            font-weight: 100;
            font-family: 'Lato';
        }

        .container {
            text-align: center;
            display: table-cell;
            vertical-align: middle;
        }

        .title {
            font-size: 2.2rem;
            margin-bottom: 40px;
        }

        .title .success,
        #href {
            color: #5cb85c;
        }

        .title .error,
        #wait {
            color: #d9534f;
        }

        .content,
        .jump {
            text-align: center;
            display: inline-block;
            font-size: 1.12rem;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="content">
            <div class="title">
                <?php if($code == 1):?>
                <p class="success">
                    <?php echo(strip_tags($msg));?>
                </p>
                <?php else:?>
                <p class="error">
                    <?php echo(strip_tags($msg));?>
                </p>
                <?php endif;?>
            </div>
            <div class="content">
                <p class="detail"></p>
            </div>
            <p class="jump">
                页面自动
                <a id="href" href="<?php echo($url);?>">跳转</a> 等待时间：
                <b id="wait"><?php echo($wait);?></b>
            </p>
        </div>
    </div>
    <script type="text/javascript">
        (function () {
            var wait = document.getElementById('wait'),
                href = document.getElementById('href').href;
            var interval = setInterval(function () {
                var time = --wait.innerHTML;
                if (time <= 0) {
                    location.href = href;
                    clearInterval(interval);
                };
            }, 1000);
        })();
    </script>
</body>

</html>