{include file="header99.tpl"}
<!-- Banner Start -->
	<section class="main-banner inner-banner" id="main-banner">
		<div class="banner-animate">
			<span class="stars">
				<img src="assets/images/stars.png" alt="Stars">
			</span>
			<span class="smoke smoke1">
				<img src="assets/images/smoke-img1.png" alt="Smoke">
			</span>
			<span class="smoke smoke2">
				<img src="assets/images/smoke-img2.png" alt="Smoke">
			</span>
			<span class="planet planet1 animate-this">
				<img src="assets/images/planet1.png" alt="Planet">
			</span>
			<span class="planet planet2 animate-this">
				<img src="assets/images/planet2.png" alt="Planet">
			</span>
			<span class="planet planet3 animate-this">
				<img src="assets/images/planet3.png" alt="Planet">
			</span>
			<span class="planet planet4 animate-this">
				<img src="assets/images/planet4.png" alt="Planet">
			</span>
			<span class="planet planet5 animate-this">
				<img src="assets/images/planet4.png" alt="Planet">
			</span>
			<span class="shooting-star shooting-star1">
				<img src="assets/images/shooting-star.png" alt="Shooting Star">
			</span>
			<span class="shooting-star shooting-star2">
				<img src="assets/images/shooting-star.png" alt="Shooting Star">
			</span>
			<span class="shooting-star shooting-star3">
				<img src="assets/images/shooting-star.png" alt="Shooting Star">
			</span>
			<span class="shooting-star shooting-star4">
				<img src="assets/images/shooting-star.png" alt="Shooting Star">
			</span>
			<span class="shooting-star shooting-star5">
				<img src="assets/images/shooting-star.png" alt="Shooting Star">
			</span>
		</div>
		<div class="container">
			<div class="row justify-content-center">
				<div class="col-12">
					<div class="banner-content">
						<h1 class="h1-title wow fadeup-animation" data-wow-delay="0.2s">REGISTRATION</h1>
						<div class="breadcrumb-box wow fadeup-animation" data-wow-delay="0.4s">
							<ul>
								<li><a href="/" title="Home">Home</a></li>
								<li>REGISTRATION</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
	<!-- Banner End -->
<br>

{if $deny_registration}
 We are closed for new registrations now.
{elseif $settings.use_referal_program && $settings.force_upline && !$referer && !$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 retupe 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}
  <ul style="color:red">
  {section name=e loop=$errors} 
   {if $errors[e] eq 'full_name'}
    <li>Please enter your full name!
   {/if}
   {if $errors[e] eq 'address'}
    <li>Please enter your address!
   {/if}
   {if $errors[e] eq 'city'}
    <li>Please enter your city!
   {/if}
   {if $errors[e] eq 'state'}
    <li>Please enter your state!
   {/if}
   {if $errors[e] eq 'zip'}
    <li>Please enter your zip!
   {/if}
   {if $errors[e] eq 'country'}
    <li>Please choose your country!
   {/if}
   {if $errors[e] eq 'username'}
    <li>Please enter valid username! It should contains English letters and digits only.
   {/if}
   {if $errors[e] eq 'username_exists'}
    <li>Sorry, such user already exists! Please try another username. 
   {/if}
   {if $errors[e] eq 'email_exists'}
    <li>Sorry, such email already exists! Please try another email. 
   {/if} 
   {if $errors[e] eq 'password'} 
    <li>Please enter a password!
   {/if}
   {if $errors[e] eq 'password_confirm'}
    <li>Please check your password!
   {/if}
   {if $errors[e] eq 'password_too_small'}
    <li>The password you provided is too small, please enter at least {$settings.min_user_password_length} characters!
   {/if} 
   {if $errors[e] eq 'transaction_code'} 
    <li>Please enter the Transaction Code!
   {/if} 
   {if $errors[e] eq 'transaction_code_confirm'} 
    <li>Please check your Transaction Code!
   {/if}
   {if $errors[e] eq 'transaction_code_too_small'}
    <li>The Transaction Code you provided is too small, please enter at least {$settings.min_user_password_length} characters!
   {/if}
   {if $errors[e] eq 'transaction_code_vs_password'} 
    <li>The Transaction Code should differ from the Password!
   {/if}
   {if $errors[e] eq 'email'} 
    <li>Please enter your e-mail!
   {/if}
   {if $errors[e] eq 'email2'} 
    <li>Please check your email!
   {/if}
   {if $errors[e] eq 'agree'}
    <li>You have to agree with the Terms and Conditions!
   {/if}
   {if $errors[e] eq 'turing_image'}
    <li>Enter the verification code as it is shown in the corresponding box.
   {/if} 
   {if $errors[e] eq 'no_upline'}
    <li>The system requires an upline to register. {if $settings.get_rand_ref}You have to be agreed to random one or found a referral link in the net.{/if}
   {/if} 
   {if $errors[e] eq 'ip_exists_in_database'}
    <li>Your IP already exists in our database. Sorry, but registration impossible.
   {/if}

   {if $errors[e] eq 'invalid_account_format'}
    {foreach from=$account_errors item=err}
    <li>{$err}
    {/foreach}
   {/if}

   <br> 
  {/section}
  </ul>
 {/if} 
 <!-- Contact Us Start -->
	<section class="main-contact-us">
		<div class="container">
			<div class="row justify-content-center">
				<div class="col-xl-8 col-lg-9">
					<div class="contact-us-content wow fadeup-animation" data-wow-delay="0.4s">
						<span class="sub-title" id="contact">LOGIN</span>
						<h4 class="h4-title">Login To Your Account</h4>
						<div class="contact-form">
						    <br>
<form method=post onsubmit="return checkform()" name="regform">
<input type=hidden name=a value="signup">
<input type=hidden name=action value="signup">
<div class="row">
<div class="col-md-6">
<div class="form-box">
<input name="fullname" type="text" class="form-input" placeholder="Full Name" value='{$frm.fullname|escape:"quotes"}'>
										</div>
									</div>
{if $settings.use_user_location}
<tr>
 <td>Your Address:</td>
 <td><input type=text name=address value='{$frm.address|escape:"quotes"}' class=inpts size=30></td>
</tr>
<tr>
 <td>Your City:</td>
 <td><input type=text name=city value='{$frm.city|escape:"quotes"}' class=inpts size=30></td>
</tr>
<tr>
 <td>Your State:</td>
 <td><input type=text name=state value='{$frm.state|escape:"quotes"}' class=inpts size=30></td>
</tr>
<tr>
 <td>Your Zip:</td>
 <td><input type=text name=zip value='{$frm.zip|escape:"quotes"}' class=inpts size=30></td>
</tr>
<tr>
 <td>Your Country:</td>
 <td>
  <select name=country class=inpts>
<option value="">--SELECT--</option>
{section name=c loop=$countries}
<option {if $countries[c].name eq $frm.country}selected{/if}>{$countries[c].name|escape:"quotes"}</option>
{/section}
  </select>
 </td>
</tr>
{/if}
<div class="col-md-6">
<div class="form-box">
<input name="username" type="text" class="form-input" placeholder="Username" value='{$frm.username|escape:"quotes"}'>
										</div>
									</div>
 
<div class="col-md-6">
<div class="form-box">
<input name="password" type="password" class="form-input" placeholder="Define Password" value='{$frm.password|escape:"quotes"}'>
										</div>
									</div>


<div class="col-md-6">
<div class="form-box">
<input name="password2" type="password" class="form-input" placeholder="Retype Password" value='{$frm.password2|escape:"quotes"}'>
										</div>
									</div>



{if $settings.use_transaction_code}
<div class="col-md-6">
<div class="form-box">
<input name="transaction_code" type="password" class="form-input" placeholder="Define Transaction Code" value='{$frm.transaction_code|escape:"quotes"}'>
										</div>
									</div>

<div class="col-md-6">
<div class="form-box">
<input name="transaction_code2" type="password" class="form-input" placeholder="Retype Transaction Code" value='{$frm.transaction_code2|escape:"quotes"}'>
										</div>
									</div>
{/if}
{foreach from=$pay_accounts item=ps}
<div class="col-md-6">
<div class="form-box">
<input type=text class="form-input" 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="{$ps.name}">
										</div>
									</div>
{/foreach}
{foreach item=p from=$mpay_accounts}
{foreach item=ps from=$p.accounts}
<div class="col-md-6">
<div class="form-box">
<input type=text class="form-input" name="pay_account[{$p.id}][{$ps.name|escape:html}]" value="{$ps.value|escape:html}" placeholder="{$p.name}">	</div>
									</div>
{/foreach}
{/foreach}
<div class="col-md-6">
<div class="form-box">
<input name="email" type="text" class="form-input" placeholder="E-mail Address" value='{$frm.email|escape:"quotes"}'>
										</div>
									</div>
<div class="col-md-6">
<div class="form-box">
<input name="email1" type="text" class="form-input" placeholder="Retype E-mail" value='{$frm.email1|escape:"quotes"}'>
										</div>
									</div>


<div class="col-md-6">
<div class="form-box">
<input type="text" class="form-input" placeholder="{$referer.username|default:"No Upline"}">
										</div>
									</div>



<div class="col-md-12">
<div class="form-box">
<p><a href="{"?a=login"|encurl}">Already have an account.?</a></p>
										</div>
									</div>
{include file="captcha.tpl" action="signup"}
<br>
<div class="col-md-12">
<div class="form-box">
<input type=hidden name=agree value=1 checked > <p>By clicking Sign Up you are agree with <a href="?a=rules">Terms and conditions</a>.</p>
										</div>
									</div>
<div class="col-md-12">
										<div class="form-box">
<input type=submit value="Signup" class="sec-btn">
										</div>
									</div>
									
									
								</div>
</form>
{/if}




	</div>
					</div>
				</div>
			</div>
		</div>
	</section>
	<!-- Contact Us End -->
{include file="footer99.tpl"}
