<!DOCTYPE html>
<html lang="en" class="h-100">



<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Rizwan Associates</title>
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="<?php echo base_url(); ?>assets/logo.png">
   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.card {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  max-width: 430px;
  margin: auto;
  text-align: center;
  font-family: arial;
}

.title {
  color: grey;
  font-size: 18px;
}

button {
  border: none;
  outline: 0;
  display: inline-block;
  padding: 8px;
  color: white;
  background-color: #000;
  text-align: center;
  cursor: pointer;
  width: 100%;
  font-size: 18px;
}

a {
  text-decoration: none;
  font-size: 22px;
  color: black;
}

button:hover, a:hover {
  opacity: 0.7;
}
</style>
 <script src="<?php echo base_url();?>assets/js/jjquery.min.js"></script>

</head>

<body>
   
  <form id="tapin_form" action="" method="">
            <input type="text" name="rfid_dec" id="rfid_dec" maxlength="10" autofocus value="" autocomplete="off" maxlength="10" style="background-color: #ececec; color: #ececec; border-color: #ececec;" />
            <input type="button" value="get content" style="background-color: #ececec; color: #ececec; border-color: #ececec;" id="btn_tapin" />
        </form>
     

        <img src="<?php echo base_url();?>assets/logo.png" style="width:13%;">

            <div class="card card_hide" id="">

              <img src="<?php echo base_url('assets/images/profile/Untitled-1 copy.jpg')?>" alt="John" style="width:100%">
             
            </div>

            <div class="card card_show" >
             
            </div>
       <!--  <span id='ct6' style="background-color: #FFFF00"></span>
  
   -->
  
        <script type="text/javascript">

         function setDefaultScreen(){
            $(".card_hide").show();
            $('.card_show').hide();
            }
       var TimerInterval;
    $('#tapin_form').submit(function(e) {
       
        $(".card_hide").hide();
        // $("#card_show").show();
        e.preventDefault();
        data = $('#tapin_form').serialize();
        var rfid_card = $('#rfid_dec').val();

        $("#rfid_dec").val('');
        $("#rfid_dec").focus();
        if(rfid_card.length == 10){
            $.ajax({
                url: '<?php echo base_url() . "/Admin/staff_atten";?>',
                type: 'POST',
                data: data,
                dataType:'JSON',
                success: function(data) {
                        // $('.card_hide').html('');
                       $('.card_show').show().html(data.html);
                       setTimeout(function() {
                           
                            $('.card_show').hide();
                            $(".card_hide").show();
                       }, 4000);

                        // clearInterval(TimerInterval);
                        // TimerInterval = setInterval(setDefaultScreen, 2000);
                 
                }
            });    
        }
    });


/*function display_ct6() {
    var x = new Date()
var ampm = x.getHours( ) >= 12 ? ' PM' : ' AM';
hours = x.getHours( ) % 12;
hours = hours ? hours : 12;
var x1=x.getMonth() + 1+ "/" + x.getDate() + "/" + x.getFullYear(); 
x1 = x1 + " - " +  hours + ":" +  x.getMinutes() + ":" +  x.getSeconds() + ":" + ampm;
document.getElementById('ct6').innerHTML = x1;
display_c6();
 }
 function display_c6(){
var refresh=1000; // Refresh rate in milli seconds
mytime=setTimeout('display_ct6()',refresh)
}
display_c6()*/
        </script>

 
</body>

</html>
