File: //home/cafsindia/wealth_cafsindia_com/application/views/login.php
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<base href="<?php echo base_url(); ?>" />
<title><?php echo $this->config->item('company') . ' | ' . 'CRM - © CAFS Infotech'. date("Y"); ?></title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png">
<?php if ($this->input->cookie('debug') == "true" || $this->input->get("debug") == "true") : ?>
<?php $this->load->view('partial/header_debug'); ?>
<?php else : ?>
<!--[if lte IE 8]>
<link rel="stylesheet" media="print" href="css/print.css" type="text/css" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="dist/bootstrap.min.css?rel=<?php echo date('Ymd');?>"/>
<link rel="stylesheet" type="text/css" href="dist/cafs_wealth.css?rel=<?php echo date('Ymd');?>"/>
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="dist/font-awesome.min.css"/>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=<?php echo date('Ymd');?>"></script>
<script type="text/javascript" src="dist/validate.js?rel=<?php echo date('Ymd');?>"></script>
<!-- DATE TIME PICKER -->
<link rel="stylesheet" type="text/css" href="dist/bootstrap-datetimepicker-master/build/css/bootstrap-datetimepicker.min.css"/>
<script type="text/javascript" src="dist/bootstrap-datetimepicker-master/build/js/bootstrap-datetimepicker.min.js"></script>
<!-- DATE TIME PICKER -->
<!-- DATA TABLE -->
<link rel="stylesheet" type="text/css" href="dist/data_table/datatables.min.css"/>
<script type="text/javascript" src="dist/data_table/datatables.min.js"></script>
<!-- DATA TABLE -->
<!-- MULTI SELECT -->
<link rel="stylesheet" type="text/css" href="dist/select2/dist/css/select2.min.css"/>
<script src="dist/jquery-typeahead/dist/jquery.typeahead.min.js"></script>
<script src="dist/select2/dist/js/select2.full.min.js"></script>
<!-- MULTI SELECT -->
<!-- TOASTR -->
<script src="dist/toastr/toastr.js"></script>
<link rel="stylesheet" type="text/css" href="dist/toastr/toastr.css"/>
<!-- TOASTR -->
<?php endif; ?>
<?php $this->load->view('partial/lang_lines'); ?>
<?php $this->load->view('partial/header_js'); ?>
</head>
<style>
.form-group {
width: 100% !important;
margin-left: 0px !important;
margin-bottom: 30px !important;
}
.tab_head {
color: #00b0eb;
margin: 15px 0px !important;
text-align: left;
font-size: 15px;
font-weight: bold;
}
</style>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href=""><?php echo $this->config->item('company');?></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li ><a href="#" id="liveclock"><?php echo date($this->config->item('dateformat') . ' ' . $this->config->item('timeformat')) ?></a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fulid" style='margin-top:0px;'>
<div class="container" style='margin-top:30px;box-shadow:0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2);border-radius:3px;margin-bottom: 15px;'>
<div class='row'>
<div class='col-md-8'>
<div class='row' style='text-align: center;margin:0px;'>
<img src='./images/cafs.png' style='height:175px;margin-top:35px;'>
</div>
<h1 style='margin:8px;font-size:22px;text-align:center;color:#00b0eb;'><?php echo $this->config->item('company');?></h1>
</div>
<div class='col-md-4' style='padding:0px;border-left: 1px dashed #CCCCCCCC;'>
<ul class='nav nav-tabs' data-tabs='tabs'>
<li role='presentation' class="active">
<a data-toggle='tab' href='#customer_tab'>Customer</a>
</li>
<li role='presentation'>
<a data-toggle='tab' href='#corporate_tab'>Corporate</a>
</li>
</ul>
<div class='tab-content' style='padding:8px;'>
<div class='tab-pane active' id='customer_tab' style='padding:0px 9px;'>
<h4 class='tab_head'>Customer Login</h4>
<?php echo form_open("login/cust_login/",array("id"=>"cust_login","class"=>"form-inline"));?>
<div class="form-group" style='width: 100%; margin-left: 0px; margin-bottom: 20px;'>
<?php echo form_input(array("name"=>"cust_user_name", "id"=>"cust_user_name","value"=>"","placeholder"=>"Enter user name or user id", "class"=>"form-control input-sm")); ?>
</div>
<div class="form-group" style='width: 100%; margin-left: 0px; margin-bottom: 20px;'>
<?php echo form_password(array('name'=>'cust_password', 'id' => 'cust_password', 'class'=>'form-control','placeholder'=> "Enter Password")); ?>
</div>
<button class="btn btn-block btn-primary" id='cust_submit'>Submit</button>
<?php echo form_close(); ?>
</div>
<div class='tab-pane' id='corporate_tab' style='padding:0px 9px;'>
<h4 class='tab_head'>Corporate Login</h4>
<?php echo form_open("login/corp_login/",array("id"=>"corp_login","class"=>"form-inline"));?>
<div align="center" style="color:red"><?php echo validation_errors(); ?></div>
<div class="form-group">
<?php echo form_input(array('name'=>'corp_user_name', 'id'=>'corp_user_name', 'class'=>'form-control','placeholder'=> "Enter User Name")); ?>
</div>
<div class="form-group">
<?php echo form_password(array('name'=>'corp_password', 'id' => 'corp_password', 'class'=>'form-control','placeholder'=> "Enter Password")); ?>
</div>
<button class="btn btn-block btn-primary" id='corp_submit'>Submit</button>
<?php echo form_close(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php $this->load->view("partial/footer"); ?>
<script type="text/javascript">
$(document).ready(function(){
$("#cust_login").submit(function(event){ event.preventDefault(); }).validate({
rules:{
cust_user_name:'required',
cust_password:'required',
},
submitHandler: function (form){
$("#cust_submit").html("<i class='fa fa-spinner fa-spin'></i> Processing...");
$('#cust_submit').attr('disabled','disabled');
$(form).ajaxSubmit({
success: function (response){
$('#cust_submit').attr('disabled',false);
$("#cust_submit").html("Submit");
if(response.success){
toastr.success(response.message);
location.reload();
}else{
toastr.error(response.message);
}
},
dataType: 'json'
});
}
});
$("#corp_login").submit(function(event){ event.preventDefault(); }).validate({
rules:{
corp_user_name:'required',
corp_password:'required',
},
submitHandler: function (form){
$("#corp_submit").html("<i class='fa fa-spinner fa-spin'></i> Processing...");
$('#corp_submit').attr('disabled','disabled');
$(form).ajaxSubmit({
success: function (response){
$('#corp_submit').attr('disabled',false);
$("#corp_submit").html("Submit");
if(response.success){
toastr.success(response.message);
location.reload();
}else{
toastr.error(response.message);
}
},
dataType: 'json'
});
}
});
});
</script>
</body>
</html>