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/uds.cafsinfotech.in/application/views_bk/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">
            <?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/smart_hrms.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 -->

				<!-- JCONFIRM -->
					<script src="dist/jquery_confirm/jquery-confirm.min.js"></script>
					<link rel="stylesheet" type="text/css" href="dist/jquery_confirm/jquery-confirm.min.css"/>	
				<!-- JCONFIRM -->
	
            <?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;
		}
		.jumbotron {
			background-color: #ffffff;
			color: #000000;
			font-weight: bold;
		}
		#timer{
	   		border	: 1px solid red; 
			padding	: 6px;
			bottom	: 9px;
			position:relative;
	   		border-radius: 50%;
	   		border-width: 3px;
	   		text-align: center;
		}
		a{
		    cursor: pointer;
		}
		
	</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 cont_bg_login">
			<div class="container" style='margin-top:30px;border-radius:3px;margin-bottom: 15px;'>
				<div class='row' style="box-shadow: 0 1px 6px 0 rgba(32,33,36,0.28); border-color: rgba(223,225,229,0); background-color: #fff;border-radius:11px;">
					<div class='col-md-8'>
						<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
						<!-- Indicators -->
							<ol class="carousel-indicators">
								<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
								<li data-target="#carousel-example-generic" data-slide-to="1"></li>
								<li data-target="#carousel-example-generic" data-slide-to="2"></li>
								<li data-target="#carousel-example-generic" data-slide-to="3"></li>
								<li data-target="#carousel-example-generic" data-slide-to="4"></li>
							</ol>

						<!-- Wrapper for slides -->
							<div class="carousel-inner" role="listbox">
								<div class="item active">
									<img src='./images/smart.png'>
								</div>
								<div class="item">
									<img src='./images/toll.png'>
								</div>
								<div class="item">
									<img src='./images/payroll.png'>
								</div>
								<div class="item">
									<img src='./images/report.png'>
								</div>
								<div class="item">
									<img src='./images/imple.png'>
								</div>
							</div>

						<!-- Controls -->
							<a class="left carousel-control" style="background-image: none;" href="#carousel-example-generic" role="button" data-slide="prev">
								<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
								<span class="sr-only">Previous</span>
							</a>
							<a class="right carousel-control" style="background-image: none;" href="#carousel-example-generic" role="button" data-slide="next">
								<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
								<span class="sr-only">Next</span>
							</a>
						</div>
					</div>
					<div class='col-md-4' style='padding: 0px; border-color: rgba(223,225,229,0); border-radius: 11px;'>
						<!-- <div style="color:red;font-size: 16px;">Note : Our HRMS(CAFSINDIA & PATRONISS) link will be in downtime between 04:00 PM to 07:00 PM for Server maintenance and the migration process to takes place. We apologize in advance for any inconvenience it may cause.</div> -->
						<div style='padding: 8px; background-color: #fff; border-radius: 11px;'>
							<div id='corporate' style='padding:0px 9px;'>
								<?php 
								if($company_info[0]->company_logo){
								?>
								<div style='text-align:center;'>
									<img src="<?php echo base_url($company_info[0]->company_logo); ?>" width="150px" height="150px">
									<!-- <h5 style="color:#0763b5;"><b>UDS<b><h5> -->
								</div>
								<?php 
								}
								else{
									echo $company_info[0]->company_short_name;
								}								
								?>
								<h4 class='login_tab_head'>FMS 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 Employee Code")); ?>
									</div>
									<div class="form-group">
										<?php echo form_password(array('name'=>'corp_password', 'id' => 'corp_password', 'class'=>'form-control','placeholder'=> "Enter Password")); 

										echo "<span toggle='#corp_password' class='fa fa-fw fa-eye field-icon toggle_password'></span>";
										?>
									</div>
								<div style="display:none;" id="otp_input">
									<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 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>
								</div>

								<div id = "show_password" style="display:none;">
									<div class="form-group">
										<?php 
										echo form_input(array('name'=>'cur_status', 'id' => 'cur_status','value'=>'0','class'=>'form-control','type'=> "hidden"));
										echo form_password(array('name'=>'new_password', 'id' => 'new_password', 'class'=>'form-control ignore','placeholder'=> "Enter New Password")); ?>
									</div>
									<div class="form-group">
										<?php echo form_password(array('name'=>'confirm_password', 'id' => 'confirm_password', 'class'=>'form-control ignore','placeholder'=> "Enter Confirm Password")); 
										echo "<span toggle='#confirm_password' class='fa fa-fw fa-eye field-icon conf_password'></span>";
										?>
									</div>
								</div>	
									<button class="btn btn-block btn-primary log_btn" id='corp_submit'>Submit</button>
									
									<a id='forgot_password'><span style="font-weight: bold;">Reset Password</span></a><br>
									<div id='home_redirect' style='display:none;'>
										<a href='' id='back_to_login'><span style="font-weight: bold;">Back to Login</span></a><br>
									</div>
								<?php echo form_close(); ?>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<?php $this->load->view("partial/footer"); ?>
		<script type="text/javascript">
	$(document).ready(function(){
		$("#corp_login").submit(function(event){ event.preventDefault(); }).validate({
			rules:{
				corp_user_name:'required',
				corp_password :'required',
				corp_otp      :'required',
				new_password  : {
					required  : true,
					minlength : 8,
					maxlength : 12,
					passwordFormatCheck: true,
				},
				confirm_password: {
					required  : true,
					equalTo   : "#new_password"
				}
			},
			messages: {
				new_password  : {
					required  : " Enter New Password",
					minlength : "Your Password Must Be Minimum 8 and Maximum 12 Characters Long",
					maxlength : "Your Password Must Be Minimum 8 and Maximum 12 Characters Long",
					passwordFormatCheck: "Your password must be one number(0-9) and one special character(@/$) and alphabets(a-z,A-Z)"
				},
				confirm_password: {
					required  : " Enter Confirm Password",
					equalTo   : " Enter Confirm Password Same as New Password"
				}
			},
			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");
						//ALREADY LOGIN USER SUCCESS 
						if(parseInt(response.cur_status) === 0){
							toastr.success(response.message);
							location.reload();
						}else	//FIRST TIME LOGIN USER CHANGE FIRSTLOGIN 2 FOR SEND OTP
						if(parseInt(response.cur_status) === 1) {
							toastr.success(response.message);
							$('#corp_user_name,#corp_password').parent().hide();
							$('#heading').hide();
							$('#otp_input').show();
							$('#cur_status').val('2');
							mytimer(20);
						}else	//LOGIN WITH OTP DISPLAY TIMER
						if(parseInt(response.cur_status) === 10) {
							toastr.success(response.message);
							$('#corp_user_name,#corp_password').parent().hide();
							$('.toggle_password').hide();
							$('#heading').hide();
							$('#otp_input').show();
							$('#cur_status').val('9');
							mytimer(120);
						}else	//OTP INPUT FIELD
						if(parseInt(response.cur_status) === 2){ //SHOW PASSWORD CONFIRM PASSWORD FIELD
							toastr.success(response.message);
							$('#otp_input,#forgot_password').hide();
							$('#show_password').show();
							$('#cur_status').val('3');
						}else
						if(parseInt(response.cur_status) === 3){    //RESEND OTP SUCCESS MESSAGE
							toastr.success(response.message);
							location.reload();
						}else
						if(parseInt(response.cur_status) === 4){  //FOR RESEND OTP INPUT
							toastr.success(response.message);
							$('#otp_input').show();
							$('#corp_user_name,#forgot_password').hide();
							$('#cur_status').val('5');
							mytimer(120);
						}else
						if(parseInt(response.cur_status) === 6){ // FOR NEW PASSWORD CONFIRM PASSWORD
							toastr.success(response.message);
							$('#otp_input').hide();
							$('#forgot_password').show();
							$('#show_password').show();
							$('#confirm_password,#new_password').show();
							$('#cur_status').val('7');
						}else
						if(parseInt(response.cur_status) === 8){ //FINAL SUCCESS AND REDIRECT
							toastr.success(response.message);
							location.reload();
						}else
						if(parseInt(response.cur_status) === 9){ //Session exist Confirmation	
							$.confirm({
								title    : 'Session Already Exist',
								icon     : 'fa fa-sign-in',
								theme    : 'material',
								type     : 'black',
								content  : response.message,
								escapeKey: 'Yes',
								onOpenBefore: function(){
								},
								buttons:{
									Yes:function(){
							        	$("#cur_status").val('9');
										$("#corp_submit").trigger("click");
							        },
									tryAgain:{
							            text: 'No',
							            btnClass: 'btn-red',
							            action: function(){
											//close
							            }
							        }
								}
							});
						}else{
							toastr.error(response.message);
						}
					},
					dataType: 'json'
				});
			}
		});
		//PASSWORD PATTERN METHOD FUNCTION(MUST TO INCLUDE SPECIAL CHARACTERS)
		$.validator.addMethod("passwordFormatCheck", function(value, element) {
   			 return this.optional(element) || /^(?=.*\d)(?=.*[A-Z])(?=.*\W).*$/i.test(value);
		}, 'Password must contain one capital letter,one numerical and one special character');

		//RESEND OTP ONCLICK FUNCTION
		$("#resend_otp").click(function(){
			var send_url = '<?php echo site_url("login/resend_otp"); ?>';
			$("#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.resend_otp === '2'){
						toastr.success(rslt.message);
						$('#resend_otp').hide();
						$('#timer').show();
						$('.numberCircle').show();
						mytimer(120);
					}else{
						toastr.error(rslt.message);
					}
					$('#resend_otp').attr('disabled',false);
					$("#resend_otp").html("Resend Otp");
				},
			});
		});
		//FORGOT PASSWORD CLICK FUNCTION START
		$('#forgot_password').on('click',function(){
			$('#corp_password,#forgot_password,.toggle_password').hide();
			$('#home_redirect').show();
			$('#heading').html('Forgot Password');
			$('#cur_status').val('4');

		});

		//FUNCTION FOR PASSWORD SHOW AND HIDE
		$(".toggle_password,.conf_password").click(function() {
		$(this).toggleClass("fa-eye fa-eye-slash");
		var input = $($(this).attr("toggle"));
		if (input.attr("type") == "password") {
		  input.attr("type", "text");
		} else {
		  input.attr("type", "password");
		}
		});
	});
	//FUNCTION FOR OTP SECONDS TIMER
	function mytimer(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,#re_otp').show();
				$("#timer").hide();
				$('.numberCircle').hide();
			} 
		}, 1000);
	}
	function set_session(){

	}

	</script>
	</body>
</html>