   <head>
       <!-- Google tag (gtag.js) -->
       <script async src="https://www.googletagmanager.com/gtag/js?id=G-9C6BXEM9F9"></script>
       <script>
           window.dataLayer = window.dataLayer || [];

           function gtag() {
               dataLayer.push(arguments);
           }
           gtag('js', new Date());

           gtag('config', 'G-9C6BXEM9F9');
       </script>

       <meta charset="utf-8">
       <meta name="viewport" content="width=device-width, initial-scale = 1">
       <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
   </head>


   <!-- Bootstrap 3.3.5 -->
   <link rel="stylesheet" href="<?php echo base_url(); ?>/assets/admin/bootstrap/css/bootstrap.min.css">
   <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css">

   <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css">
   <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/color.css">
   <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/demo/demo.css">
   <link rel="stylesheet" href="<?php echo base_url(); ?>/assets/admin/plugins/Font-Awesome/css/all.min.css">

   <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.min.js"></script>
   <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
   <script src="<?php echo base_url(); ?>/assets/admin/bootstrap/js/bootstrap.min.js"></script>

   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Marcellus&display=swap" rel="stylesheet">

   <body>
       <?php //if(isMobileDev()) echo "HP"; else echo "LAPTOP"; 
        ?>
       <div class="container">
           <img src="/assets/images/<?php echo FLD_APP; ?>/swa_banhub_logo.png" width="100%">

           <div id="awal">
               <center>
                   <img src="/assets/images/<?php echo FLD_APP; ?>/logo_s.png" width="100px"><br />

                   <small><b>PENDAFTARAN MUDIK GRATIS DAN DATABASE MASYARAKAT JAWA TENGAH DI JAKARTA <BR /></b></small>
                   <?php
                    if ($balik == 1) echo '<br/><span id="arusbalik">PENDAFTARAN BALIK RANTAU</span>';
                    //else
                   //if ($balik == 0) echo '<br/><span id="arusbalik">PENDAFTARAN MUDIK</span>';

                    ?>
               </center>
               <center>
                   <span style="font-size:14px;font-weight:bold"><BR />Kesulitan atau ada pertanyaan terkait Mudik Lebaran Gratis hubungi Hotline Badan Penghubung <div >0813-1871-2523</div> (Chat only)
                   <span style="font-size:14px;font-weight:bold"><BR />Kesulitan atau ada pertanyaan terkait Balik Rantau Gratis hubungi Hotline Dinas Perhubungan <div>0811-279-0123</div> (Chat only)<br />
                     
                     Pertanyaan akan dibalas pada jam operasional 08.00 - 16.00 WIB<br></span>
               </center>

               <center>
                   <br /><B><i>Sugeng Rawuh!</i></b>
                   <div style="margin-top:20px"></div>
                   <?php
                    $cm = cek_mulai($balik);
                    if ($cm == 1) { ?>
                       <a href="/swadaftar">
                           <button type=" button" class="btn btn-default" style="font-size:16px;width:250px;background-color:ea3333;color:#fff;border-radius:5px;">MENDAFTAR</button></a>
                       <div style="margin-bottom:5px"></div>
                       <a href="/swastatus/0">
                           <button id="swastatus" type="button" class="btn btn-default" style="font-size:13px;width:250px;background-color:ea3333;color:#fff;border-radius:5px;">CEK STATUS MUDIK LEBARAN GRATIS</button></a>
                           <div style="margin-bottom:5px"></div>
                       <a href="/swastatus/1">
                           <button id="swastatus" type="button" class="btn btn-default" style="font-size:13px;width:250px;background-color:#dcac2d;color:#fff;border-radius:5px;">CEK STATUS BALIK RANTAU GRATIS</button></a>

                   <?php } else if ($cm == 0) {

                        if($balik == 0)
                        echo esc("INFORMASI") . "<BR/><small>" . esc("Pendaftaran Mudik Belum Dimulai ") . "</small>";
                        else 
                        echo esc("INFORMASI") . "<BR/><small>" . esc("Pendaftaran Balik Rantau Gratis Belum Dimulai ") . "</small>";


                        echo '<br/><br/>';
                        echo '<a href="/swastatus/0">
                        <button id="swastatus" type="button" class="btn btn-default" style="font-size:13px;width:250px;background-color:ea3333;color:#fff;border-radius:5px;">CEK STATUS MUDIK LEBARAN GRATIS</button></a>';
                        echo '<div style="margin-bottom:5px"></div>';
                        echo '<a href="/swastatus/1">
                        <button id="swastatus" type="button" class="btn btn-default" style="font-size:13px;width:250px;background-color:dcac2d;color:#fff;border-radius:5px;">CEK STATUS BALIK RANTAU GRATIS</button></a>';

                    } else if ($cm == 2) {
                        echo esc("INFORMASI") . "<BR/><small>" . esc("Pendaftaran Mudik Telah Selesai Karena Kuota Telah Habis ") . "</small>";

                        echo '<br/><br/>';
                        echo '<a href="/swastatus/0">
                        <button id="swastatus" type="button" class="btn btn-default" style="font-size:13px;width:250px;background-color:ea3333;color:#fff;border-radius:5px;">CEK STATUS MUDIK LEBARAN GRATIS</button></a>';
                        echo '<div style="margin-bottom:5px"></div>';
                        echo '<a href="/swastatus/1">
                        <button id="swastatus" type="button" class="btn btn-default" style="font-size:13px;width:250px;background-color:dcac2d;color:#fff;border-radius:5px;">CEK STATUS BALIK RANTAU GRATIS</button></a>';

                    }

                    ?>

               </center>
               <br />

               <?php if (cek_mulai($balik) == 1) { ?>
                   <div class="boxinfo">
                   </div>
               <?php } ?>

               </center>

           </div>


       </div>
   </body>
   <script>
       $(document).ready(function() {
           hitungkuota('<?php echo $balik; ?>');
       });

       function hitungkuota(balik) {
           $.ajax({
               type: 'post',
               url: "/hitungkuota",
               data: {
                   "<?= csrf_token() ?>": "<?= csrf_hash() ?>",
                   "balik": balik
               },
               success: function(data) {
                   var respon = $.parseJSON(data);
                   html = '<table class="table" width="100%">';
                   html += '<tr><th><small>TUJUAN</small></th><th style="text-align:right"><small>SEAT<br/>TERSEDIA</small></th></tr>';

                   $.each(respon.kuota.kuotak, function(index, val) {
                       html += '<tr style="border-bottom:1px solid white;padding:2px"><td>' + val.tujuan + '</td><td align="right"><b>' + (val.kuota - val.daftar) + '</b></td></tr>';
                   });
                //    html += '<hr/>';
                   $('.boxinfo').html(html);
               }

           });

       }
   </script>

   <style>
       body {
           font-family: 'Marcellus', serif;
           font-size: 18px;
           background-color: #B90049 !important;
           /* The image used */
           /* Full height */
           height: 100%;
           /*font-family: 'Titillium Web', sans-serif;*/

           /* Center and scale the image nicely */
           /*  background-position: center;
 
     background-repeat: no-repeat;
    background-size: cover;*/

           background: url("/assets/images/<?php echo FLD_APP; ?>/swa_bg.jpg") no-repeat center center fixed;
           -webkit-background-size: cover;
           -moz-background-size: cover;
           -o-background-size: cover;
           background-size: cover;
           background-image: none;

       }

       @media (max-width: 1000px) {
           body {
               background-image: none;
           }
       }



       .loginft {
           font-size: 10px;
       }

       .card-body {
           padding: 20px;
       }

       .table {
           background-color: #FEA1CD !important;
       }

       .container {
           color: #fff !important;
       }

       #arusbalik {
           color: #000;
           background-color: #DCAC2D;
           font-size: 12px;
           padding: 3px;
           line-height: 24px;
       }
   </style>