OverLord Shell
<?php
session_start();
$url = $_SESSION['url'];
include("db/conn.php");
if(!empty($_SESSION['loggedin_user']) && $_SESSION['loggedin_user'] == 'company'){
header("location:index.php");
}
include_once("header.inc.php");
?>
<section>
<div class="container">
<?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 }?>
<?php
if($_GET['msg']=='password_change'){ ?>Password changed Successfully<?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>
<article class="col-xs-12 col-sm-6 col-md-5 col-lg-5">
<div class="block-form box-border wow fadeInRight animated" data-wow-duration="1s">
<div class="row" id="loginsection">
<div class="col-md-12">
<h3 class="page-header">Login</h3>
</div>
<div class="col-sm-9">
<form id="loginform" role="form">
<div class="form-group">
<label>Email</label>
<input type="text" class="form-control" name="username" id="username" maxlength="50" data-validation="required" data-validation-error-msg="Invalid email">
</div>
<div class="form-group">
<label>Password</label>
<input type="password" class="form-control" name="password" id="password" maxlength="30" data-validation="required" data-validation-error-msg="Invalid Password">
</div>
<div class="form-group">
<label>Role</label>
<select class="form-control" name="role" id="role" data-validation="required">
<option value="">--Select--</option>
<option value="bs">Business</option>
<option value="jb">Job Seeker</option></select>
</div>
<div class="alert alert-danger displaynone"></div>
<button type="submit" class="btn-bd hvr-outline-out" data-loading-text="Logging In...">Log In</button>
<a href="forgotpass.php" class="btn btn-link pull-right">Forgot Password?</a>
</form>
<div class="displaynone">Login Successful. Loading . . .</div>
<div class="clearfix mbl"></div>
<p class="text-center">Not a member ? <a href="register" class="btn btn-link" id=""><strong>Register Here</strong></a></p>
</div>
</div>
</div>
</article>
<article class="col-xs-12 col-sm-6 col-md-7 col-lg-7">
<div class="block-form box-border wow fadeInLeft animated" data-wow-duration="1s">
<div class="row" style="padding-top: 3%;">
<img src="images/slider/coupons.jpg" style="height:281px" />
</div>
</div>
</article>
</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 == 'redirect') {
$('#loginbox').remove();
$('.note-success').fadeIn();
location='<?php echo $url ?>';
}
if (data == 'admin') {
$('#loginbox').remove();
$('.note-success').fadeIn();
location='bd-admin/index.php';
}
if (data == 'job') {
$('#loginbox').remove();
$('.note-success').fadeIn();
location='candidatec.php';
}
var res = data.split("~");
if (res[0] == 'success' && (res[1]==3 || res[1]==2)) {
$('#loginform').fadeIn();
$('#loginform').remove();
location = 'multicomp.php?msg=add_success1';
} else if (res[0] == 'success' && res[1]==0) {
$('#loginform').siblings('.alert-success').fadeIn();
$('#loginform').remove();
location = 'plansadd.php?msg=add_success';
} else if (res[0].substr((res[0].length) - 4, 4) == '.php') location = res[0];
else {
$('#loginform .alert-danger').html(res[0]).show();
$('#password').focus();
$('#loginform button').button('reset');
}
});
return false;
}
});
});
</script>
<?php include_once("footer.inc.php");connClose();?>
xRyukZ - Copyright 2k19