<?php
session_start();
include "control/activity.php";
$dd = new activity();

@$refral = $_REQUEST['refral'];

if($refral == "")
{
   $ref = "T1D7q2773939";
   $btnStatus = null;
}
else{
    $ref = $refral;
    $btnStatus = "disabled";
}



$table = "admin_calculation";
$condition = null;
$getAdminDetails = $dd->single($table,$condition);
$teligram = $getAdminDetails['telegram'];
$loginImg = $getAdminDetails['login_img'];
$dashboard_img = $getAdminDetails['dashboard_img'];
$fevicon = $getAdminDetails['favicon'];

?>



<!DOCTYPE html>
<html lang="en" translate="no">
<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/svg+xml" href="temp_img/<?= $fevicon; ?>">
    <meta name="google" content="notranslate">
    <meta name="robots" content="noindex,nofollow">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title><?= $getAdminDetails['title']; ?></title>
    <link rel="stylesheet" href="css/slick.css" />
    <link rel="stylesheet" href="css/modules.css" />
    <link rel="stylesheet" href="css/style.css" />
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/slick.min.js" type="text/javascript"></script>
    <script src="js/main.js" type="text/javascript"></script>
    <style>
        .tab-content{
            width:100%;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="login__container">
            <div class="navbar">
                <div class="navbar-fixed" style="background: var(--themeBlack);">
                    <div class="navbar__content">
                        <div onclick="history.back()"  data-v-905dfe8c="" class="navbar__content-left">
                            <svg xmlns="http://www.w3.org/2000/svg" width="18px" height="18px" viewBox="0 0 24 24"><path fill="var(--mainText)" d="m3.55 12l7.35 7.35q.375.375.363.875t-.388.875t-.875.375t-.875-.375l-7.7-7.675q-.3-.3-.45-.675T.825 12t.15-.75t.45-.675l7.7-7.7q.375-.375.888-.363t.887.388t.375.875t-.375.875z"></path></svg>
                        </div>
                        <div data-v-905dfe8c="" class="navbar__content-center">
                            <div data-v-905dfe8c="" class="headLogo" style="background-image: url(&quot;temp_img/<?= $loginImg; ?>&quot;);"></div>
                            <div data-v-905dfe8c="" class="navbar__content-title">
                        </div>
                        <div data-v-905dfe8c="" class="navbar__content-right"><div data-v-4eb25d27="" data-v-ee3ddeea=""><!----></div></div>
                    </div>
                    </div>
                </div>
            </div>


<script>
    function backByClick()
    {
        window.open('login.php','_self');
    }
</script>



            <div class="login__container-heading">
                <h1 data-v-ee3ddeea="" class="login__container-heading__title">Register</h1>
                <div class="login__container-heading__subTitle">
                    <div data-v-ee3ddeea="">Please register by phone number</div>
                </div>
            </div>

            <div class="login_container-tab tabs">
                <div class="tab tablinks tab-link active" data-tab="tab-1">
                    <div data-v-ee3ddeea="" class="phonebg"></div>
                    <div data-v-ee3ddeea="" class="font30">Register your phone</div>
                </div>

            </div>
            <div class="login__container-form">
                <div class="tabcontent active tab-content activecontent" id="tab-1" >
                        <div class="signIn__container">
                            <div class="field phoneInput__container">
                                <div class="input-label phoneInput__container-label">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="25px" height="25px" viewBox="0 0 48 48"><defs><mask id="ipSPhone0"><g fill="none" stroke-width="4"><path fill="#fff" stroke="#fff" stroke-linejoin="round" d="M8 30h32v12a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2z"></path><path stroke="#fff" stroke-linejoin="round" d="M40 30V6a2 2 0 0 0-2-2H10a2 2 0 0 0-2 2v24"></path><path stroke="#000" stroke-linecap="round" d="M22 37h4"></path></g></mask></defs><path class="color" fill="var(--main-color)" d="M0 0h48v48H0z" mask="url(#ipSPhone0)"></path></svg>
                                    <span data-v-3c9391fd="">Register your Phone number</span>
                                </div>
                                <div class="input_wrapper phoneInput__container-input">
                                    <div class="dropdown">
                                        <div class="dropdown__value"><span data-v-ec99c797="">+91</span></div>
                                    </div>
                                    <input data-v-3c9391fd="" required id="mobileNumber" type="text" name="userNumber" placeholder="Please enter the phone number" autocomplete="off">
                                    <input name="mob" type="hidden" id="mobileNumber"/>
                                </div>
                            </div>
<!-- 
                            <div class="field passwordInput__container">
                                <div class="input-label passwordInput__container-label">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="25px" height="25px" viewBox="0 0 24 24"><path fill="var(--main-color)" fill-rule="evenodd" d="M5.25 10.055V8a6.75 6.75 0 0 1 13.5 0v2.055c1.115.083 1.84.293 2.371.824C22 11.757 22 13.172 22 16c0 2.828 0 4.243-.879 5.121C20.243 22 18.828 22 16 22H8c-2.828 0-4.243 0-5.121-.879C2 20.243 2 18.828 2 16c0-2.828 0-4.243.879-5.121c.53-.531 1.256-.741 2.371-.824M6.75 8a5.25 5.25 0 0 1 10.5 0v2.004C16.867 10 16.451 10 16 10H8c-.452 0-.867 0-1.25.004zM14 16a2 2 0 1 1-4 0a2 2 0 0 1 4 0" clip-rule="evenodd"></path></svg>
                                    <span data-v-b0ac9d23="">OTP (One Time Password)</span>
                                </div>
                                <div class="input_wrapper passwordInput__container-input">
                                    <input data-v-b0ac9d23="" id="getUserOtp" required onKeyup="gettomatchOtp()" name="otp" type="number" placeholder="Please enterVerify OTP" maxlength="15" autocomplete="new-password">
                                    <input id="getfromotp" name="fromOtp" type="hidden"/>
                                    
                                </div>
                            </div> -->

                            <div class="field passwordInput__container">
                                <div class="input-label passwordInput__container-label">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="25px" height="25px" viewBox="0 0 24 24"><path fill="var(--main-color)" fill-rule="evenodd" d="M5.25 10.055V8a6.75 6.75 0 0 1 13.5 0v2.055c1.115.083 1.84.293 2.371.824C22 11.757 22 13.172 22 16c0 2.828 0 4.243-.879 5.121C20.243 22 18.828 22 16 22H8c-2.828 0-4.243 0-5.121-.879C2 20.243 2 18.828 2 16c0-2.828 0-4.243.879-5.121c.53-.531 1.256-.741 2.371-.824M6.75 8a5.25 5.25 0 0 1 10.5 0v2.004C16.867 10 16.451 10 16 10H8c-.452 0-.867 0-1.25.004zM14 16a2 2 0 1 1-4 0a2 2 0 0 1 4 0" clip-rule="evenodd"></path></svg>
                                    <span data-v-b0ac9d23="">Set password</span>
                                </div>
                                <div class="input_wrapper passwordInput__container-input">
                                    <input id="input-password" data-v-b0ac9d23="" required name="password" type="password" placeholder="Please enterSet password" maxlength="15" autocomplete="new-password" autocomplete="off">
                                    <span toggle="#input-password" class="fa fa-fw fa-eye field-icon input-password">
                                        <img data-v-b0ac9d23="" src="images/view-icon.png" class="eye hid_pass">
                                        <img data-v-b0ac9d23="" src="images/eyeVisible-09720f5f.png" class="eye show_pass">
                                    </span>
                                </div>
                            </div>


                            <div class="field passwordInput__container">
                                <div class="input-label passwordInput__container-label">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="25px" height="25px" viewBox="0 0 24 24"><path fill="var(--main-color)" fill-rule="evenodd" d="M5.25 10.055V8a6.75 6.75 0 0 1 13.5 0v2.055c1.115.083 1.84.293 2.371.824C22 11.757 22 13.172 22 16c0 2.828 0 4.243-.879 5.121C20.243 22 18.828 22 16 22H8c-2.828 0-4.243 0-5.121-.879C2 20.243 2 18.828 2 16c0-2.828 0-4.243.879-5.121c.53-.531 1.256-.741 2.371-.824M6.75 8a5.25 5.25 0 0 1 10.5 0v2.004C16.867 10 16.451 10 16 10H8c-.452 0-.867 0-1.25.004zM14 16a2 2 0 1 1-4 0a2 2 0 0 1 4 0" clip-rule="evenodd"></path></svg>
                                    <span data-v-b0ac9d23="">Confirm password</span>
                                </div>
                                <div class="input_wrapper passwordInput__container-input">
                                    <input id="confirm-password" data-v-b0ac9d23="" required name="cpassword" type="password" placeholder="Please enterConfirm password" maxlength="15" autocomplete="new-password" autocomplete="off">
                                    <span toggle="#input-password" class="fa fa-fw fa-eye field-icon input-password">
                                        <img data-v-b0ac9d23="" src="images/view-icon.png" class="eye hid_pass">
                                        <img data-v-b0ac9d23="" src="images/eyeVisible-09720f5f.png" class="eye show_pass">
                                    </span>
                                </div>
                            </div>
                            <div class="register__container-invitation">
                                <div class="input-label passwordInput__container-label">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="25px" height="25px" viewBox="0 0 24 24"><g fill="none"><path d="M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="var(--main-color)" d="M17 3a3 3 0 0 1 2.995 2.824L20 6v4.35l.594-.264c.614-.273 1.322.15 1.4.798L22 11v8a2 2 0 0 1-1.85 1.995L20 21H4a2 2 0 0 1-1.995-1.85L2 19v-8c0-.672.675-1.147 1.297-.955l.11.041l.593.264V6a3 3 0 0 1 2.824-2.995L7 3zm0 2H7a1 1 0 0 0-1 1v5.239l6 2.667l6-2.667V6a1 1 0 0 0-1-1m-5 3a1 1 0 0 1 .117 1.993L12 10h-2a1 1 0 0 1-.117-1.993L10 8z"></path></g></svg>
                                    <span data-v-b0ac9d23="">Invite code</span>
                                </div>
                                <div class="register__container-invitation__input">
                                    <input type="text" <?= $btnStatus; ?>  placeholder="" maxlength="20" value="<?= $ref ?>">
                                    <input id="invideCode" value="<?= $ref ?>" type="hidden" name="invitationcode"/>
                                </div>
                            </div>
                            <div class="field passwordInput__container" style="margin-top:20px;">
                                <!--<div class="input-label passwordInput__container-label">-->
                                <!--    <img data-v-b0ac9d23="" class="passwordInput__container-label__icon" data-origin="images/password.png" src="images/Invite-code.png">-->
                                <!--    <span data-v-b0ac9d23="">Secret Key</span>-->
                                <!--</div>-->
                                <div class="register__container-invitation__input">
                                    <input type="hidden"  placeholder="Please enter secret key" maxlength="20" value="NA" id="secret_key" required>
                                </div>
                                 <span style="font-size: 10px;position: absolute;margin-top: 6px;color:#fff;"><strong style="color:red;font-weight:bold">Note: </strong>Providing a secret key is mandatory for password recovery.</span>
                            </div>
                            <div data-v-97b92f3c="" class="register__container-tips" style="display: none;"><span data-v-97b92f3c="">Entered twice the password does not match!</span></div>
                            <div class="register__container-remember">
                                <label data-v-c16e655a class="van-checkbox" role="checkbox" tabindex="0" aria-checked="false">
                                    <span class="van-checkbox__label">I have read and agree <span data-v-97b92f3c="">【Privacy Agreement】</span></span>
                                    <input required type="checkbox">
                                    <span class="checkmark"></span>
                                </label>
                            </div>
                            <div class="register__container-button">
                                <button name="register" id="btnControl"  onclick="GetRegister()" data-v-97b92f3c="">Register</button>
                                <button onclick="getLoginUrl()" data-v-97b92f3c="" class="login"><div data-v-97b92f3c="" class="account">I have an account</div><div data-v-97b92f3c="" class="loginin">Login</div></button>
                            </div>
                           
                        </div>
                </div>

<script>

   function GetRegister()
   {
      var mobileNumber = document.getElementById('mobileNumber').value;
      var pass = document.getElementById('input-password').value;
      var cpass = document.getElementById('confirm-password').value;
      var code = document.getElementById('invideCode').value;
      var secret_key = document.getElementById('secret_key').value;
 
    if(mobileNumber=="" || pass == "" || cpass=="" || code=="" || secret_key=="")
    {
        alert("Required All fields");
    }
    else{
        if(pass != cpass){
            alert("Confirm password not match..!!");
        }else{
        const xhttp = new XMLHttpRequest();
        xhttp.onload = function() {
        var demo_show = this.responseText;
        console.log(demo_show);
        const myArr = JSON.parse(demo_show);
        if(myArr.status == "success")
        {
            alert(myArr.remark);
            window.open('login.php','_self');
        }
        else{
            alert(myArr.remark);
        }
        }
        xhttp.open("GET", "registeration.php?mobile="+mobileNumber+"&pass="+pass+"&code="+code+"&secret_key="+secret_key);
        xhttp.send();
      } 
    }
   }



   function getLoginUrl()
   {
      window.open("login.php","_self");
   }
</script>


 






                <div class="tabcontent tab-content" id="tab-2">
                        <div class="signIn__container">
                            <div class="field emailinput__container">
                                <div data-v-9ea79214="" class="input-label emailinput__container-label">
                                    <img data-v-9ea79214="" src="./images/emailnumber-c30433b2.png" class="emailinput__container-label__icon"><span data-v-9ea79214="">Register your mail</span>
                                </div>
                                <div class="input_wrapper emailinput__container-input">
                                    <input data-v-9ea79214="" type="text" id="userEmail" name="userEmail" maxlength="250" placeholder="please input your email">
                                </div>
                            </div>
                              <div class="field phoneInput__container">
                                <div class="input-label phoneInput__container-label">
                                    <img data-v-3c9391fd="" src="./images/phone-mob-icon.png" class="phoneInput__container-label__icon" alt="Mobile">
                                    <span data-v-3c9391fd="">Phone number</span>
                                </div>
                                <div class="input_wrapper phoneInput__container-input">
                                    <div class="dropdown">
                                        <div class="dropdown__value"><span data-v-ec99c797="">+91</span></div>
                                    </div>
                                    <input data-v-3c9391fd="" required id="mobileNumber_1" type="text" name="mobileNumber_1" placeholder="Please enter the phone number">
                                    <input name="mob" type="hidden" id="mobileNumber_1"/>
                                </div>
                                <span style="font-size: 10px;position: absolute;margin-top: 6px;"><strong style="color:red;font-weight:bold">Note: </strong>Providing a mobile number is mandatory for password recovery.</span>
                            </div>
                            <div class="field passwordInput__container">
                                <div class="input-label passwordInput__container-label">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="25px" height="25px" viewBox="0 0 24 24"><path fill="var(--main-color)" fill-rule="evenodd" d="M5.25 10.055V8a6.75 6.75 0 0 1 13.5 0v2.055c1.115.083 1.84.293 2.371.824C22 11.757 22 13.172 22 16c0 2.828 0 4.243-.879 5.121C20.243 22 18.828 22 16 22H8c-2.828 0-4.243 0-5.121-.879C2 20.243 2 18.828 2 16c0-2.828 0-4.243.879-5.121c.53-.531 1.256-.741 2.371-.824M6.75 8a5.25 5.25 0 0 1 10.5 0v2.004C16.867 10 16.451 10 16 10H8c-.452 0-.867 0-1.25.004zM14 16a2 2 0 1 1-4 0a2 2 0 0 1 4 0" clip-rule="evenodd"></path></svg>
                                    <span data-v-b0ac9d23="">Set password</span>
                                </div>
                                <div class="input_wrapper passwordInput__container-input">
                                    <input data-v-b0ac9d23="" type="password" placeholder="Please enterSet password" id="set_password_1" maxlength="15" autocomplete="new-password">
                                    <img data-v-b0ac9d23="" src="images/view-icon.png" class="eye">
                                </div>
                            </div>
                            <div class="field passwordInput__container">
                                <div class="input-label passwordInput__container-label">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="25px" height="25px" viewBox="0 0 24 24"><path fill="var(--main-color)" fill-rule="evenodd" d="M5.25 10.055V8a6.75 6.75 0 0 1 13.5 0v2.055c1.115.083 1.84.293 2.371.824C22 11.757 22 13.172 22 16c0 2.828 0 4.243-.879 5.121C20.243 22 18.828 22 16 22H8c-2.828 0-4.243 0-5.121-.879C2 20.243 2 18.828 2 16c0-2.828 0-4.243.879-5.121c.53-.531 1.256-.741 2.371-.824M6.75 8a5.25 5.25 0 0 1 10.5 0v2.004C16.867 10 16.451 10 16 10H8c-.452 0-.867 0-1.25.004zM14 16a2 2 0 1 1-4 0a2 2 0 0 1 4 0" clip-rule="evenodd"></path></svg>
                                    <span data-v-b0ac9d23="">Confirm password</span>
                                </div>
                                <div class="input_wrapper passwordInput__container-input">
                                    <input data-v-b0ac9d23="" type="password" placeholder="Please enterConfirm password" maxlength="15" autocomplete="new-password" id="con_password_1">
                                    <img data-v-b0ac9d23="" src="images/view-icon.png" class="eye">
                                </div>
                            </div>
                            <div class="register__container-invitation">
                                <div class="input-label passwordInput__container-label">
                                    <img data-v-b0ac9d23="" class="passwordInput__container-label__icon" data-origin="images/password.png" src="images/Invite-code.png">
                                    <span data-v-b0ac9d23="">Invite code</span>
                                </div>
                                <div class="register__container-invitation__input">
                                    <input type="text" name="invitationcode" placeholder="" disabled="" id="invitationcode_1" maxlength="20" value="T1D7q2773939">
                                </div>
                            </div>
                               <div class="field passwordInput__container" style="margin-top:20px;">
                                <div class="input-label passwordInput__container-label">
                                    <img data-v-b0ac9d23="" class="passwordInput__container-label__icon" data-origin="images/password.png" src="images/Invite-code.png">
                                    <span data-v-b0ac9d23="">Secret Key</span>
                                </div>
                                <div class="register__container-invitation__input">
                                    <input type="text"  placeholder="Please enter secret key" maxlength="20" id="secret_key_1" required>
                                </div>
                                 <span style="font-size: 10px;position: absolute;margin-top: 6px;"><strong style="color:red;font-weight:bold">Note: </strong>Providing a secret key is mandatory for password recovery.</span>
                            </div>
                            <div data-v-97b92f3c="" class="register__container-tips" style="display: none;"><span data-v-97b92f3c="">Entered twice the password does not match!</span></div>
                            <div class="register__container-remember">
                                <label data-v-c16e655a class="van-checkbox" role="checkbox" tabindex="0" aria-checked="false">
                                    <span class="van-checkbox__label">I have read and agree <span data-v-97b92f3c="">【Privacy Agreement】</span></span>
                                    <input type="checkbox">
                                    <span class="checkmark"></span>
                                </label>
                            </div>
                            <div class="register__container-button">
                                <button data-v-97b92f3c="" onclick="registerWithEmail()">Register</button>
                                <button onclick="getLoginUrl()" data-v-97b92f3c="" class="login"><div data-v-97b92f3c="" class="account">I have an account</div><div data-v-97b92f3c="" class="loginin">Login</div></button>
                            </div>
                           
                        </div>
                    </form>
                </div>
            </div>

<script>

   function registerWithEmail()
   {
      var userEmail = document.getElementById('userEmail').value;
      var mobileNumber = document.getElementById('mobileNumber_1').value;
      var pass = document.getElementById('set_password_1').value;
      var cpass = document.getElementById('con_password_1').value;
      var code = document.getElementById('invitationcode_1').value;
      var secret_key = document.getElementById('secret_key_1').value;
 
    if(userEmail=="" || mobileNumber=="" || pass == "" || cpass=="" || code=="" || secret_key=="")
    {
        alert("Required All fields");
        console.log("hello");
    }
    else{
        if(pass != cpass){
            alert("Confirm password not match..!!");
        }else{
        const xhttp = new XMLHttpRequest();
        xhttp.onload = function() {
        var demo_show = this.responseText;
        console.log(demo_show);
        const myArr = JSON.parse(demo_show);
        if(myArr.status == "success")
        {
            alert(myArr.remark);
            window.open('login.php','_self');
        }
        else{
            alert(myArr.remark);
        }
        }
        xhttp.open("GET", "registerationwithwmailAndsecretKey.php?userEmail="+userEmail+"&mobile="+mobileNumber+"&pass="+pass+"&code="+code+"&secret_key="+secret_key);
        xhttp.send();
      } 
    }
   }

</script>
        </div>
    </div>
</body>

</html>

<script> 
   function getLoginUrl()
   {
      window.open("login.php","_self");
   }

    $(".input-password").click(function() {

    $(this).toggleClass("fa-eye fa-eye-slash");
    var input = $($(this).attr("toggle"));
    if (input.attr("type") == "password") {
    input.attr("type", "text");
    } else {
    input.attr("type", "password");
    }
    });

    $(".confirm-password").click(function() {

        $(this).attr("src", "fa-eye fa-eye-slash");
        var input = $($(this).attr("toggle"));
        if (input.attr("type") == "password") {
        input.attr("type", "text");
        } else {
        input.attr("type", "password");
        }
        });
 
</script>




