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");
?>
<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'){?>Please check your Company Email for password.<?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>
<section>
<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">Create new <span>Account</span></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="#">
<div class="form-group">
<div class="row">
<div class="page-header">
<small><h4><i class="fa fa-building mrm"></i>Register</h4></small>
</div>
<div class="col-sm-9">
<div class="form-group">
<div class="col-sm-4"> <label>Company Name <span class="require">*</span></label>
</div>
<div class="col-sm-8">
<input type="text" class="form-control " name="company_name" id="company_name" maxlength="100" data-validation="required" data-validation-error-msg="Invalid Company Name">
</div>
</div>
<!--<div class="form-group">
<div class="col-sm-4"><label>User Name <span class="require">*</span></label>
</div>
<div class="col-sm-8">
<input type="text" class="form-control" name="username" id="username" maxlength="100" data-validation="required" data-validation-error-msg="Invalid Company Address">
</div>
</div>-->
<div class="form-group">
<div class="col-sm-4"> <label>Company Address <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_address" id="company_address" maxlength="100" data-validation="required" data-validation-error-msg="Invalid Company Address">
</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="country_id" 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" data-validation="number length" data-validation-length="6-6" data-validation-error-msg="Invalid Pincode" data-validation-optional="true">
</div>
</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="10" data-validation="number" data-validation-error-msg="Invalid Mobile No." data-validation-optional="true">
</div>
</div>
</div>
<div class="col-sm-9">
<div class="alert alert-danger displaynone"></div>
<button type="submit" class="btn-bd hvr-outline-out" data-loading-text="Registering...">Register</button>
</div>
<div class="alert alert-success displaynone">Registration Successful. Loading . . .</div>
<div class="clearfix mbl"></div>
<p class="text-center">Already a member? <a href="login.php" class="btn btn-link" >Login Here</a></p>
</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/coupons.jpg" style="height:281px" />
</div>
</article>
</div>
</div>
</div>
</div>
</div>
</section>
<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{
$('#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();
$('#country_id').change(function(){
alert($('#country_id').val());
if($('#country_id').val() != '101~India') {
$('#row_dim').show();
$('#row_dim1').hide();
} else if($('#country_id').val() == '101~India')
{
$('#row_dim1').show();
('#row_dim').hide();
}
});
});
</script>
<?php include_once("footer.inc.php");connClose();?>
xRyukZ - Copyright 2k19