<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
    <div class="page-header">
        <div class="container-fluid">
            <h1><?php echo $heading_title; ?></h1>
            <ul class="breadcrumb">
                <?php foreach ($breadcrumbs as $breadcrumb) { ?>
                    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
                <?php } ?>
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        <div class="panel-body">
            <?php if($check_file){ ?>
                <div class="form-group col-sm-3">
                    <p>Введите код из смс</p>
                    <input type="text"  class="form-control" id="code" value="">
                    <button id="send" class="btn btn-primary">Отправить</button>
                </div>
            <?php } else { ?>
                <h1>Вы авторизированы!</h1>
            <?php }?>
        </div>
    </div>
</div>

<?php echo $footer; ?>
<script type="text/javascript">
$('#send').on('click',function () {
    $.ajax({
            url:'index.php?route=sale/booking_auth/sendCode&token=<?php echo $token; ?>',
            type: 'post',
            data:'code='+$('#code').val(),
             success: function(json) {
				 location.reload();
            }

        });
});
  
</script>

