OverLord Shell
<?php
session_start();
include_once("db/conn.php");
if (!empty($_SESSION['loggedin_user']) && $_SESSION['loggedin_user'] == 'company') {
header("location:index.php");
}
include_once("header.inc.php");
?>
<link href="mm/css/style_cap.css" rel="stylesheet">
<script type='text/javascript'>
function refreshCaptcha() {
var img = document.images['captchaimg'];
img.src = img.src.substring(0, img.src.lastIndexOf("?")) + "?rand=" + Math.random() * 1000;
}
</script>
<section>
<div class="second-page-container">
<div class="block">
<div class="container1">
<?php if (!empty($_GET['msg']) && strpos($_GET['msg'], 'success') != FALSE) { ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success note-dismissable" id="msg">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php if ($_GET['msg'] == 'register_success') { ?>Thank for Registration ,Please check your Email for Login Details.<?php } ?>
</div>
</div>
</div>
<?php } ?>
<?php
//configuring redirect url
$redurl = "index.php";
if (!empty($_GET['redirect_url'])) $redurl = $_GET['redirect_url'];
elseif (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_HOST'] == 'localhost') {
$redurl = explode('/', $_SERVER['HTTP_REFERER']);
$redurl = end($redurl);
} else $redurl = "index.php";
?>
<input type="hidden" name="redirect_url" id="redirect_url" value="<?php echo $redurl ?>" readonly>
<div class="second-page-container">
<div class="block">
<div class="container">
<div class="header-for-light">
<h1 class="wow fadeInRight animated" data-wow-duration="1s"></h1>
</div>
<div class="col-md-12">
<article class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="block-form box-border wow fadeInLeft animated" data-wow-duration="1s">
<form class="form-horizontal" id="registerform" role="form" method="post" action="#">
<input type="hidden" value="" name="con_sr_no" id="con_sr_no">
<input type="hidden" value="" name="regsrno" id="regsrno">
<input type="hidden" value="" name="regdistsrno" id="regdistsrno">
<input type="hidden" value="" name="mem_code" id="mem_code">
<div class="form-group">
<div class="row" style="border: solid; border-color: #b0b0b0;padding-left: 10px;margin-right: 9px;margin-top: 48px;">
<div class="page-header">
<small>
<center>
<h4>MBN Registration</h4>
</center>
</small>
</div>
<div class="col-sm-9">
<div class="form-group">
<div class="col-sm-4"> <label>Role <span class="require"></span></label>
</div>
<div class="col-sm-8">
<div class="input-icon">
<select class="form-control" name="role" id="role" data-validation="required" onChange="getrole(); ">
<option value="">--Select--</option>
<option value="bs">Business</option>
<option value="jb">Job Seeker</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4"> <label>Maccia Membership Number <span class="require">*</span></label>
</div>
<div class="col-sm-8">
<input type="text" class="form-control" name="memcode" id="memcode" maxlength="10" data-validation-error-msg="Invalid Email" onChange="getmemcode();" disabled>
</div>
</div>
<div class="form-group">
<div class="col-sm-4"> <label>Full Name<span class="require">*</span></label>
</div>
<div class="col-sm-8">
<input type="text" class="form-control " name="first_Name" id="first_Name" maxlength="100" data-validation="required" data-validation-error-msg="Invalid first Name">
</div>
</div>
<div class="form-group">
<div class="col-sm-4"> <label>Email <span class="require">*</span></label>
</div>
<div class="col-sm-8">
<div class="input-icon">
<i class="fa fa-envelope"></i>
<input type="text" class="form-control" name="company_email" id="company_email" maxlength="50" data-validation="email" data-validation-error-msg="Invalid Email">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4"> <label>Mobile <span class="require">*</span></label>
</div>
<div class="col-sm-8">
<div class="input-icon">
<i class="fa fa-mobile"></i>
<input type="text" class="form-control" name="company_mobile" id="company_mobile" maxlength="13" data-validation="number" data-validation-error-msg="Invalid Mobile No." data-validation-optional="true">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4"><label> Country<span class="require">*</span></label>
</div>
<div class="col-sm-8"> <select class="form-control" name="memcose" id="country_id" data-validation="required" data-validation-error-msg="Invalid Country" onChange="getSch();">
<option value="">Select</option>
<?php
$strx = $connection->query("SELECT * FROM busdir_mst_countries ORDER BY name");
while ($strowx = $strx->fetch_assoc()) {
?>
<option value="<?php echo $strowx['id'] . "~" . $strowx['name']; ?>"><?php echo $strowx['name']; ?></option>
<?php
}
$strx->free();
?>
</select>
</div>
</div>
<div id="row_dim1">
<div class="form-group">
<div class="col-sm-4"><label> State <span class="require">*</span></label>
</div>
<div class="col-sm-8"> <select class="form-control" name="state_id" id="state_id" data-validation="required" data-validation-error-msg="Invalid State" disabled onChange="getdist();">
<option value="">Select</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-4"><label> District <span class="require">*</span></label>
</div>
<div class="col-sm-8"> <select class="form-control" name="dist_id" id="dist_id" data-validation="required" data-validation-error-msg="Invalid District" disabled>
<option value="">Select</option>
</select>
</div>
</div>
</div>
<div id="row_dim">
<div class="form-group">
<div class="col-sm-4"> <label>State <span class="require">*</span></label>
</div>
<div class="col-sm-8">
<div class="input-icon">
<i class="fa fa-map-marker"></i>
<input type="text" class="form-control" name="company_other_state" id="company_other_state" maxlength="100" data-validation="required" data-validation-error-msg="Invalid State">
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4"> <label>City <span class="require">*</span></label>
</div>
<div class="col-sm-8">
<div class="input-icon">
<i class="fa fa-map-marker"></i>
<input type="text" class="form-control" name="company_city" id="company_city" maxlength="100" data-validation="required" data-validation-error-msg="Invalid City">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4"> <label>Pincode <span class="require"></span></label>
</div>
<div class="col-sm-8">
<div class="input-icon">
<input type="text" class="form-control" name="company_pinno" id="company_pinno" maxlength="6">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4"> </label>
</div>
<div class="col-sm-8">
<div class="input-icon">
<p> <input type="checkbox" id="checkBox" onclick="enableDisable(this.checked, 'textBox')" required="required" data-validation-error-msg="select the terms and condition"><a target="_blank" href="tandc.php"> I Agree to terms and conditions.</a> </p>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-3"> <label><span class="require"></span></label>
</div>
<div class="col-sm-9" style="margin-left: 130px;margin-top: -7%;">
<img src="captcha.php?rand=<?php echo rand(); ?>" id='captchaimg'><br>
<label for='message'>Enter the code above here :</label>
<br>
<input id="captcha_code" name="captcha_code" type="text">
<br>
Can't read the image? click <a href='javascript: refreshCaptcha();'>here</a> to refresh.
</div>
</div>
<div class="col-sm-9" style="width:100%;">
<div class="alert alert-danger displaynone"></div>
<button type="submit" class="btn-bd hvr-outline-out" style="float:left;margin-left: 113px;" data-loading-text="Registering...">Register</button>
<input type="reset" value="Reset" style="margin-left:2%;height:34px;">
</div>
<div class="alert alert-success displaynone">Registration Successful. Loading . . .</div>
<div class="clearfix mbl"></div>
<p class="text-center" style="float:right;padding-right:36px;">Already a member? <a href="login.php" class="btn btn-link">Login Here</a></p>
</div>
</div>
</div>
</form>
</div>
</article>
<article class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="block-form box-border wow fadeInLeft animated" data-wow-duration="1s" style=" padding-top: 47px;
">
<div class="row">
<img src="images/slider/coupons.jpg" style="height:281px" />
</div>
</div>
</article>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<style>
label {
padding-top: 2% !important;
}
</style>
<link rel="'stylesheet" src="css/bootstrap.min.css" />
<script>
function getrole() {
if ($('#role').val() == 'bs') {
$('#memcode').removeAttr('disabled');
} else {
$('#memcode').attr('disabled', 'disabled');
$('#registerform button').button('reset');
}
}
function getmemcode() {
if ($('#role').val() == 'bs') {
var memcd = $('#memcode').val();
$.ajax({
type: 'POST',
url: 'getmemcode.php',
data: {
'memcd': memcd
},
success: function(data) {
var mdata = data.split('~');
if ($.trim(mdata[12]) == 'success') {
$('#first_Name').val(mdata[2]).attr('readonly', 'true');
$('#company_email').val(mdata[8]).attr('readonly', 'true');
$('#company_mobile').val(mdata[10]);
$('#country_id').val('101~India').attr('disabled', 'disabled');
$('#state_id').val(mdata[6]).removeAttr('disabled');
$('#dist_id').val(mdata[5]).removeAttr('disabled');
$('#company_pinno').val(mdata[7]).removeAttr('disabled');
$('#role').val('bs').attr('disabled', 'disabled');
$('#con_sr_no').val(mdata[0]);
$('#regsrno').val(mdata[3]);
$('#regdistsrno').val(mdata[4]);
$('#mem_code').val(mdata[1]);
$('#row_dim1').show();
$('#row_dim').hide();
//$('#state_id').val('').removeAttr('disabled');
//$('#dist_id').val('').removeAttr('disabled');
$('#memcode').attr('disabled', 'disabled');
$('#company_other_state').val('').attr('disabled', 'disabled');
getSch();
} else if (data == 'registered') {
alert('You are Already Register');
} else {
alert('Please Enter Valid member code');
location.reload();
}
}
});
}
}
</script>
<script>
$(function() {
$.validate({
form: '#loginform',
scrollToTopOnError: false,
onSuccess: function() {
$('#loginform button').button('loading');
$('#loginform .alert').hide();
$.post('logincheck.php', $('#loginform').serialize(), function(data) {
$('#password').val('');
if (data == 'success') {
$('#loginform').siblings('.alert-success').fadeIn();
$('#loginform').remove();
setTimeout(location = $('#redirect_url').val(), 3000);
} else if (data.substr((data.length) - 4, 4) == '.php') location = data;
else {
$('#loginform .alert-danger').html(data).show();
$('#password').focus();
$('#loginform button').button('reset');
}
});
return false;
}
});
$.validate({
modules: 'security,file',
form: '#registerform',
scrollToTopOnError: false,
onSuccess: function() {
$('#registerform button').button('loading');
$('#registerform .alert').hide();
$.ajax({
type: 'POST',
url: 'register_save.php',
data: new FormData($('#registerform')[0]),
contentType: false,
processData: false,
success: function(data) {
//alert(data);
$('#regpassword').val('');
if (data == 'success') {
$('#registerform').siblings('.alert-success').fadeIn();
$('#registerform').remove();
setTimeout(location = '?msg=register_success', 3000);
} else if (data.substr((data.length) - 4, 4) == '.php') location = data;
else if (data == '') {
$('#registerform .alert-danger').html('The Validation code does not match!').show();
} else {
$('#registerform .alert-danger').html(data).show();
$('#registerform button').button('reset');
}
}
});
return false;
}
});
});
$('#reglogbtn').click(function() {
$('#loginsection').slideUp();
$('#regsection').slideDown();
return false;
});
$('#reglogbtn2').click(function() {
$('#regsection').slideUp();
$('#loginsection').slideDown();
return false;
});
function getSch() {
if ($('#country_id').val() != '') {
$('#state_id').load('citylist.php', {
country_id: $('#country_id').val()
},
function() {}
).removeAttr('disabled');
} else {
$('#state_id').val('').attr('disabled', 'disabled');
$('#dist_id').val('').attr('disabled', 'disabled');
}
}
function getdist() {
if ($('#state_id').val() != '') {
$('#dist_id').load('distlist.php', {
state_id: $('#state_id').val()
},
function() {}
).removeAttr('disabled');
} else {
$('#dist_id').val('').attr('disabled', 'disabled');
}
}
$(function() {
$('#row_dim1').hide();
$('#state_id').val('').attr('disabled', 'disabled');
$('#dist_id').val('').attr('disabled', 'disabled');
$('#country_id').change(function() {
//alert($('#country_id').val());
if ($('#country_id').val() != '101~India') {
$('#row_dim').show();
$('#row_dim1').hide();
$('#state_id').val('').attr('disabled', 'disabled');
$('#dist_id').val('').attr('disabled', 'disabled');
$("#company_other_state").removeAttr('disabled');
} else if ($('#country_id').val() == '101~India') {
//alert('me');
$('#row_dim1').show();
$('#row_dim').hide();
$('#company_other_state').val('').attr('disabled', 'disabled');
}
});
});
</script>
<script>
function enableDisable(bEnable, textBoxID) {
document.getElementById(textBoxID).disabled = !bEnable
}
</script>
<?php include_once("footer.inc.php");
connClose(); ?>
xRyukZ - Copyright 2k19