| Current Path : /home2/wtmwscom/public_html/member/ |
| Current File : /home2/wtmwscom/public_html/member/register.php |
<?php
$title= "New Member";
include 'header.php';
$uid = $_SESSION['userid'];
?>
<style type="text/css">
form {
font:13px Georgia, "Times New Roman", Times, serif;
background:#eee;
margin:20px;
padding:10px 20px;
width:90%;
}
form ul {
list-style:none;
margin:0;
padding:0;
}
form li {
padding:6px;
background:#e1e1e1;
margin-bottom:1px;
}
form li#send {
background:none;
margin-top:6px;
}
form label {
float:left;
width:205px;
text-align:right;
margin-right:7px;
color:#0066CC;
line-height:23px; /* This will make the labels vertically centered with the inputs */
}
form label span {
color: brown;
}
form input, form select,
form textarea {
padding:4px;
font:13px Georgia, "Times New Roman", Times, serif;
border:1px solid #999999;
width:200px;
}
form input:focus, form select:focus,
form textarea:focus {
border:1px solid #666;
background:#e3f1f1;
}
form li#send button {
background:#003366;
border:none;
padding:4px 8px 4px 8px;
border-radius:15%; /* Don't expect this to work on IE6 or 7 */
-moz-border-radius:15%;
-webkit-border-radius:15%;
color:#fff;
margin-left:137px; /* Total width of the labels + their right margin */
cursor:pointer;
}
form li#send button:hover {
background-color:#006633;
}
.heading{
color:#FFFFFF;
background-color:#666666;
border:1px solid #CCCCCC;
border-collapse:collapse;
text-align:left;
vertical-align:middle;
}
</style>
<script>
function check_pin(pin_no){
$.get("../get_pin.php",{'pin_no':pin_no},function(data){
if(data.invalid){
$("#submit").attr("disabled", "true");
//document.getElementById('amount').value='';
$("#pin_error").html("Invalid pin");
}
else{
$("#pin_error").html("Valid pin");
//document.getElementById('amount').value=data.amount;
$("#submit").removeAttr("disabled");
}
},"json");
}
function check_sponser(refer_id){
$.get("../get_sponser.php",{'refer_id':refer_id},function(data){
if(data.invalid){
$("#submit").attr("disabled", "true");
$("#sponser").html("Invalid sponser id");
}
else{
$("#sponser").html(data.name+" - Valid sponser id");
$("#submit").removeAttr("disabled");
}
},"json");
}
function check_login_id(login_id){
$.get("../get_login_id.php",{'login_id':login_id},function(data){
if(data.invalid){
$("#submit").attr("disabled", "true");
$("#login").html("User id already axist");
}
else if(login_id.length < 6 || login_id.length > 20){
$("#submit").attr("disabled", "true");
$("#login").html("User id min 6 or max 20 characters");
}
else{
$("#login").html("Valid user id");
$("#submit").removeAttr("disabled");
}
},"json");
}
function check_mobile(mobile){
pattern = /^[0-9]+$/;
$.get("../get_mobile.php",{'mobile':mobile},function(data){
if(data.invalid){
$("#submit").attr("disabled", "true");
$("#mobile_error").html("Mobile already axist");
}
else if(mobile.length != 10){
$("#submit").attr("disabled", "true");
$("#mobile_error").html("Mobile must be 10 digit");
}
else if(!pattern.test(mobile)){
$("#submit").attr("disabled", "true");
$("#mobile_error").html("Mobile must contain only numbers");
}
else{
$("#mobile_error").html("Valid mobile number");
$("#submit").removeAttr("disabled");
}
},"json");
}
function check_email(email){
pattern = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
$.get("../get_email.php",{'email':email},function(data){
if(data.invalid){
$("#submit").attr("disabled", "true");
$("#email_error").html("Email id already axist");
}
else if(!pattern.test(email)){
$("#submit").attr("disabled", "true");
$("#email_error").html("Invalid email id");
}
else{
$("#email_error").html("Valid email id");
$("#submit").removeAttr("disabled");
}
},"json");
}
</script>
<h1>Registration Form</h1>
<?php echo getMessage();?>
<section>
<form action="register_model.php" name="form" id="form" method="post">
<ul>
<li class="heading">Account Details</li>
<li>
<label for="pin_no">Enter Pin<span>*</span></label>
<input name="pin_no" type="text" pattern="[0-9]{8,30}" required="required" id="pin_no" onblur="check_pin(this.value);" maxlength="30" /> <span id="pin_error" name="pin_error"></span>
</li>
<li>
<label for="refer_id">Sponsor Id <span>*</span></label>
<input name="refer_id" id="refer_id" type="text" value="<?php echo $refer_id = mysqli_fetch_object(mysqli_query($connection, "SELECT login_id FROM user WHERE uid='$uid'"))->login_id;?>" required="required" readonly="readonly" onBlur="check_sponser(this.value);" maxlength="20" /> <span id="sponser" name="sponser"></span>
</li>
<li>
<label for="position">Position <span>*</span></label>
<select name="position" id="position" required="required">
<option value="" disabled="disabled" selected="selected">-- Select Position --</option>
<option value="L" <?php if(isset($_SESSION['position']) && $_SESSION['position']=='L'){echo "selected='selected'";}elseif(isset($_SESSION['position']) && $_SESSION['position']=='R'){echo "disabled='disabled'";}?>>Left</option>
<option value="R" <?php if(isset($_SESSION['position']) && $_SESSION['position']=='R'){echo "selected='selected'";}elseif(isset($_SESSION['position']) && $_SESSION['position']=='L'){echo "disabled='disabled'";}?>>Right</option>
</select>
</li>
<li>
<label for="login_id">User Id <span>*</span></label>
<input name="login_id" id="login_id" type="text" pattern="\w{6,20}" required="required" onBlur="check_login_id(this.value);" maxlength="20" /> <span id="login" name="login"></span>
</li>
<li>
<label for="password">Enter Password <span>*</span></label>
<input name="password" id="password" type="password" pattern="\w{6,20}" onchange="form.re_password.pattern = this.value;" required="required" maxlength="20" />
</li>
<li>
<label for="re_password">Re-Enter Password <span>*</span></label>
<input name="re_password" id="re_password" type="password" pattern="\w{6,20}" required="required" maxlength="20" />
</li>
<li class="heading">Personal Details</li>
<li>
<label for="name">Name <span>*</span></label>
<input name="name" id="name" type="text" pattern="[a-zA-Z ]+" required="required" maxlength="50" />
</li>
<li>
<label for="dob">Date of Birth <span>*</span></label>
<input name="dob" id="dob" type="text" readonly="readonly" value="" class="datepicker" required="required" /> eg. 1985-07-24
</li>
<li>
<label for="sex">Sex <span>*</span></label>
<input type="radio" id="sex_m" value="Male" checked="checked" name="sex" style="width: 20px; float: none;"/>
Male
<input type="radio" value="Female" id="sex_f" name="sex" style="width: 20px; float: none;" />
Female
</li>
<li>
<label for="address">Address</label>
<input name="address" id="address" type="text" maxlength="150" />
</li>
<li>
<label for="city">City <span>*</span></label>
<input name="city" id="city" type="text" maxlength="100" required="required" />
</li>
<li>
<label for="country">Country <span>*</span></label>
<select name="country" id="country">
<!--<option selected="selected">--Select country--</option>-->
<?php
$result = mysqli_query($connection, "SELECT country_id, short_name FROM country");
while ($row = mysqli_fetch_object($result)){
?>
<option value="<?php echo $row->country_id;?>" <?php if($row->country_id=='IN'){echo "selected='selected'";}?>><?php echo $row->short_name;?></option>
<?php }?>
</select>
</li>
<li>
<label for="mobile">Mobile <span>*</span></label>
<input name="mobile" id="mobile" type="text" maxlength="10" pattern="[0-9]{10,10}" required="required" /> <span id="mobile_error" name="mobile_error"></span>
</li>
<li>
<label for="email">Email <span>*</span></label>
<input name="email" id="email" type="email" maxlength="50" required="required" /> <span id="email_error" name="email_error"></span>
</li>
<li class="heading">Bank Details</li>
<li>
<label for="account_number">Account Number </label>
<input type="text" name="account_number" id="account_number" pattern="[0-9]{8,20}" maxlength="20">
</li>
<li>
<label for="account_holder_name">A/C Holder Name </label>
<input type="text" name="account_holder_name" id="account_holder_name" pattern="[a-zA-Z ]+" maxlength="50">
</li>
<li>
<label for="account_type">Account Type </label>
<select name="account_type" id="account_type">
<option value="" selected="selected">-- Select Account Type --</option>
<option value="Saving">Saving</option>
<option value="Current">Current</option>
</select>
</li>
<li>
<label for="ifsc">IFSC </label>
<input type="text" name="ifsc" id="ifsc" maxlength="20">
</li>
<li>
<label for="bank_name">Bank Name </label>
<input type="text" name="bank_name" id="bank_name" maxlength="100">
</li>
<li>
<label for="branch_name">Branch Name </label>
<input type="text" name="branch_name" id="branch_name" maxlength="100">
</li>
<li>
<label for="bank_address">Bank Branch Address </label>
<input type="text" name="bank_address" id="bank_address" maxlength="100">
</li>
<li>
<label for="pan_no">Pan No. </label>
<input type="text" name="pan_no" id="pan_no" maxlength="20">
</li>
<li>
<label for="transaction_password" >Transaction Password <span>*</span></label>
<input type="password" name="transaction_password" required="true" id="transaction_password" pattern="\w{6,20}" onchange="form.re_transaction_password.pattern = this.value;" maxlength="20">
</li>
<li>
<label for="re_transaction_password" >Re-Enter Transaction Password <span>*</span></label>
<input type="password" name="re_transaction_password" required="true" id="re_transaction_password" pattern="\w{6,20}" maxlength="20">
</li>
<li>
<input type="checkbox" name="agree" value="true" /> Agree <a href="../terms_and_conditions.php" style="color:#09F;" target="_blank">Term & Condition</a>
</li>
<li id="send">
<button type="submit" id="submit">Register</button>
</li>
</ul>
</form>
</section>
<?php include 'footer.php';?>