
<!DOCTYPE html>
<html lang="en" class="h-100">


<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Registration</title>
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="logo.png">
    <link href="auth/assetsss/css/style.css" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&amp;family=Roboto:wght@100;300;400;500;700;900&amp;display=swap" rel="stylesheet">
</head>

<body class="h-100">
    <div class="authincation h-100">
        <div class="container h-100">
            <div class="row justify-content-center h-100 align-items-center">
                <div class="col-md-6">
					
					<div class="authincation-content">
                        <div class="row no-gutters">
                            <div class="col-xl-12">
                                <div class="auth-form">
									<div class="text-center mb-3">
										<a href="/"><img src="logo.png" width="200" alt=""></a>
									</div>
                                    <h4 class="text-center mb-4 text-white">Sign up your account</h4>
                                    
                                    
{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.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()" name="regform" id="contact-form" class="padding-md padding-md-topbottom-null">

<input type="hidden" name="a" value="signup">
<input type="hidden" name="action" value="signup">

    <!-- Username Field -->
    <div class="form-group form-group-feedback form-group-feedback-right">
        <input type="text" class="form-control" placeholder="Choose username" name="username" value="{$frm.username|escape:"quotes"}" required>
        <div class="form-control-feedback">
            <i class="icon-user-plus text-muted"></i>
        </div>
    </div>

    <div class="row">
        <!-- Full Name Field -->
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="fullname" value="{$frm.fullname|escape:"quotes"}" placeholder="Full name" required>
                <div class="form-control-feedback">
                    <i class="icon-user-check text-muted"></i>
                </div>
            </div>
        </div>
        
        <!-- Country Field -->
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                {if $settings.use_user_location}
                    <select name="country" class="form-control" required>
                        <option value="">--SELECT COUNTRY--</option>
                        {section name=c loop=$countries}
                        <option {if $countries[c].name eq $frm.country}selected{/if}>{$countries[c].name|escape:"quotes"}</option>
                        {/section}
                    </select>
                {else}
                    <input type="text" class="form-control" value="(n/a)" readonly name="country">
                {/if}
                <div class="form-control-feedback">
                    <i class="icon-location4 text-muted"></i>
                </div>
            </div>
        </div>
    </div>

    {if $settings.use_user_location}
    <!-- Address Fields Row -->
    <div class="row">
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="address" value="{$frm.address|escape:"quotes"}" placeholder="Your Address">
                <div class="form-control-feedback">
                    <i class="icon-home4 text-muted"></i>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="city" value="{$frm.city|escape:"quotes"}" placeholder="Your City">
                <div class="form-control-feedback">
                    <i class="icon-city text-muted"></i>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="state" value="{$frm.state|escape:"quotes"}" placeholder="Your State">
                <div class="form-control-feedback">
                    <i class="icon-map2 text-muted"></i>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="zip" value="{$frm.zip|escape:"quotes"}" placeholder="Your Zip Code">
                <div class="form-control-feedback">
                    <i class="icon-mailbox text-muted"></i>
                </div>
            </div>
        </div>
    </div>
    {/if}

    <!-- Password Fields Row -->
    <div class="row">
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <div class="badge-indicator-absolute">
                    <input type="password" class="form-control" placeholder="Create password" value="{$frm.password|escape:"quotes"}" name="password" required>
                    <span class="badge password-indicator-badge-absolute"></span>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <div class="badge-indicator-absolute">
                    <input type="password" class="form-control" placeholder="Confirm password" name="password2" value="{$frm.password2|escape:"quotes"}" required>
                    <span class="badge password-indicator-badge-absolute"></span>
                </div>
            </div>
        </div>
    </div>

    {if $settings.use_transaction_code}
    <!-- Transaction Code Fields Row -->
    <div class="row">
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="password" class="form-control" name="transaction_code" value="{$frm.transaction_code|escape:"quotes"}" placeholder="Define Transaction Code" required>
                <div class="form-control-feedback">
                    <i class="icon-key text-muted"></i>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="password" class="form-control" name="transaction_code2" value="{$frm.transaction_code2|escape:"quotes"}" placeholder="Retype Transaction Code" required>
                <div class="form-control-feedback">
                    <i class="icon-key text-muted"></i>
                </div>
            </div>
        </div>
    </div>
    {/if}

    {if $pay_accounts}
    <!-- Payment Accounts Section -->
    <div class="row">
        <div class="col-md-12">
            <h6 class="text-muted mb-3">Payment Accounts</h6>
        </div>
        {foreach from=$pay_accounts item=ps}
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="pay_account[{$ps.id}]" value="{$ps.account|escape:html}" placeholder="Your {$ps.name} Account" data-validate="{$ps.validate.func}" data-validate-{$ps.validate.func}="{$ps.validate[$ps.validate.func]}" data-validate-notice="{$ps.validate.notification|escape:html}">
               
            </div>
        </div>
        {/foreach}
    </div>
    {/if}

    {if $mpay_accounts}
    <!-- Multi-Payment Accounts Section -->
    <div class="row">
        <div class="col-md-12">
            <h6 class="text-muted mb-3">Additional Payment Methods</h6>
        </div>
        {foreach item=p from=$mpay_accounts}
        {foreach item=ps from=$p.accounts}
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="pay_account[{$p.id}][{$ps.name|escape:html}]" value="{$ps.value|escape:html}" placeholder="Your {$p.name} {$ps.name}">
                
            </div>
        </div>
        {/foreach}
        {/foreach}
    </div>
    {/if}

    <!-- Email Fields Row -->
    <div class="row">
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="email" class="form-control" name="email" value="{$frm.email|escape:"quotes"}" placeholder="Your email" required>
                <div class="form-control-feedback">
                    <i class="icon-mention text-muted"></i>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="email" class="form-control" name="email1" value="{$frm.email1|escape:"quotes"}" placeholder="Confirm Your email" required>
                <div class="form-control-feedback">
                    <i class="icon-mention text-muted"></i>
                </div>
            </div>
        </div>
    </div>

    <!-- Security Questions Row -->
    <div class="row">
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="sq" value="{$frm.sq|escape:"quotes"}" placeholder="Secret question">
                <div class="form-control-feedback">
                    <i class="icon-question3 text-muted"></i>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="sa" value="{$frm.sa|escape:"quotes"}" placeholder="Secret answer">
                <div class="form-control-feedback">
                    <i class="icon-key2 text-muted"></i>
                </div>
            </div>
        </div>
    </div>

    {if $settings.use_referal_program}
    <!-- Referral Program Section -->
    <div class="row">
        <div class="col-md-12">
            {if $referer}
            <div class="alert alert-info">
                <strong>Your Upline:</strong> {$referer.name} ({$referer.username})
            </div>
            {else}
            {if $settings.force_upline}
            <div class="alert alert-warning">
                {if $settings.get_rand_ref}
                <div class="form-check">
                    <input type="checkbox" class="form-check-input" name="rand_ref" value="1" id="rand_ref">
                    <label class="form-check-label" for="rand_ref">
                        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.
                    </label>
                </div>
                {else}
                <p>You do not have an upline. Our system requires an upline for each user.</p>
                {/if}
            </div>
            {/if}
            {/if}
        </div>
    </div>
    {/if}

    {if $ti.check.signup}
    <!-- CAPTCHA Section -->
    <div class="row">
        <div class="col-md-6">
            <div class="form-group text-center">
                <img src="{"?a=show_validation_image&`$ti.session.name`=`$ti.session.id`&rand=`$ti.session.rand`"|encurl}" class="img-fluid border">
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group form-group-feedback form-group-feedback-right">
                <input type="text" class="form-control" name="validation_number" placeholder="Enter validation code" required>
                <div class="form-control-feedback">
                    <i class="icon-shield-check text-muted"></i>
                </div>
            </div>
        </div>
    </div>
    {/if}

    <!-- Terms and Conditions -->
    <div class="form-group form-primary">
        <div class="form-check">
            <input type="checkbox" class="form-check-input" name="agree" value="1" {if $frm.agree}checked{/if} id="agree" required>
            <label class="form-check-label" for="agree">
                I agree with <a href="{"?a=rules"|encurl}">Terms and conditions</a>
            </label>
        </div>
        <span class="form-bar"></span>
    </div>

    <!-- Submit Button -->
    <div class="text-center">
        <button type="submit" class="btn bg-white text-primary btn-block">Register</button>
        <div class="new-account mt-3">
            <p class="text-white">Already have an account? <a class="text-white" href="?a=login">Sign in</a></p>
        </div>
    </div>
</form>                                
                                {/if}
                                                            </div>
                            </div>
        <!-- /main content -->

    </div>
	</div>
                      
            <!--  END Page Content -->
