MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/login_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 - &copy; CAFS Infotech'. date("Y"); ?></title>
        <link rel="shortcut icon" type="image/x-icon" href="images/favicon.png">    
        
		<!--[if lte IE 8]>
			<link rel="stylesheet" media="print" href="css/print.css" type="text/css" />
		<![endif]-->
		
		<!-- COMMON CSS & JS -->		
		<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_login.css?rel=<?php echo date('Ymd');?>"/>	
		<!--<link rel="stylesheet" type="text/css" href="dist_bk/login_master_css.css?rel=<?php echo date('Ymd');?>"/>-->	
		<script type="text/javascript" src="dist/jquery.min.js?rel=<?php echo date('Ymd');?>"></script>		
		<script type="text/javascript" src="dist/opensourcepos.min.js?rel=<?php echo date('Ymd');?>"></script>
		
		<!-- PLUGIN CSS -->				
		<link rel="stylesheet" type="text/css" href="dist/font-awesome.min.css"/>
		<link rel="stylesheet" type="text/css" href="dist/bootstrap-datetimepicker-master/build/css/bootstrap-datetimepicker.min.css"/>
		<link rel="stylesheet" type="text/css" href="dist/data_table/datatables.min.css"/>
		<link rel="stylesheet" type="text/css" href="dist/select2/dist/css/select2.min.css"/>
		<link rel="stylesheet" type="text/css" href="dist/toastr/toastr.css"/>
		<link rel="stylesheet" type="text/css" href="dist/froala/froala_editor.pkgd.min.css"/>
		<link rel="stylesheet" type="text/css" href="dist/froala/froala_style.min.css"/>
		<link rel="stylesheet" type="text/css" href="dist/jquery_confirm/jquery-confirm.min.css" rel="stylesheet" />	
		<?php $this->load->view('partial/lang_lines'); ?>
    </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>
			<div class="container-fluid">
				<div class="row bg_color_mob">
					<div class="col-md-12" style="background-image: url(./images/cafs_bg.png); font-family: poppins; background-repeat: no-repeat; height: 100vh; background-size: cover;">
						<div class="col-md-8 mobhide" style="margin-top:14%;">
							<h1 style="color:#fff;margin-bottom:20px;">The Way Monitoring Clients!</h1>
							<p style="color:#fff;font-size:17px;margin-bottom:20px;">An effective lead follow-up system that is use to provide gentle and timely</br> reminders showing the past and the current customers your interest in</br> their needs and considerate enough to keep in touch.</p>
							<div class="col-md-12">
								<div class="col-md-2">
									<img src="./images/bar.png" style="max-width:49px;">
								</div>
								<div class="col-md-2">
									<img src="./images/pie.png" style="max-width:49px;">
								</div>
								<div class="col-md-2">
									<img src="./images/bank.png" style="max-width:49px;">
								</div>
							</div>
						</div>
						<div class="col-md-4" style="height: 94%;">
							<div class='login_card' style='margin-top: 49%;'>
								<div class="tabbable boxed parentTabs">
									<div style='text-align:center;'><img src="./images/logo.png" class="login_logo black_logo" style='max-width:150px !important;'></div>
									<div style='text-align:center;'><img src="./images/logowhite.png" class="login_logo white_logo" style='max-width:150px !important;'></div>
								<?php echo form_open("login/corp_login/",array("id"=>"corp_login","class"=>"form-inline",'autocomplete'=>'off'));?>
									<div align="center" style="color:red"><?php echo validation_errors(); ?></div>
									<div class="form-group login_form">
										<?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 login_form">
										<?php echo form_password(array('name'=>'corp_password', 'id' => 'corp_password', 'class'=>'form-control','placeholder'=> "Enter Password")); ?>
									</div>
									<button class="btn-block btn-primary btn_login" id='corp_submit'>Login</button>
									<br>
									<a href="https://login.cafsindia.com/cafsapk/cafs360.apk"><img src="./images/playstore.png" alt="" style="height: 45px;"></a>
								<?php echo form_close(); ?>
<!-- 									<div id = "check_otp" style = "display: none;"> -->
									<?php echo form_open("login/corp_login_otp/",array("id"=>"corp_login_otp","class"=>"form-inline",'autocomplete'=>'off',"style"=>"display:none;"));?>
										<div align="center" style="color:red"><?php echo validation_errors(); ?></div>
										<div class="form-group login_form">
											<?php echo form_input(array('name'=>'corp_otp', 'id'=>'corp_otp', 'class'=>'form-control','placeholder'=> "Enter OTP")); ?>
										</div>
										<a href = "#resend_otp" id='resend_otp' style="display: none; color: red;"><span style="font-weight: bold;">Resend Otp</span></a>

										<p class="numberCircle"><span id='timer'></span></p>

										<button class="btn-block btn-primary btn_login" id='corp_otp_submit' style=" margin-top: 30px;">Submit</button>
									<?php echo form_close(); ?>
									<!-- <div id='otp_div' style = "display:none; margin: 50px 150px; max-height: 20px;">
										<button class="btn btn-info" id='resend_otp' style="padding: 8px;">Resend Otp</button>
									</div> -->
									<!-- </div> -->
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>	
<?php $this->load->view("partial/footer"); ?>
<script type="text/javascript">
$(document).ready(function(){
	/* Tab and input Hide show START */
	//$("#corp_login_otp").hide();
	$("ul.nav-tabs a").click(function (e) {
	  e.preventDefault();
	  $(this).tab('show');
	});
	$("#register_type").change(function (e) {
	  e.preventDefault();
	  var register_type = $("#register_type").val();
	  if(register_type === "3"){
	  	$('#password,#confirm_password').closest("div.form-group").show();
	  }else{
	  	$('#password,#confirm_password').closest("div.form-group").hide();
	  }
	});
	/* Tab and input Hide show END */
	$("#candidate_login").submit(function(event){ event.preventDefault(); }).validate({
		rules:{
			candidate_user_name:'required',
			candidate_password:'required',
		},
		submitHandler: function (form){
			$("#candidate_submit").html("<i class='fa fa-spinner fa-spin'></i> Processing...");
			$('#candidate_submit').attr('disabled','disabled');
			$(form).ajaxSubmit({
				success: function (response){
					$('#candidate_submit').attr('disabled',false);
					$("#candidate_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();
						//IF CONDITION FOR CHECK A OTP GENERATE YEAROR NO
						if(parseInt(response.login_with_otp) === 1){
							$("#corp_login").hide();
							$("#corp_login_otp").show();
							mytimer(120);
						}else{
							 location.reload();
						}
						
					}else{
						toastr.error(response.message);
						$("#corp_login_otp").hide();
					}
				},
				dataType: 'json'
			});
		}
	});

	$("#corp_login_otp").submit(function(event){ event.preventDefault(); }).validate({
		rules:{
			corp_otp:'required',
		},
		submitHandler: function (form){
			$("#corp_otp_submit").html("<i class='fa fa-spinner fa-spin'></i> Processing...");
			$('#corp_otp_submit').attr('disabled','disabled');
			$(form).ajaxSubmit({
				success: function (response){
					$('#corp_otp_submit').attr('disabled',false);
					$("#corp_otp_submit").html("Submit");
					if(response.success){
						toastr.success(response.message);
						location.reload();
						// $("#corp_login").hide();
						// $("#corp_login_otp").show();
						// mytimer(2);
					}else{
						toastr.error(response.message);
					}
				},
				dataType: 'json'
			});
		}
	});
	//RESEND OTP FUNCTION FOR REACH A TIMER TIME
	// $('#otp_div').hide();
	$("#resend_otp").click(function(){
		var send_url = '<?php echo site_url("login/resend_otp/resend"); ?>';
		$("#resend_otp").html("<i class='fa fa-spinner fa-spin'></i> Processing...");
		$('#resend_otp').attr('disabled','disabled');
		$.ajax({
			type: "POST",
			url: send_url,
			success: function(data) {
				var rslt = JSON.parse(data);
				if(rslt.success){
					toastr.success(rslt.message);
					// $("#corp_login_otp").show();
					$('#resend_otp').hide();
					$('#timer').show();
					$('.numberCircle').show();
					mytimer(120);
				}else{
					toastr.error(rslt.message);
				}
				$('#resend_otp').attr('disabled',false);
				$("#resend_otp").html("Resend Otp");
			},
		});
	});

	var value = $("#password").val();
	$.validator.addMethod("checklower", function(value) {
	  return /[a-z]/.test(value);
	});
	$.validator.addMethod("checkupper", function(value) {
	  return /[A-Z]/.test(value);
	});
	$.validator.addMethod("checkdigit", function(value) {
	  return /[0-9]/.test(value);
	});
	$.validator.addMethod("pwcheck", function(value) {
	  return /^[A-Za-z0-9\d=!\-@._*]*$/.test(value) && /[a-z]/.test(value) && /\d/.test(value) && /[A-Z]/.test(value);
	});
	$("#signup_form").submit(function(event){ event.preventDefault(); }).validate({
		rules:{
			register_type:'required',
			name:'required',
			mobile: {
                required: true,
                minlength: 10,
                maxlength: 10,
                number: true
            },
			email:'required',
			password: {
				required: true,
				checklower: true,
				checkupper: true,
				checkdigit: true,
				minlength: 8
            },
			confirm_password:
			{
				required: true,
 				equalTo: "#password"
			},
		},
		messages: {
		    password: {
		      pwcheck: "Password is not strong enough",
		      checklower: "Need atleast 1 lowercase alphabet",
		      checkupper: "Need atleast 1 uppercase alphabet",
		      checkdigit: "Need atleast 1 digit"
		    }
		  },
		submitHandler: function (form){
			$("#signup_submit").html("<i class='fa fa-spinner fa-spin'></i> Processing...");
			$('#signup_submit').attr('disabled','disabled');
			$(form).ajaxSubmit({
				success: function (response){
					$('#signup_submit').attr('disabled',false);
					$("#signup_submit").html("Submit");					
					if(response.mode === "EXIST"){
						toastr.warning(response.message);
						setTimeout(function(){ window.location.replace('<?php //echo base_url('marina.php/Login'); ?>'); }, 3000);
					}else{
						toastr.success(response.message);
						$("#signup_form")[0].reset();
					}
				},
				dataType: 'json'
			});
		}
	});
});

//OTP TIMER SET FUNCTION	
function mytimer(sec) {
	// console.log(sec);
	if (timer) clearInterval(timer);
	timer = setInterval(function() { 
		$('#timer').text(sec--);
		if (sec == -1) {
			clearInterval(timer);
			toastr.error('If OTP not Received? Please Click Resend OTP!!');
			$('#resend_otp').show();
			$("#timer").hide();
			$('.numberCircle').hide();
			// $("#corp_login_otp").hide();
			
		} 
	}, 1000);
}
</script>
</body>
<style>
.numberCircle {
	border-radius: 50%;
	width: 36px;
	height: 36px;
	padding: 8px;
	background: #fff;
	border: 2px solid #666;
	color: blue;
	text-align: center;
	margin-left: 30px;
	margin-top: 8px;
}
</style>
</html>