<?php
/**
 * @var \yii\web\View $this
 * @var string $redirectUrl
 * @var string $tip
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>BIT System 后台管理平台</title>
    <?= $this->render('/common/css_js_main') ?>
    <script language="javascript">
    $(document).ready(function() {
        function jump(count) {
            window.setTimeout(function(){
                count--;
                if(count > 0) {
                    $('#num').html(count);
                    jump(count);
                } else {
                    
                    <?php if (!empty($redirectUrl)) : ?>
                        window.location.href = '<?= $redirectUrl ?>';
                    <?php else: ?>
                        window.history.back();
                    <?php endif; ?>
                
                }
            }, 1000);
        }
        jump(5);
    });
    </script>
</head>
<body id="main">
<div class="main-nav"> <span class="fn-left">您的操作已成功!</span> <span class="fn-right"><a href="javascript:javascript:history.go(-1);"><i class="icon-chevron-left"></i>返回</a></span>
    <div class="fn-clear"></div>
</div>
<div class="main-content">
    <div class="form-or-table">
        <div class="success-error well">
            <p></p>
            <div class="alert alert-success"> <i class="icon-ok"></i>
                <?= !empty($tip) ? $tip : '您的操作已成功!' ?>
            </div>
            <p> 5秒后自动跳转,当前还剩<span id="num">5</span>秒。<a class="btn btn-primary fn-right" href="javascript:redirectUrl();" onclick="javascript:redirectUrl();">确定</a></p>
            <p class="fn-clear"></p>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
function redirectUrl() {
    <?php if (!empty($redirectUrl)) : ?>
    window.location.href = '<?= $redirectUrl ?>';
    <?php else: ?>
    window.history.back();
    <?php endif; ?>
}
</script>
</html>