<?php  
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: PUT, GET, POST");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); 
?>
<!-- Footer -->
    <footer class="footer">
      <div class="container">
        <!-- Footer Join -->
        <div class="footer-join aos" data-aos="fade-up">
          <h2>We Welcome Your Passion And Expertise</h2>
          <p class="sub-title">Join our empowering sports community today and grow with us.</p>
          <a href="#" class="btn btn-primary"><i class="feather-user-plus"></i> Join With Us</a>
        </div>
        <!-- /Footer Join -->
      
        <!-- Footer Top -->
        <div class="footer-top">
          <div class="row">
            <div class="col-lg-4 col-md-6">
              <!-- Footer Widget -->
              <div class="footer-widget footer-menu">
                <h4 class="footer-title">Contact us</h4>
                <div class="footer-address-blk">
                  <div class="footer-call">
                    <span>Call Us</span>
                    <p>+91-62904-66302</p>
                  </div>
                  <div class="footer-call">
                    <span>Need Live Suppot</span>
                    <p><a href="#" class="__cf_email__">info@topturfarena.com</a></p>
                  </div>
                </div>
                <div class="social-icon">
                  <ul>
                    <li>
                      <a href="javascript:void(0);" class="facebook" ><i class="fab fa-facebook-f"></i> </a>
                    </li>
                    <li>
                      <a href="javascript:void(0);" class="twitter" ><i class="fab fa-twitter"></i> </a>
                    </li>
                    <li>
                      <a href="javascript:void(0);" class="instagram" ><i class="fab fa-instagram"></i></a>
                    </li>
                    <li>
                      <a href="javascript:void(0);" class="linked-in" ><i class="fab fa-linkedin-in"></i></a>
                    </li>
                  </ul>
                </div>
              </div>
              <!-- /Footer Widget -->
            </div>
            <div class="col-lg-4 col-md-6">
              <!-- Footer Widget -->
              <div class="footer-widget footer-menu">
                <h4 class="footer-title">Policy</h4>
                <ul>
                  <li><a href="<?php echo base_url(); ?>terms/">Terms & Condition</a></li>
                  <li><a href="<?php echo base_url(); ?>cancellation_policy/">Cancellation Policy</a></li>
                  <li><a href="<?php echo base_url(); ?>refund_policy/">Refund Policy</a></li>
                  <li><a href="<?php echo base_url(); ?>privacy_policy/">Privacy Policy</a></li>
                </ul>
              </div>
              <!-- /Footer Widget -->
            </div>
            <div class="col-lg-4 col-md-6">
              <!-- Footer Widget -->
              <div class="footer-widget footer-menu">
                <h4 class="footer-title">Book Your Games</h4>
                <ul>
                  <li><a href="#">Pickleball</a></li>
                  <li><a href="#">Turf Football</a></li>
                  <li><a href="#">Turf Cricket</a></li>
                </ul>
              </div>
              <!-- /Footer Widget -->
            </div>
          </div>
        </div>
        <!-- /Footer Top -->
      </div>
      
      <!-- Footer Bottom -->
      <div class="footer-bottom">
        <div class="container">
          <!-- Copyright -->
          <div class="copyright">
            <div class="row align-items-center">
              <div class="col-md-12" align="center">
                <div class="copyright-text text-center">
                  <p class="mb-0">&copy; 2025 Top Turf Arena  - All rights reserved.</p>
                </div>
              </div>
            </div>
          </div>
          <!-- /Copyright -->
        </div>
      </div>
      <!-- /Footer Bottom -->
      
    </footer>
    <!-- /Footer -->

  </div>
  <!-- /Main Wrapper -->

  <!-- scrollToTop start -->
  <div class="progress-wrap active-progress">
    <svg class="progress-circle svg-content" width="100%" height="100%" viewBox="-1 -1 102 102">
    <path d="M50,1 a49,49 0 0,1 0,98 a49,49 0 0,1 0,-98" style="transition: stroke-dashoffset 10ms linear 0s; stroke-dasharray: 307.919px, 307.919px; stroke-dashoffset: 228.265px;"></path>
    </svg>
  </div>
  <!-- scrollToTop end -->


<!-- upcoming Modal -->
    <div class="modal custom-modal fade request-modal" id="upcoming-court" role="dialog">
      <div class="modal-dialog modal-dialog-centered modal-md">
        <div class="modal-content">
          <div class="modal-header">
            <div class="form-header modal-header-title">
              <h4 class="mb-0">Sign In<span class="badge bg-info ms-2">Login</span></h4>
            </div>
            <a  class="close" data-bs-dismiss="modal" aria-label="Close">
              <span class="align-center" aria-hidden="true"><i class="feather-x"></i></span>
            </a>
          </div>
          <div class="modal-body" style="padding: 0;">
            <!-- Page Content -->
    <div class="authendication-pages">
    <div class="content">
      <div class="container wrapper no-padding">
        <div class="row no-margin vph-80">
          <div class="col-12 col-sm-12 col-lg-6 no-padding">
            <div class="banner-bg login">
              <div class="row no-margin h-100">
                <div class="col-sm-10 col-md-10 col-lg-10 mx-auto">
                  <div class="h-100 d-flex justify-content-center align-items-center">
                    <div class="text-bg register text-center">
                      <button type="button" class="btn btn-limegreen text-capitalize"><i class="fa-solid fa-thumbs-up me-3"></i>Login Players</button>
                      <p>Log in right away for our advanced sports</p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="col-12 col-sm-12  col-lg-6 no-padding">
            <div class="dull-pg">
              <div class="row no-margin vph-80 d-flex align-items-center justify-content-center">
                <div class="col-sm-10 col-md-10 col-lg-10 mx-auto">
                  <div class="shadow-card">
                    <h2>Welcome Back</h2>
                    <p>Login into your account</p>
                    <div class="alert alert-success LoginSuccMsg" style="display: none;">
                      <strong>Authentication Successful!</strong>
                    </div>
                   <div class="alert alert-danger LoginFailedMsg" style="display: none;">
                      <strong> Please Enter Correct Email or Password!</strong>
                    </div>
                    <div class="tab-content" id="myTabContent">
                      <div class="tab-pane fade show active" id="user" role="tabpanel" aria-labelledby="user-tab">
                        <!-- Login Form -->
                        <form method="post" id="LoginForm">
                            <div class="form-group">
                              <div class="group-img">
                              <i class="feather-user"></i>
                              <input type="text" name="username" id="username" class="form-control" placeholder="Your Email/Mobile" required>
                            </div>
                          </div>
                          <div class="form-group">
                            <div class="pass-group group-img">
                              <i class="toggle-password feather-eye-off"></i>
                              <input type="password" class="form-control pass-input" name="password" id="password" placeholder="Password" required="">
                            </div>
                          </div>
                          <button class="btn btn-secondary register-btn d-inline-flex justify-content-center align-items-center w-100 btn-block login_button" type="submit">Sign In<i class="feather-arrow-right-circle ms-2"></i></button>              
                        </form>
                        <!-- /Login Form -->
                      </div>
                    </div>
                  </div>
                  <div class="bottom-text text-center">
                    <p>Don’t have an account? <a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#cancel-court">Sign up!</a></p>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    </div>
    <!-- /Page Content -->
          </div>
        </div>
      </div>
    </div>
    <!-- /login Modal -->





<!-- register Modal -->
    <div class="modal custom-modal fade request-modal" id="cancel-court" role="dialog">
      <div class="modal-dialog modal-dialog-centered modal-md">
        <div class="modal-content">
          <div class="modal-header">
            <div class="form-header modal-header-title">
              <h4 class="mb-0">Sign Up<span class="badge bg-danger ms-2">Register</span></h4>
            </div>
            <a  class="close" data-bs-dismiss="modal" aria-label="Close">
              <span class="align-center" aria-hidden="true"><i class="feather-x"></i></span>
            </a>
          </div>
          <div class="modal-body" style="padding:0;">
          <div class="authendication-pages">
<!-- Page Content -->
    <div class="content">
      <div class="container wrapper no-padding">
        <div class="row no-margin vph-100">
          <div class="col-12 col-sm-12 col-md-12 col-lg-6 no-padding">
            <div class="banner-bg register">
              <div class="row no-margin h-100">
                <div class="col-sm-10 col-md-10 col-lg-10 mx-auto">
                  <div class="h-100 d-flex justify-content-center align-items-center">
                    <div class="text-bg register text-center">
                      <button type="button" class="btn btn-limegreen text-capitalize"><i class="fa-solid fa-thumbs-up me-3"></i>register Now</button>
                      <p>Register now for our innovative sports</p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="col-12 col-sm-12 col-md-12 col-lg-6 no-padding">
            <div class="dull-pg">
              <div class="row no-margin vph-100 d-flex align-items-center justify-content-center">
                <div class="col-sm-12 col-md-12 col-lg-12">
                  <div class="shadow-card">
                    <h2>Get Started With Top Turf Arena</h2>
                    <p>Ignite your sports journey with Top Turf Arena and get started now.
                    </p>
                    <div class="alert alert-success SuccMsg" style="display: none;">
                      <strong>Successfully Registered!</strong>
                    </div>
                    <div class="alert alert-danger WorningMsg" style="display: none;">
                      <strong>This Email ID Already Exists!</strong>
                    </div>
                    <div class="tab-content" id="myTabContent">
                      <div class="tab-pane fade show active" id="user" role="tabpanel" aria-labelledby="user-tab">
                        <!-- Register Form -->
                        <form id="register_form" method="post">
                          <div class="row">
                            <div class="col-sm-6 col-md-6 col-lg-6">
                                <div class="form-group">
                                  <div class="group-img">
                                  <i class="feather-user"></i>
                                  <input type="text" name="name" class="form-control" placeholder="Full Name" required>
                                </div>
                              </div>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-6">
                                <div class="form-group">
                                  <div class="group-img">
                                  <i class="feather-mobile"></i>
                                  <input type="tel" name="r_mobile" class="form-control" placeholder="Mobile No." required>
                                </div>
                              </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-12">
                              <div class="form-group">
                                  <div class="group-img">
                                  <i class="feather-mail"></i>
                                  <input type="email" name="r_email" class="form-control" placeholder="Email" required>
                                </div>
                              </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-12">
                              <div class="form-group">
                                  <div class="group-img">
                                  <textarea class="form-control" name="address" required placeholder="Full Address"></textarea>
                                </div>
                              </div>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-6">
                              <div class="form-group">
                                <div class="pass-group group-img">
                                  <i class="toggle-password feather-eye-off"></i>
                                  <input type="password" name="r_password" id="r_password" class="form-control pass-input" placeholder="Password" required>
                                </div>
                              </div>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-6">
                              <div class="form-group">
                                <div class="pass-group group-img">
                                  <i class="toggle-password-confirm feather-eye-off"></i>
                                  <input type="password" name="confirm_password" class="form-control pass-confirm" placeholder="Confirm Password" required>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="form-check d-flex justify-content-start align-items-center policy">
                            <div class="d-inline-block">
                              <input class="form-check-input" type="checkbox" value="" id="policy">
                            </div>
                            <label class="form-check-label" for="policy">By continuing you indicate that you read and agreed to the <a href="#">Terms of Use</a></label>
                          </div>
                          <button class="btn btn-secondary register-btn d-inline-flex justify-content-center align-items-center w-100 btn-block" type="submit">Create Account<i class="feather-arrow-right-circle ms-2"></i></button>
                                        
                        </form>
                        <!-- /Register Form -->
                      </div>
                    </div>
                  </div>
                  <div class="bottom-text text-center">
                    <p>Have an account? <a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#upcoming-court">Sign In!</a></p>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- /Page Content -->
            
          </div>
          </div>
        </div>
      </div>
    </div>
    <!-- /cancel Modal -->
<script src="<?php echo base_url(); ?>assets/js/jquery-3.4.1.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/jquery.validate.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/additional-methods.min.js"></script>


<!--////////////////////////////////////////// Login ////////////////////////////////////////-->
<script type="text/javascript">
jQuery.validator.setDefaults({
success: "valid"
});
$( "#LoginForm" ).validate({
rules: {

username: {
required: true
},
password: {
required: true
}
}
});
$(document).ready(function(e){
$("#LoginForm").on('submit', function(e){
e.preventDefault();
var formStatus = $('#LoginForm').validate().form();
if(true == formStatus){
$.ajax({
type: 'POST',
url: '<?php echo base_url(); ?>login/verify/',
data: new FormData(this),
contentType: false,
cache: false,
processData:false,
beforeSend: function(){
$('.login_button').attr("disabled","disabled");
$('#LoginForm').css("opacity",".5");
},
success: function(msg){
if(msg=='failed'){
$(".LoginFailedMsg").show();
$('.LoginFailedMsg').delay(5000).hide(500);
$('#LoginForm').css("opacity","");
$(".login_button").removeAttr("disabled");
}
else{
$(".LoginSuccMsg").show();
$('.LoginSuccMsg').delay(2000).hide(200);
$('#LoginForm').css("opacity","");
$(".login_button").removeAttr("disabled");

setTimeout(function(){ location.reload(); }, 3000);

}
}
});
}
});
});
    </script>
    <!-- ////////////////////////////////////////////// Register ///////////////////////////// -->
<script>
jQuery.validator.setDefaults({
success: "valid"
});
$( "#register_form" ).validate({
rules: {
r_email: {
     required: true,
     email: true
   },
r_password : {
        minlength : 5
    },
    confirm_password : {
        minlength : 5,
        equalTo : "#r_password"
    }
}
});
</script>

<script type="text/javascript">
    $(document).ready(function(e){
    $("#register_form").on('submit', function(e){
        e.preventDefault();
        var formStatus = $('#register_form').validate().form();
        if(true == formStatus){
        $.ajax({
            type: 'POST',
            url: '<?php echo base_url(); ?>login/register_save/',
            data: new FormData(this),
            contentType: false,
            cache: false,
            processData:false,
            beforeSend: function(){
                $('.register_button').attr("disabled","disabled");
                $('#register_form').css("opacity",".5");
            },
            success: function(msg){
               if(msg=='success'){
                $(".SuccMsg").show();
               $('.SuccMsg').delay(2000).hide(200);
               $('#loginID').empty().load(window.location.href + ' #loginID');
               $('#register_form').css("opacity","");
               $(".register_button").removeAttr("disabled");
               setInterval(function(){ 
                location.reload();
                }, 2000);
               }
               else{
                $(".WorningMsg").show();
               $('.WorningMsg').delay(5000).hide(500);
               $('#register_form').css("opacity","");
               $(".register_button").removeAttr("disabled");
               }
            }
        });
    }
    });
});
</script>

  <!-- jQuery -->
 <!-- <script src="<?php echo base_url(); ?>assets/js/jquery-3.7.1.min.js" type="ed01cc82b2a0364b0d3dade5-text/javascript"></script> -->

  <!-- Bootstrap Core JS -->
  <script src="<?php echo base_url(); ?>assets/js/bootstrap.bundle.min.js" type="ed01cc82b2a0364b0d3dade5-text/javascript"></script>

  <!-- Select JS -->
  <script src="<?php echo base_url(); ?>assets/plugins/select2/js/select2.min.js" type="ed01cc82b2a0364b0d3dade5-text/javascript"></script>

  <!-- Owl Carousel JS -->
  <script src="<?php echo base_url(); ?>assets/plugins/owl-carousel/owl.carousel.min.js" type="ed01cc82b2a0364b0d3dade5-text/javascript"></script>

  <!-- Aos -->
  <script src="<?php echo base_url(); ?>assets/plugins/aos/aos.js" type="ed01cc82b2a0364b0d3dade5-text/javascript"></script>

  <!-- Counterup JS -->
  <script src="<?php echo base_url(); ?>assets/js/jquery.waypoints.js" type="ed01cc82b2a0364b0d3dade5-text/javascript"></script>
  <script src="<?php echo base_url(); ?>assets/js/jquery.counterup.min.js" type="ed01cc82b2a0364b0d3dade5-text/javascript"></script>

  <!-- Top JS -->
  <script src="<?php echo base_url(); ?>assets/js/backToTop.js" type="ed01cc82b2a0364b0d3dade5-text/javascript"></script>

  <!-- Masonry JS -->
  <script src="<?php echo base_url(); ?>assets/js/isotope-docs.min.js" type="68f6e4a04310ba1ebc264028-text/javascript"></script>

  <!-- Fancybox JS -->
  <script src="<?php echo base_url(); ?>assets/js/jquery.fancybox.min.js" type="68f6e4a04310ba1ebc264028-text/javascript"></script>
  <!-- Custom JS -->
  <script src="<?php echo base_url(); ?>assets/js/script.js" type="ed01cc82b2a0364b0d3dade5-text/javascript"></script>
  <script src="<?php echo base_url(); ?>assets/js/rocket-loader.min.js" data-cf-settings="ed01cc82b2a0364b0d3dade5-|49" defer></script>
  <script src="https://code.jquery.com/ui/1.14.1/jquery-ui.js"></script>
<script>
  $( function() {
$("#booking_date").datepicker({
        dateFormat: "yy-mm-dd",   // matches MySQL date format
        minDate: 0,               // disable all past dates
        maxDate: "+365D",         // optional: allow booking only up to 1 year ahead
        showAnim: "slideDown",     // optional animation
        onSelect: function(dateText, inst) {
        loadSlots();  // refresh slots immediately after date pick
    }
    });
  } );
  </script>

  <script>
// just for the demos, avoids form submit
jQuery.validator.setDefaults({
success: "valid"
});
$( "#prfileFormD" ).validate({
rules: {
// email: {
//      required: true,
//      email: true
//    }
}
});
</script>
<script type="text/javascript">
    $(document).ready(function(e){
    $("#prfileFormD").on('submit', function(e){
        e.preventDefault();
        var formStatus = $('#prfileFormD').validate().form();
        if(true == formStatus){
        $.ajax({
            type: 'POST',
            url: '<?php echo base_url(); ?>user/addressupdate/',
            data: new FormData(this),
            contentType: false,
            cache: false,
            processData:false,
            beforeSend: function(){
                $('#prfileFormD').css("opacity",".5");
            },
            success: function(msg){
                $(".SuccMsg").show();
               $('.SuccMsg').delay(2000).hide(200);
               $('#prfileFormD').css("opacity","");
               setInterval(function(){ 
                location.reload();
                }, 2000);
            }
        });
    }
    });
});
</script>

<script>
jQuery.validator.setDefaults({
success: "valid"
});
$( "#PassForm" ).validate({
rules: {
u_password : {
        minlength : 5
    },
    u_cpassword : {
        minlength : 5,
        equalTo : "#u_password"
    }
}
});
</script>

<script type="text/javascript">
    $(document).ready(function(e){
    $("#PassForm").on('submit', function(e){
        e.preventDefault();
        var formStatus = $('#PassForm').validate().form();
        if(true == formStatus){
        $.ajax({
            type: 'POST',
            url: '<?php echo base_url(); ?>user/securityupd/',
            data: new FormData(this),
            contentType: false,
            cache: false,
            processData:false,
            beforeSend: function(){
                $('#PassForm').css("opacity",".5");
                $('.WorningPMsg').hide();
            },
            success: function(msg){
               if(msg=='success'){
                $(".SuccPMsg").show();
               $('.SuccPMsg').delay(2000).hide(200);
               $('#loginID').empty().load(window.location.href + ' #loginID');
               $('#PassForm').css("opacity","");
               setInterval(function(){ 
                location.reload();
                }, 2000);
               }
               else{
                $(".WorningPMsg").show();
               $('#PassForm').css("opacity","");
               }
            }
        });
    }
    });
});
</script>
</body>

</html>
