<?php  
session_start();
$db_host="localhost";
$db_user='root';
$db_pass='';
$db_name='sp';
$conn=mysqli_connect($db_host,$db_user,$db_pass,$db_name);
if (!$conn) {
  echo "Not connect";
}

if (isset($_SESSION['session_id']) && isset($_SESSION['user_id'])) {
  $my_id=$_SESSION['user_id'];
} 
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>Pages / Register - NiceAdmin Bootstrap Template</title>
  <meta content="" name="description">
  <meta content="" name="keywords">

  <!-- Favicons -->
  <link href="../img/logo/logo22222.png" rel="icon"> 

  <!-- Google Fonts -->
  <link href="https://fonts.gstatic.com" rel="preconnect">
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">

  <!-- Vendor CSS Files -->
  <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
  <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="assets/vendor/quill/quill.snow.css" rel="stylesheet">
  <link href="assets/vendor/quill/quill.bubble.css" rel="stylesheet">
  <link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
  <link href="assets/vendor/simple-datatables/style.css" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="assets/css/style.css" rel="stylesheet">

  <!-- =======================================================
  * Template Name: NiceAdmin - v2.3.1
  * Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
  * Author: BootstrapMade.com
  * License: https://bootstrapmade.com/license/
  ======================================================== -->
</head>

<body>

  <main>
      
      
      
      
      
      
      
    <div class="container">

      <section class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center py-4">
        <div class="container">
          <div class="row justify-content-center">
            <div class="col-lg-4 col-md-6 d-flex flex-column align-items-center justify-content-center">

              <div class="d-flex justify-content-center py-4">
                <a href="index.html" class="logo d-flex align-items-center w-auto">
                  <img src="../img/logo/logo22222.png" alt="">
                  <span class="d-none d-lg-block">NiceAdmin</span>
                </a>
              </div><!-- End Logo -->

              <div class="card mb-3">

                <div class="card-body">

                  <div class="pt-4 pb-2">
                    <h5 class="card-title text-center pb-0 fs-4">Create an Account</h5>
                    <p class="text-center small">Enter your personal details to create account</p>
                  </div>

                  <form method="POST" action="element/redirect.php">
                    <div class="form-group">
                                            <label for="inputUserName">Sponsor ID</label>
                                            <input id="inputUserName" name="sponsor_id" type="text" value="<?=isset($_GET['user_id'])?$_GET['user_id']:'' ?>" class="form-control" >
                                        </div>
                                        <div class="form-group">
                                            <label for="inputUserName">PIN</label>
                                            <input id="inputUserName" name="pin" type="text" class="form-control" >
                                        </div>
                                          <div class="form-group">
                                              <label for="inputUserName">Name</label>
                                              <input id="inputUserName" type="text" name="user_name" required="" placeholder="Enter user name" class="form-control" oninput="this.value = this.value.toUpperCase()" pattern="[a-zA-Z\s]+">
                                          </div>
                                          <div class=" form-group btn-group btn-group-toggle" data-toggle="buttons">
                                              <label class="btn btn-primary active">
                                                  <input type="radio" name="position" id="option1" value="0" checked>Left
                                              </label>
                                              <label class="btn btn-primary">
                                                  <input type="radio" name="position" id="option2" value="1" > Right
                                              </label>
                                          </div>
                                          <div class="form-group">
                                              <label for="inputPassword">Mobile No</label>
                                              <input id="inputPassword" type="tel" name="user_mob" placeholder="mobile no" required="" class="form-control" pattern="[0-9]{10}">
                                          </div>
                                          <div class="form-group">
                                              <label for="inputRepeatPassword">Password</label>
                                              <input id="inputRepeatPassword" name="password" data-parsley-equalto="#inputPassword" type="text" required="" placeholder="Password" class="form-control" pattern="[a-zA-Z0-9@]{6,20}">
                                              <p><small>Password length should not less than 6 digit (only Numbers, Alphabet and @ is allowed)</small> </p>
                                          </div>
                                          <div class="row">
                                              <div class="col-sm-6">

                                                   <button type="submit" name="user_registration" class="btn btn-space btn-primary">Submit</button>


                                              </div>
                                          </div>
                    <div class="col-12">
                      <p class="small mb-0">Already have an account? <a href="index.php">Log in</a></p>
                    </div>
                  </form>

                </div>
              </div>

              <div class="credits">
                <!-- All the links in the footer should remain intact. -->
                <!-- You can delete the links only if you purchased the pro version. -->
                <!-- Licensing information: https://bootstrapmade.com/license/ -->
                <!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ -->
                Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a>
              </div>

            </div>
          </div>
        </div>

      </section>

    </div>
  </main><!-- End #main -->

  <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>

  <!-- Vendor JS Files -->
  <script src="assets/vendor/apexcharts/apexcharts.min.js"></script>
  <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="assets/vendor/chart.js/chart.min.js"></script>
  <script src="assets/vendor/echarts/echarts.min.js"></script>
  <script src="assets/vendor/quill/quill.min.js"></script>
  <script src="assets/vendor/simple-datatables/simple-datatables.js"></script>
  <script src="assets/vendor/tinymce/tinymce.min.js"></script>
  <script src="assets/vendor/php-email-form/validate.js"></script>

  <!-- Template Main JS File -->
  <script src="assets/js/main.js"></script>

</body>

</html>