<footer class="footer-bg page-section-1-ptb">
  <div class="container">
    <div class="row">
      <?php 
      use App\Models\CommonModel;
      $common_model = model('CommonModel');
      $site_data = $common_model->GetSettingall('footer');
        


        if($site_data) {
            
            foreach ($site_data as $row) {
                $this->data[$row->site_key] = $row->site_value;
            }

        } else {
            $site_data_default = $common_model->defaultlangSettingall('footer');
            foreach ($site_data_default as $row) {
                $this->data[$row->site_key] = $row->site_value;
            }
        }
        ?>
      <div class="footer-left">
        <?php echo $this->data['footer1']; ?>
        <!--<ul>
          <li><a href="cms/about"> <?php echo lang('language_lang.menu_ex_fabout');?></a> </li>
          <li><a href="cms/terms"><?php echo lang('language_lang.menu_ex_fterm');?> </a></li>
          <li> <a href="cms/privacy"><?php echo lang('language_lang.menu_ex_fprivacy');?> </a> </li>
          <li><a href="fees"><?php echo lang('language_lang.menu_ex_ffees');?> </a></li>
          <li><a href="contact"><?php echo lang('language_lang.menu_ex_fcontact');?></a> </li>
          <li> <a href="faq"> <?php echo lang('language_lang.menu_ex_faq');?></a></li>
          <li> <a href="news"><?php echo lang('language_lang.menu_ex_fnews');?></a> </li>
          <li> <a href="referrence"><?php echo lang('language_lang.menu_ex_fref');?></a> </li>
        </ul>-->
        <span class="text-white" style="background:transparent;color:"><?php echo $this->data['footer_note']; ?> </span>
        </div>
      <div class="footer-right"> 
        <!--<ul>
          <li><a href=""> <i class="fa fa-instagram"></i></a> </li>
          <li><a href=""> <i class="fa fa-facebook"></i></a> </li>
          <li><a href=""> <i class="fa fa-twitter"></i></a> </li>
          <li><a href=""> <i class="fa fa-instagram"></i></a> </li>
          <li><a href=""> <i class="fa fa-github"></i></a> </li>
          <li><a href=""> <i class="fa fa-dribbble"></i></a> </li>
        </ul>-->
        <?php echo $this->data['footer2']; ?>
      </div>
    </div>
  </div>
</footer>
<?php
$db = db_connect();
   $site_det=$db->query("select * from site_controls where settings_name='user' and site_key='changenull'");
   $count=$site_det->getResult();
   if($count[0]->site_value!='1')
   {
        // echo view('user/changenull');
   }
?>
<?php
   $fetch_sitedet=$db->query("select * from site_controls where settings_name='site' and site_key='auto_status'");
   $fetchsite=$fetch_sitedet->getResult();
  
   if($fetchsite[0]->site_value=='on')
   {
        echo view('user/autoassign');
   }
?>


<script src="styles/js/jquery-1.12.2.min.js"></script>

<?php
$router = service('router'); 
if($router->controllerName()=='dashboard')
{
?>
<script type="text/javascript">

jQuery(document).ready(function(){       


$('#head_lang').on('change', function(e)
{
  var str = $("#head_lang").val();
 window.location = 'langs/'+str ; 

});

   var xhr;
    var fn = function(){
        if(xhr && xhr.readyState != 4){
            xhr.abort();
        }
        xhr = $.ajax({
            type: 'post',
            url: "<?php echo base_url()."user/login/result_chk";?>",
            success: function(data) {
             
            }
        });
    };
  var interval = setInterval(fn, 60000);

});

</script>
<?php
}
else
{
  ?>

  <script type="text/javascript">

jQuery(document).ready(function(){       


$('#head_lang').on('change', function(e)
{
  var str = $("#head_lang").val();
 window.location = 'langs/'+str ; 



});

});

</script>

  <?php

}
?>