



         <style>
        .sigin_btn:disabled{
            opacity: .3;
            cursor: default;
        }
        .circle_200{
            width: 350px;
    height: 350px;
    border-radius: 513px;
    opacity: 0.07;
    background: var(--Secondary-Secondary-600, #7901ED);
    filter: blur(50px);
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
}
    </style>
    <main class="main-page-login">
        <svg class="circle_1_svg" width="350" height="350" viewBox="0 0 337 360" fill="none" xmlns="http://www.w3.org/2000/svg">
        <path fill-rule="evenodd" clip-rule="evenodd" d="M437 140.571C437 260.733 339.59 358.143 219.429 358.143C99.2675 358.143 1.85742 260.733 1.85742 140.571C1.85742 20.41 99.2675 -77 219.429 -77C339.59 -77 437 20.41 437 140.571ZM438 140.571C438 261.285 340.143 359.143 219.429 359.143C98.7152 359.143 0.857422 261.285 0.857422 140.571C0.857422 19.8578 98.7152 -78 219.429 -78C340.143 -78 438 19.8578 438 140.571ZM381.558 140.572C381.558 230.113 308.97 302.701 219.429 302.701C129.888 302.701 57.3001 230.113 57.3001 140.572C57.3001 51.0303 129.888 -21.5573 219.429 -21.5573C308.97 -21.5573 381.558 51.0303 381.558 140.572ZM382.558 140.572C382.558 230.665 309.523 303.701 219.429 303.701C129.335 303.701 56.3001 230.665 56.3001 140.572C56.3001 50.478 129.335 -22.5573 219.429 -22.5573C309.523 -22.5573 382.558 50.478 382.558 140.572ZM219.429 236.596C272.462 236.596 315.453 193.604 315.453 140.571C315.453 87.5387 272.462 44.5471 219.429 44.5471C166.396 44.5471 123.405 87.5387 123.405 140.571C123.405 193.604 166.396 236.596 219.429 236.596ZM219.429 237.596C273.014 237.596 316.453 194.157 316.453 140.571C316.453 86.9864 273.014 43.5471 219.429 43.5471C165.844 43.5471 122.405 86.9864 122.405 140.571C122.405 194.157 165.844 237.596 219.429 237.596ZM268.54 140.571C268.54 167.695 246.552 189.683 219.429 189.683C192.305 189.683 170.317 167.695 170.317 140.571C170.317 113.448 192.305 91.46 219.429 91.46C246.552 91.46 268.54 113.448 268.54 140.571ZM269.54 140.571C269.54 168.247 247.105 190.683 219.429 190.683C191.753 190.683 169.317 168.247 169.317 140.571C169.317 112.896 191.753 90.46 219.429 90.46C247.105 90.46 269.54 112.896 269.54 140.571Z" fill="white" fill-opacity="0.5"/>
        </svg>
        
    <svg class="circle_2_svg" width="350" height="350" viewBox="0 0 431 350" fill="none" xmlns="http://www.w3.org/2000/svg">
        <path fill-rule="evenodd" clip-rule="evenodd" d="M430 218.571C430 338.733 332.59 436.143 212.429 436.143C92.2675 436.143 -5.14258 338.733 -5.14258 218.571C-5.14258 98.41 92.2675 1 212.429 1C332.59 1 430 98.41 430 218.571ZM431 218.571C431 339.285 333.143 437.143 212.429 437.143C91.7152 437.143 -6.14258 339.285 -6.14258 218.571C-6.14258 97.8578 91.7152 0 212.429 0C333.143 0 431 97.8578 431 218.571ZM374.558 218.572C374.558 308.113 301.97 380.701 212.429 380.701C122.888 380.701 50.3001 308.113 50.3001 218.572C50.3001 129.03 122.888 56.4427 212.429 56.4427C301.97 56.4427 374.558 129.03 374.558 218.572ZM375.558 218.572C375.558 308.665 302.523 381.701 212.429 381.701C122.335 381.701 49.3001 308.665 49.3001 218.572C49.3001 128.478 122.335 55.4427 212.429 55.4427C302.523 55.4427 375.558 128.478 375.558 218.572ZM212.429 314.596C265.462 314.596 308.453 271.604 308.453 218.571C308.453 165.539 265.462 122.547 212.429 122.547C159.396 122.547 116.405 165.539 116.405 218.571C116.405 271.604 159.396 314.596 212.429 314.596ZM212.429 315.596C266.014 315.596 309.453 272.157 309.453 218.571C309.453 164.986 266.014 121.547 212.429 121.547C158.844 121.547 115.405 164.986 115.405 218.571C115.405 272.157 158.844 315.596 212.429 315.596ZM261.54 218.571C261.54 245.695 239.552 267.683 212.429 267.683C185.305 267.683 163.317 245.695 163.317 218.571C163.317 191.448 185.305 169.46 212.429 169.46C239.552 169.46 261.54 191.448 261.54 218.571ZM262.54 218.571C262.54 246.247 240.105 268.683 212.429 268.683C184.753 268.683 162.317 246.247 162.317 218.571C162.317 190.896 184.753 168.46 212.429 168.46C240.105 168.46 262.54 190.896 262.54 218.571Z" fill="#DEE1ED"/>
        </svg>

                <div class="circle_1"></div>
        <div class="circle_2"></div>
        <div class="circle_200"></div>

        <div class="main-page-login-items" >


            <div class="box_msg-login" style="display: none;">
                <p>
                    نام کاربری یا رمز عبور اشتباه است
                </p>
            </div>


            <div class="login-items-box">
            <a href="https://iraninex.com/en/">
                    <img src="https://iraninex.com/wp-content/uploads/2024/07/logo-1.png" width="195px">
                </a>
                <p>
                   Please complete this form to register on the portal.                  </p>
                <div class="login-form">

                
                    <div class="login-form-input">
                    <input type="text" id= "email" name="email" autocomplete="off" placeholder=" E-mail">
                        <span>
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
                                <path d="M3.02878 8L8.48356 11.645C9.76421 12.4963 10.4045 12.9219 11.0964 13.0873C11.7078 13.2335 12.3451 13.2335 12.9565 13.0873C13.6483 12.9219 14.2887 12.4963 15.5693 11.645L20.9736 8.04005M7.8 19H16.2C17.8802 19 18.7202 19 19.362 18.673C19.9265 18.3854 20.3854 17.9265 20.673 17.362C21 16.7202 21 15.8802 21 14.2V9.8C21 8.11984 21 7.27976 20.673 6.63803C20.3854 6.07354 19.9265 5.6146 19.362 5.32698C18.7202 5 17.8802 5 16.2 5H7.8C6.11984 5 5.27976 5 4.63803 5.32698C4.07354 5.6146 3.6146 6.07354 3.32698 6.63803C3 7.27976 3 8.11984 3 9.8V14.2C3 15.8802 3 16.7202 3.32698 17.362C3.6146 17.9265 4.07354 18.3854 4.63803 18.673C5.27976 19 6.11984 19 7.8 19Z" stroke="#3D79FC" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
                              </svg>
                        </span>
                    </div>

                    <div class="login-form-input">
                        <input id= "password" type="password" name="s" autocomplete="off" placeholder=" password ">
                        <span class= "show-pass">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
                                <path d="M2.99902 3L20.999 21M9.8433 9.91364C9.32066 10.4536 8.99902 11.1892 8.99902 12C8.99902 13.6569 10.3422 15 11.999 15C12.8215 15 13.5667 14.669 14.1086 14.133M6.49902 6.64715C4.59972 7.90034 3.15305 9.78394 2.45703 12C3.73128 16.0571 7.52159 19 11.9992 19C13.9881 19 15.8414 18.4194 17.3988 17.4184M10.999 5.04939C11.328 5.01673 11.6617 5 11.9992 5C16.4769 5 20.2672 7.94291 21.5414 12C21.2607 12.894 20.8577 13.7338 20.3522 14.5" stroke="#3D79FC" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
                              </svg>
                        </span>
                    </div>

                    <div class="login-form-text">

                        <label class="login-form-text-1" for="input-log">
                            <input type="checkbox" id="input-log">
                            <span>
                            Agree to the Terms of Service
                            </span>
                        </label>

                       
                        
                    </div>

                    <div class="login-form-text-signup">
                        <span>
                        Already registered?
                        </span>
                        
                        <a href="https://iraninex.com/en//my-account">
                        Log In
                        </a>
                    </div>

                    <button  type="submit" class="login-btn sigin_btn">
                    Sign Up                    </button>


                </div>
                
            </div>
            <a href="https://iraninex.com/en/" class="linktohome">
            Back to Home Page            </a>
        </div>
  </main>
<script>
const getEmail = document.querySelector("#email");
const getPassWord = document.querySelector("#password");
const btnSubmit = document.querySelector(".sigin_btn");
const errorMsg = document.querySelector(".box_msg-login");
const checkedBox = document.querySelector("#input-log");
const homeUrl= "https://iraninex.com/en//wp-admin/admin-ajax.php";
btnSubmit.addEventListener("click", ()=>{
    if(getEmail.value && getPassWord.value){
    const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
    if(emailPattern.test(getEmail.value)){
        if(checkedBox.checked){
            btnSubmit.setAttribute("disabled", "");
            // fetch
           const userName = getEmail.value.split("@");
           
           
            const data = `action=sigin_ajax&email=${getEmail.value}&pass=${getPassWord.value}&username=${userName[0]}`;
            fetch(homeUrl, {
    method: 'POST',
    headers: {
       "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 
       
    },
    body: data
})
.then((response) => response.text())
      .then((data) => {
        
        if(data.trim() == 400){
            btnSubmit.removeAttribute("disabled");
            errorMsg.style = "";
       errorMsg.children[0].innerHTML = "ایمیل تکراری است";
       setTimeout(() => {
        errorMsg.style = "display : none;";
       }, 3000);
        }
        if(data.trim() == 100){
            
            errorMsg.style = "";
       errorMsg.children[0].innerHTML = "ثبت نام با موفقیت انجام شد در حال انتقال به صفحه ورود";
       setTimeout(() => {
        errorMsg.style = "display : none;";
        localStorage.setItem("email", getEmail.value);
        localStorage.setItem("password", getPassWord.value);
        
        window.location.href= "https://iraninex.com/en//my-account";
       }, 3000);
        }
      
      })
      .catch((error) => {
        errorMsg.style = "";
       errorMsg.children[0].innerHTML = "مشکلی پیش امد لطفا دوباره امتحان کنید";
       setTimeout(() => {
        errorMsg.style = "display : none;";
       }, 3000);
      });




        }
        else{
            errorMsg.style = "";
       errorMsg.children[0].innerHTML = "تایید موافقت با شرایط استفاده از خدمات الزامی است.";
       setTimeout(() => {
        errorMsg.style = "display : none;";
       }, 3000);
        }
    }
    else{
        errorMsg.style = "";
       errorMsg.children[0].innerHTML = "آدرس ایمیل وارد شده نادرست است.";
       setTimeout(() => {
        errorMsg.style = "display : none;";
       }, 3000);
    }

}
    
    else{
       errorMsg.style = "";
       errorMsg.children[0].innerHTML = "پرکردن تمامی موارد اجباریست";
       setTimeout(() => {
        errorMsg.style = "display : none;";
       }, 3000);
    }
});
</script>
 <script>
            const showPass = document.querySelector(".show-pass");
            if(showPass){
                let data = 0;
               
                    const pass = document.querySelector("#password");
                showPass.addEventListener("click", ()=>{
                    if(data == 0){
                    pass.setAttribute("type", "text");
                    data++;
                    }
                    else{
                        pass.setAttribute("type", "password");
                    data--;
                    }
                });
                
                
            }
        </script>
{"id":1942,"date":"2024-08-10T13:44:38","date_gmt":"2024-08-10T10:14:38","guid":{"rendered":"https:\/\/iraninex.com\/sign-up\/"},"modified":"2025-05-21T11:32:29","modified_gmt":"2025-05-21T08:02:29","slug":"sign-up","status":"publish","type":"page","link":"https:\/\/iraninex.com\/en\/sign-up\/","title":{"rendered":"Sign Up"},"content":{"rendered":"\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1942","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/iraninex.com\/en\/wp-json\/wp\/v2\/pages\/1942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iraninex.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/iraninex.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/iraninex.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iraninex.com\/en\/wp-json\/wp\/v2\/comments?post=1942"}],"version-history":[{"count":0,"href":"https:\/\/iraninex.com\/en\/wp-json\/wp\/v2\/pages\/1942\/revisions"}],"wp:attachment":[{"href":"https:\/\/iraninex.com\/en\/wp-json\/wp\/v2\/media?parent=1942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}