HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/www/manage.beatleanalytics.com/updateleave.php
<?php
	$leaveCouXy = date("Y");
	if(date("m") == 1){
		$leaveCouXm = 12;
		$leaveCouXy = date("Y") - 1;
	}else{
		$leaveCouXm = date("m");
	}
	
	$SQL_L = "SELECT * FROM leave_update_content WHERE `Month` = ".$leaveCouXm." AND `Year` = ".$leaveCouXy." ";
	$rsLeaveContentUp =  $objDB->sql_query($SQL_L);

	$SQL_E = "SELECT COUNT(EmployeeID) AS TotalEmployee FROM employee";
	$rsCTEFXX =  $objDB->sql_query($SQL_E);
	
	if((count($rsLeaveContentUp) <= 0 || $rsLeaveContentUp[0]['IsInserted'] == 'N') && $rsCTEFXX[0]['TotalEmployee'] > 0){ ?>
	<script type="text/javascript">
	
		$(document).ready(function(e) {
			var lvCountStr = "m=<?php echo $leaveCouXm?>&y=<?php echo $leaveCouXy?>";
			if (window.XMLHttpRequest) {
				// code for IE7+, Firefox, Chrome, Opera, Safari
				xmlhttp=new XMLHttpRequest();
			} else { // code for IE6, IE5
				xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
			}	
				xmlhttp.onreadystatechange=function() {
				if (xmlhttp.readyState==4 && xmlhttp.status==200)
				{
					var vArr = eval(xmlhttp.responseText);
					
					document.getElementById("leaveResult").innerHTML  = '<i style="font-size:70px;" class="fa fa-smile-o"></i><br><br>'+vArr[0];
					document.getElementById("leaveContent").style.display = "none";
					document.getElementById("popupfoot").style.display = "";
					document.getElementById("keepPat").style.display = "none";
					
				}			
			}
			xmlhttp.open("GET","cronjob/monthly_leave_count.php?data="+base64_encode(lvCountStr),true);
			xmlhttp.send();		   
		});
		
		setTimeout(function(){ $("#keepPat").fadeIn("slow");},10000);
    </script>
    <div id="boxes">
      <div id="dialog" class="window">
            <span id="leaveContent"> <img src="<?php echo _IMAGEPATH_?>/loading2.gif"> <br /><br />Please wait... <br /> for updating monthly leave deatils </span>
            <div id="leaveResult" style="color: green;font-size: 30px;"></div>
            <div id="keepPat" style="color:red; display:none;"> Please keep patience while update data. </div>
        <div id="popupfoot" style="display:none;"> <a href="#" style="color:red;" class="close agree">Close</a>  </div>
      </div>
      <div id="mask"></div>
    </div>
    <script>
    $(document).ready(function() {	
    
    var id = '#dialog';
        
    //Get the screen height and width
    var maskHeight = $(document).height();
    var maskWidth = $(window).width();
        
    //Set heigth and width to mask to fill up the whole screen
    $('#mask').css({'width':maskWidth,'height':maskHeight});
    
    //transition effect
    $('#mask').fadeIn(200);	
    $('#mask').fadeTo("slow",0.9);	
        
    //Get the window height and width
    var winH = $(window).height();
    var winW = $(window).width();
                  
    //Set the popup window to center
    $(id).css('top',  winH/2-$(id).height()/2);
    $(id).css('left', winW/2-$(id).width()/2);
        
    //transition effect
    $(id).fadeIn(1000); 	
        
    //if close button is clicked
    $('.window .close').click(function (e) {
    //Cancel the link behavior
    e.preventDefault();
    
    $('#mask').hide();
    $('.window').hide();
    });
    
    //if mask is clicked
    $('#mask').click(function () {
            //$(this).hide();
            //$('.window').hide();
    });
        
    });
    
    </script>
    <style>
    #mask {
      position: absolute;
      left: 0;
      top: 0;
      z-index: 9000;
      background-color: #000;
      display: none;
    }
    
    #boxes .window {
      position: absolute;
      left: 0;
      top: 0;
      width: 440px;
      height: 200px;
      display: none;
      z-index: 9999;
      padding: 20px;
      border-radius: 15px;
      text-align: center;
    }
    
    #boxes #dialog {
      width: 750px;
      height: 250px;
      padding: 10px;
      background-color: #ffffff;
      font-family: 'Segoe UI Light', sans-serif;
      font-size: 13pt;
    }
    
    #popupfoot {
      font-size: 16pt;
      position: absolute;
      bottom: 0px;
      width: 250px;
      left: 250px;
    }
    
    </style> 
    
 <? }  ?>