{include file="header88.tpl"}
    <!-- Banner Section Starts Here -->
    <div class="inner-banner section-bg overflow-hidden" style="background: #000;">
        <div class="container">
            <div class="inner__banner__content text-center">

                <h2 class="title" style="color: #fff;">Signup To Get Started</h2>

                <ul class="breadcums d-flex flex-wrap justify-content-center">
                    <li><a href="/">Home</a>//</li>
                    <li>Register</li>
                </ul>
            </div>
        </div>
        
    </div>
    <!-- Banner Section Ends Here -->


    <!-- Account Section Starts Here -->
    <!-- <div class="account-section padding-top padding-bottom" style="background-image:url(../bb/fin1.webp); background-repeat: no-repeat; background-size: cover;"> -->
    <div class="account-section padding-top padding-bottom" style="background: #fff;">
        <div class="container">
            <div class="row justify-content-between align-items-center">
               
                <div class="col"></div>

                <div class="col-md-6">
                    <div class="account__form__wrapper" style="background: #000; border: 3px solid #fff;">

                        
                        <center>
                            <img src="../bb/logo.png" alt="" width="250px">
                        </center>
                        <br>

                        <h3 class="title text-center" style="color: #fff;">Account registration</h3>
                        <br>
                        <br>


{if $deny_registration}
 We are closed for new registrations now.
{elseif $settings.use_referal_program && $settings.force_upline && !$referer.id && !$settings.get_rand_ref}
 You  do not have a upline. Our system require a upline for each user.
{else}
 {literal}

 <script language=javascript>
 function checkform() {
  if (document.regform.fullname.value == '') {
    alert("Please enter your full name!");
    document.regform.fullname.focus();
    return false;
  }
 {/literal}
 {if $settings.use_user_location == 1}
 {literal}
  if (document.regform.address.value == '') {
    alert("Please enter your address!");
    document.regform.address.focus();
    return false;
  }
  if (document.regform.city.value == '') {
    alert("Please enter your city!");
    document.regform.city.focus();
    return false;
  }
  if (document.regform.state.value == '') {
    alert("Please enter your state!");
    document.regform.state.focus();
    return false;
  }
  if (document.regform.zip.value == '') {
    alert("Please enter your ZIP!");
    document.regform.zip.focus();
    return false;
  }
  if (document.regform.country.options[document.regform.country.selectedIndex].text == '--SELECT--') {
    alert("Please choose your country!");
    document.regform.country.focus();
    return false;
  }
 {/literal}
 {/if}
 {literal}
  if (document.regform.username.value == '') {
    alert("Please enter your username!");
    document.regform.username.focus();
    return false;
  }
  if (!document.regform.username.value.match(/^[A-Za-z0-9_\-]+$/)) {
    alert("For username you should use English letters and digits only!");
    document.regform.username.focus();
    return false;
  }
  if (document.regform.password.value == '') {
    alert("Please enter your password!");
    document.regform.password.focus();
    return false;
  }
  if (document.regform.password.value != document.regform.password2.value) {
    alert("Please check your password!");
    document.regform.password2.focus();
    return false;
  }
 {/literal}
 {if $settings.use_transaction_code}
 {literal}
  if (document.regform.transaction_code.value == '') {
    alert("Please enter your transaction code!");
    document.regform.transaction_code.focus();
    return false;
  }
  if (document.regform.transaction_code.value != document.regform.transaction_code2.value) {
    alert("Please check your transaction code!");
    document.regform.transaction_code2.focus();
    return false;
  }
 {/literal}
 {/if}
 {literal}
  if (document.regform.email.value == '') {
    alert("Please enter your e-mail address!");
    document.regform.email.focus();
    return false;
  }
  if (document.regform.email.value != document.regform.email1.value) {
    alert("Please retype your e-mail!");
    document.regform.email.focus();
    return false;
  }

  for (i in document.regform.elements) {
    f = document.regform.elements[i];
    if (f.name && f.name.match(/^pay_account/)) {
      if (f.value == '') continue;
      var notice = f.getAttribute('data-validate-notice');
      var invalid = 0;
      if (f.getAttribute('data-validate') == 'regexp') {
        var re = new RegExp(f.getAttribute('data-validate-regexp'));
        if (!f.value.match(re)) {
          invalid = 1;
        }
      } else if (f.getAttribute('data-validate') == 'email') {
        var re = /^[^\@]+\@[^\@]+\.\w{2,4}$/;
        if (!f.value.match(re)) {
          invalid = 1;
        }
      }
      if (invalid) {
        alert('Invalid account format. Expected '+notice);
        f.focus();
        return false;
      }
    }
  }

  if (document.regform.agree.checked == false) {
    alert("You have to agree with the Terms and Conditions!");
    return false;
  }

  return true;
 }

 function IsNumeric(sText) {
  var ValidChars = "0123456789";
  var IsNumber=true;
  var Char;
  if (sText == '') return false;
  for (i = 0; i < sText.length && IsNumber == true; i++) { 
    Char = sText.charAt(i); 
    if (ValidChars.indexOf(Char) == -1) {
      IsNumber = false;
    }
  }
  return IsNumber;
 }
 </script>
 {/literal}

{if $errors}
{if $errors.turing_image}<div class="error">Invalid turing image</div>{/if}
{if $errors.no_fullname}<div class="error">Please enter your full name</div>{/if}
{if $errors.ip_exists_in_database}<div class="error">Your IP already exists in our database. Sorry, but registration impossible</div>{/if}
{if $errors.invalid_username}<div class="error">Please enter valid username! It should contains English letters and digits only.</div>{/if}
{if $errors.username_too_short}<div class="error">Username should contains {$errors.username_too_short} charaters at least</div>{/if}
{if $errors.username_exists}<div class="error">The Username is already taken. Please try another Username.</div>{/if}
{if $errors.no_password}<div class="error">Please define a password</div>{/if}
{if $errors.password_confirm}<div class="error">Please confirm your password correctly</div>{/if}
{if $errors.password_too_small}<div class="error">The password you provided is too small, please enter at least {$errors.password_too_small} characters!</div>{/if} 
{if $errors.invalid_email}<div class="error">Please valid email address</div>{/if} 
{if $errors.email_confirm}<div class="error">Please confirm your email address correctly</div>{/if}
{if $errors.email_exists}<div class="error">An account with this email is already exist</div>{/if}
{if $errors.no_address}<div class="error">Please enter your address</div>{/if}
{if $errors.no_city}<div class="error">Please enter your city</div>{/if}
{if $errors.no_state}<div class="error">Please enter your state</div>{/if}
{if $errors.no_zip}<div class="error">Please enter your zip</div>{/if}
{if $errors.no_country}<div class="error">Please enter your country</div>{/if}
{if $errors.no_transaction_code}<div class="error">Please define a transaction code</div>{/if}
{if $errors.transaction_code_confirm}<div class="error">Please correcty confirm your transaction code</div>{/if}
{if $errors.transaction_code_too_small}<div class="error">The transaction code you provided is too small, please enter at least {$errors.transaction_code_too_small} characters!</div>{/if} 
{if $errors.transaction_code_vs_password}<div class="error">The Transaction Code should not be equal to the Password you have defined</div>{/if}
{if $errors.no_agree}<div class="error">You have to agree with the Terms and Conditions!</div>{/if}
{if $errors.no_upline}<div class="error">You should have an upline to make registration.</div>{/if}
{if $errors.invalid_account_format}
 {foreach from=$errors.invalid_account_format item=err}
 <div class="error">{$err}</div>
 {/foreach}
{/if}
{/if} 

<form method=post onsubmit="return checkform()" class="form account__form" name="regform">
<input type=hidden name=a value="signup">
<input type=hidden name=action value="signup">
<div class="form-group">
<input type="text" class="form-control form--control" placeholder="Enter Fullname" name="fullname" value="{$frm.fullname|escape:html}" required>
</div>

<div class="form-group">
<input type="text" class="form-control form--control" placeholder="Enter Your Username" name="username" value="{$frm.username|escape:html}" required>
</div>

<div class="form-group" style="display: none;">
<input type="tel" class="form-control form--control" placeholder="Enter Phone Number" name="phone" value="" >
</div>

<div class="form-group">
<input name="email" type="email" class="form-control form--control" placeholder="Enter Email Address" value="{$frm.email|escape:html}" id="email" required>
</div>
<input type="hidden" class="form-control" id="email1" name="email1" value="" placeholder="E-Mail address">
<script>
                                window.onload = function() {
                          var src = document.getElementById("email"),
                              dst = document.getElementById("email1");
                          src.addEventListener('input', function() {
                              dst.value = src.value;
                          });
                      };
                                </script>
{if $settings.use_user_location}
<div class="form-group">
<input type="text" class="form-control form--control" placeholder="Your Address" name="address" value="{$frm.address|escape:html}">
</div>

<div class="form-group">
<input type="text" class="form-control form--control" placeholder="Your City" name="city" value="{$frm.city|escape:html}">
</div>

<div class="form-group">
<input type="text" class="form-control form--control" placeholder="Your State" name="state" value="{$frm.state|escape:html}">
</div>

<div class="form-group">
<input type="text" class="form-control form--control" placeholder="Your Zip" name="zip" value="{$frm.zip|escape:html}">
</div>

<div class="form-group">
<select class="field_custom form-control" name="country">
<option value="">--SELECT--</option>
{foreach from=$countries item=c}
<option {if $c.name == $frm.country}selected{/if}>{$c.name|escape:html}</option>
{/foreach}
  </select>
</div>
{/if}

{foreach from=$pay_accounts item=ps}
<div class="form-group">
<input type=text class="form-control form--control" name="pay_account[{$ps.id}]" value="{$ps.account|escape:html}" data-validate="{$ps.validate.func}" data-validate-{$ps.validate.func}="{$ps.validate[$ps.validate.func]}" data-validate-notice="{$ps.validate.notification|escape:html}" placeholder="Enter {$ps.name} wallet" >
</div>
{/foreach}
{foreach item=p from=$mpay_accounts}
{foreach item=ps from=$p.accounts}
<div class="form-group">
<input type=text class="form-control form--control" name="pay_account[{$p.id}][{$ps.name|escape:html}]" value="{$ps.value|escape:html}" placeholder="Enter {$p.name} {$ps.name}">
</div>
{/foreach}
{/foreach}

<div class="form-group">
<input type="password" name="password" value="{$frm.password|escape:html}" class="form-control form--control" placeholder="Define Password" required>
                            </div>

<div class="form-group">
<input type="password" name="password2" value="{$frm.password2|escape:html}" class="form-control form--control" placeholder="Confirm Password" required>
                            </div>

{if $settings.use_transaction_code}
<div class="form-group">
<input type="password" name="transaction_code" value="{$frm.transaction_code|escape:html}" class="form-control form--control" placeholder="Define Transaction Code">
                            </div>
<div class="form-group">
<input type="password" name="transaction_code2" value="{$frm.transaction_code2|escape:html}" class="form-control form--control" placeholder="Retype Transaction Code">
                            </div>
{/if}



{if $settings.use_referal_program}
{if $referer}
<div class="form-group">
<input type="text" class="form-control form--control" placeholder="Upline - {$referer.name} ({$referer.username|escape:html})" readonly>
</div>
{else}
{if $settings.force_upline}
 {if $settings.get_rand_ref}
  <tr>
   <td colspan=2>
    You do not have an upline. Our system requires an upline for each user. You'll have to agree to get a random one or find a referral link on the net.
    <input type=checkbox name="rand_ref" value=1>
   </td>
  </tr>
 {else}
  <tr>
   <td colspan=2>
    You do not have an upline. Our system requires an upline for each user.
   </td>
  </tr>
 {/if}
{/if}
{/if}
{/if}

{include file="captcha.tpl" action="signup"}
<input type=hidden name=agree value=1 checked >
<center>
<button type="submit" class="btn cmn--btn mt-4">Register</button>
                            </center>
</form>
{/if}
<center>
<p class="mt-4">Already you have an account in here? <a class="ms-2 text--base" href="?a=login">Sign In</a></p>
                        </center>
                    
                    </div>
                </div>

                <div class="col"></div>
                
            </div>
        </div>
    </div>
    <!-- Account Section Ends Here -->

    <center>
        <img src="bb/rim08.png" alt="" width="100%">
        <img src="bb/rim07.png" alt="" width="100%">
    </center>

{include file="footer88.tpl"}
