<?php
$html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
$headinclude
<meta name="keywords" content="$general[globalkeyword]" />
<meta name="description" content="$general[globaldescr]" />
<title>$general[globaltitle] - Register New Member</title>
	<script type="text/javascript">
		function checkregform(obj){
			if (obj.email.value == ""){
				alert("$phrase[fillemail]");
				obj.email.focus();
			}
			else if (obj.firstname.value == ""){
				alert("$phrase[fillname]");
				obj.firstname.focus();
			}
			else if (obj.companyphone.value == ""){
				alert("$phrase[fillcompanyphone]");
				obj.companyphone.focus();
			}
			/* else if (obj.bitcoin_account.value == ""){
				alert("$phrase[fillbitcoinaccount]");
				obj.bitcoin_account.focus();
			} */
			else if (obj.regpassword.value == ""){
				alert("$phrase[fillpassword]");
				obj.regpassword.focus();
			}
			else if (obj.conpassword.value == ""){
				alert("$phrase[passwordnullconfirmation]");
				obj.conpassword.focus();
			}
			else if (obj.regpassword.value.length < 6){
				alert("$phrase[atleast6]");
				obj.regpassword.focus();
			}
			else if (obj.regpassword.value != obj.conpassword.value){
				alert("$phrase[password_confirmation]");
				obj.conpassword.focus();
			}
			else{
				var email_pattern = /^.+@.+\..+$/;
				var valid = email_pattern.test(obj.email.value);
				if (valid == false){
					alert("$phrase[email_address_correctly]");
					obj.email.focus();
					return false;
				}
				return confirm("$phrase[areyousure]");
			}
			return false;
		}
	</script>
</head>
<body class="no-skin">
$header

<div class="main-content">
	<div class="main-content-inner">
		<div class="breadcrumbs ace-save-state" id="breadcrumbs">
			<ul class="breadcrumb">
				<li>
					<i class="ace-icon fa fa-home home-icon"></i>
					<a href="home">Home</a>
				</li>
				<li class="active">Register New Member</li>
			</ul><!-- /.breadcrumb -->
		</div>
		<div class="page-content">
			<div class="row">
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 margin-bottom-30">
					<h3 class="title title-1">Register New Member</h3>
				</div>
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<if criteria="!empty($errmsg)">
				<div class="alert alert-danger">$errmsg</div>
				</endif>
				<if criteria="$_GET[\'msg\'] == \'success\'">
				<div class="alert alert-success">You have registered a new member successfully</div>
				</endif>
				<form action="register-new-member" method="post" onsubmit="return checkregform(this);">
				<div class="row">
					<div class="col-sm-6">
						<div class="form-group">
							<label for="email">Email Address <span style="color:red">*</span></label>
							<input class="form-control" type="email" name="email" id="email" value="$email" required autocomplete="off" />
						</div>
						<div class="form-group">
							<label for="firstname">Name <span style="color:red">*</span></label>
							<input class="form-control" type="text" name="firstname" id="firstname" value="$firstname" required autocomplete="off" />
						</div>
						<div class="form-group">
							<label for="companyphone">Phone Number <span style="color:red">*</span></label>
							<input class="form-control" type="text" name="companyphone" id="companyphone" value="$companyphone" required autocomplete="off" />
						</div>
						<div class="form-group hidden">
							<label for="bitcoin_account">Bitcoin Account <span style="color:red">*</span></label>
							<input class="form-control" type="text" name="bitcoin_account" id="bitcoin_account" value="" autocomplete="off" />
						</div>
					</div>
					<div class="col-sm-6">
						<div class="form-group">
							<label for="regpassword">Password <span style="color:red">*</span></label>
							<input class="form-control" type="password" name="regpassword" id="regpassword" required autocomplete="off" />
						</div>
						<div class="form-group">
							<label for="conpassword">Confirm Password <span style="color:red">*</span></label>
							<input class="form-control" type="password" name="conpassword" id="conpassword" required autocomplete="off" />
						</div>
					</div>
				</div>
				<input type="hidden" name="do" value="addmember">
				<button type="submit" class="btn btn-primary">Register</button>
				</form></div>
			</div>
		</div>
    </div>
</div>

$footer
</body>
</html>';
?>