<?php
session_start()
?>
{{--    引入bootstrap-table css樣式與js--}}
<link href="/css/bootstrap-table.css" rel="stylesheet">
<script src="/js/tableExport.min.js"></script>
<script src="/js/bootstrap-table.js"></script>
<script src="/js/bootstrap-table-zh-TW.min.js"></script>
<script src="/js/bootstrap-table-export.min.js"></script>
<style>
    .seeline{
        border: #ffffff 1px solid;
    }
.input{
    border: #2B333F 1px solid;
    background-color: black;
}
    .btn_login{
        border-style: none;
        padding: 5px 10px;
        text-align: center;
        text-decoration: none;
        display: inline-block;
        font-size: 14px;
        color:#ffffff;
        border-radius: 5px;
        margin-top: 20px;
    }
</style>
<title>使用者登入</title>
<body style="background-color: black">
<form id="user_login" name="user_login" method="post" action="{{ route("user_login") }}" >
    {{ csrf_field() }}
    <div  style="width: 100%;height: 100%;padding-top: 15%">
        <div class="align-items-center" align="center" style="width:400px;border-radius: 5px;background-color: #272727;height: 35%;margin: 0 auto;float: none;">
            <div class="header" align="center" style="height: 30%;background-color: #1D1E1F;">
                <label style="font-size:28px;color:#ffffff;text-align:center;line-height:75px;">AI Guardian</label>
            </div>
            <div style="background-color:#272727;margin: 20px 2px 2px 2px" >
                <table>
                    <tbody>
                    @if($auth=1)
                    <tr>
                        <td></td>
                        <td><label for="user_name" id="test" class="col-5" style="color:#ffffff;font-size: 18px;">使用者名稱：</label></td>
                        <td><input class="col-7 input" type="text" id="user_name" name="user_name" style="color: #ffffff;font-size: 18px;" value="{{$uername}}"></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><label for="user_pwd" class="col-3" style="color:#ffffff;font-size: 18px">密碼：</label></td>
                        <td><input class="col-8 input" type="password" id="user_pwd" name="user_pwd" style="color: #ffffff;font-size: 18px;" value="{{$userpwd}}" ></td>
                    </tr>
                    @endif
                    <tr>
                        <td></td>
                        <td></td>
                        <td>
                           <input class="col-8" type="checkbox" id="Auto_live" name="Auto_live" value="right" checked/>
                            <label for="Auto_live" style="color:#ffffff">記住帳號</label>
                        </td>
                    </tr>
                    </tbody>
                </table>

                <input class="col-md-4 btn_login" type="submit" value="登入" style="background-color: #1d68a7;">
                <input class="col-md-4 btn_login" type="reset" value="取消" style="background-color: #2B333F;">
            </div>
        </div>
    </div>
</form>
<input class="col-8 input" type="password" id="user" name="user_pwd" style="color: #ffffff;font-size: 18px;"  >
</body>
@if(isset($error_msg))
    <script>
        alert('{{ $error_msg }}');
    </script>
@endif

{{--
<script>

    $(function () {
        $('#user_name').val({{ $error_msg }});
        $('#user_pwd').val();
        if ($("#Auto_live").attr('checked')){

            alert('e.3');
        }else{
            $('#user_name').val();
            $('#user_pwd').val();
            alert('ao6');
        }
    });
</script>--}}


